diff options
726 files changed, 8778 insertions, 6852 deletions
diff --git a/SConstruct b/SConstruct index a619ea0797..c2524a4a4d 100644 --- a/SConstruct +++ b/SConstruct @@ -399,6 +399,7 @@ if selected_platform in platform_list: sys.modules.pop('detect') env.module_list = [] + env.module_icons_paths = [] env.doc_class_path = {} for x in module_list: @@ -421,13 +422,22 @@ if selected_platform in platform_list: if (can_build): config.configure(env) env.module_list.append(x) + + # Get doc classes paths (if present) try: - doc_classes = config.get_doc_classes() - doc_path = config.get_doc_path() - for c in doc_classes: - env.doc_class_path[c] = "modules/" + x + "/" + doc_path + doc_classes = config.get_doc_classes() + doc_path = config.get_doc_path() + for c in doc_classes: + env.doc_class_path[c] = "modules/" + x + "/" + doc_path except: pass + # Get icon paths (if present) + try: + icons_path = config.get_icons_path() + env.module_icons_paths.append("modules/" + x + "/" + icons_path) + except: + # Default path for module icons + env.module_icons_paths.append("modules/" + x + "/" + "icons") sys.path.remove(tmppath) sys.modules.pop('config') diff --git a/core/array.cpp b/core/array.cpp index 65934d6ec9..a334af2c04 100644 --- a/core/array.cpp +++ b/core/array.cpp @@ -133,12 +133,18 @@ void Array::erase(const Variant &p_value) { } Variant Array::front() const { - ERR_FAIL_COND_V(_p->array.size() == 0, Variant()); + if (_p->array.size() == 0) { + ERR_EXPLAIN("Can't take value from empty array"); + ERR_FAIL_V(Variant()); + } return operator[](0); } Variant Array::back() const { - ERR_FAIL_COND_V(_p->array.size() == 0, Variant()); + if (_p->array.size() == 0) { + ERR_EXPLAIN("Can't take value from empty array"); + ERR_FAIL_V(Variant()); + } return operator[](_p->array.size() - 1); } @@ -165,8 +171,8 @@ int Array::rfind(const Variant &p_value, int p_from) const { if (_p->array[i] == p_value) { return i; - }; - }; + } + } return -1; } @@ -186,8 +192,8 @@ int Array::count(const Variant &p_value) const { if (_p->array[i] == p_value) { amount++; - }; - }; + } + } return amount; } diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 44573a0d97..f9fb7d7695 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -149,8 +149,10 @@ _ResourceLoader::_ResourceLoader() { } Error _ResourceSaver::save(const String &p_path, const RES &p_resource, SaverFlags p_flags) { - - ERR_FAIL_COND_V(p_resource.is_null(), ERR_INVALID_PARAMETER); + if (p_resource.is_null()) { + ERR_EXPLAIN("Can't save empty resource to path: " + String(p_path)) + ERR_FAIL_V(ERR_INVALID_PARAMETER); + } return ResourceSaver::save(p_path, p_resource, p_flags); } @@ -246,11 +248,11 @@ PoolStringArray _OS::get_connected_midi_inputs() { } void _OS::open_midi_inputs() { - return OS::get_singleton()->open_midi_inputs(); + OS::get_singleton()->open_midi_inputs(); } void _OS::close_midi_inputs() { - return OS::get_singleton()->close_midi_inputs(); + OS::get_singleton()->close_midi_inputs(); } void _OS::set_video_mode(const Size2 &p_size, bool p_fullscreen, bool p_resizeable, int p_screen) { @@ -1317,6 +1319,26 @@ void _OS::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_position"), "set_window_position", "get_window_position"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR2, "window_size"), "set_window_size", "get_window_size"); + // Those default values need to be specified for the docs generator, + // to avoid using values from the documentation writer's own OS instance. + ADD_PROPERTY_DEFAULT("clipboard", ""); + ADD_PROPERTY_DEFAULT("current_screen", 0); + ADD_PROPERTY_DEFAULT("exit_code", 0); + ADD_PROPERTY_DEFAULT("vsync_enabled", true); + ADD_PROPERTY_DEFAULT("low_processor_usage_mode", false); + ADD_PROPERTY_DEFAULT("keep_screen_on", true); + ADD_PROPERTY_DEFAULT("min_window_size", Vector2()); + ADD_PROPERTY_DEFAULT("max_window_size", Vector2()); + ADD_PROPERTY_DEFAULT("screen_orientation", 0); + ADD_PROPERTY_DEFAULT("window_borderless", false); + ADD_PROPERTY_DEFAULT("window_per_pixel_transparency_enabled", false); + ADD_PROPERTY_DEFAULT("window_fullscreen", false); + ADD_PROPERTY_DEFAULT("window_maximized", false); + ADD_PROPERTY_DEFAULT("window_minimized", false); + ADD_PROPERTY_DEFAULT("window_resizable", true); + ADD_PROPERTY_DEFAULT("window_position", Vector2()); + ADD_PROPERTY_DEFAULT("window_size", Vector2()); + BIND_ENUM_CONSTANT(VIDEO_DRIVER_GLES2); BIND_ENUM_CONSTANT(VIDEO_DRIVER_GLES3); @@ -2246,7 +2268,7 @@ bool _Directory::current_is_dir() const { void _Directory::list_dir_end() { ERR_FAIL_COND(!d); - return d->list_dir_end(); + d->list_dir_end(); } int _Directory::get_drive_count() { diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index 2885e7c0e0..3be5a08752 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -805,6 +805,9 @@ public: void set_result(const Variant &p_result); Variant get_result() const; + + JSONParseResult() : + error_line(-1) {} }; class _JSON : public Object { diff --git a/core/class_db.cpp b/core/class_db.cpp index c9527e3c8f..2cbf53ba0b 100644 --- a/core/class_db.cpp +++ b/core/class_db.cpp @@ -545,6 +545,11 @@ bool ClassDB::can_instance(const StringName &p_class) { ClassInfo *ti = classes.getptr(p_class); ERR_FAIL_COND_V(!ti, false); +#ifdef TOOLS_ENABLED + if (ti->api == API_EDITOR && !Engine::get_singleton()->is_editor_hint()) { + return false; + } +#endif return (!ti->disabled && ti->creation_func != NULL); } @@ -920,7 +925,7 @@ void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, cons #ifdef DEBUG_METHODS_ENABLED if (!mb_set) { ERR_EXPLAIN("Invalid Setter: " + p_class + "::" + p_setter + " for property: " + p_pinfo.name); - ERR_FAIL_COND(!mb_set); + ERR_FAIL(); } else { int exp_args = 1 + (p_index >= 0 ? 1 : 0); if (mb_set->get_argument_count() != exp_args) { @@ -939,7 +944,7 @@ void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, cons if (!mb_get) { ERR_EXPLAIN("Invalid Getter: " + p_class + "::" + p_getter + " for property: " + p_pinfo.name); - ERR_FAIL_COND(!mb_get); + ERR_FAIL(); } else { int exp_args = 0 + (p_index >= 0 ? 1 : 0); @@ -980,6 +985,13 @@ void ClassDB::add_property(StringName p_class, const PropertyInfo &p_pinfo, cons type->property_setget[p_pinfo.name] = psg; } +void ClassDB::set_property_default_value(StringName p_class, const StringName &p_name, const Variant &p_default) { + if (!default_values.has(p_class)) { + default_values[p_class] = HashMap<StringName, Variant>(); + } + default_values[p_class][p_name] = p_default; +} + void ClassDB::get_property_list(StringName p_class, List<PropertyInfo> *p_list, bool p_no_inheritance, const Object *p_validator) { OBJTYPE_RLOCK; @@ -1383,37 +1395,60 @@ void ClassDB::get_extensions_for_type(const StringName &p_class, List<String> *p } HashMap<StringName, HashMap<StringName, Variant> > ClassDB::default_values; +Set<StringName> ClassDB::default_values_cached; -Variant ClassDB::class_get_default_property_value(const StringName &p_class, const StringName &p_property) { +Variant ClassDB::class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid) { - if (!default_values.has(p_class)) { + if (!default_values_cached.has(p_class)) { - default_values[p_class] = HashMap<StringName, Variant>(); + if (!default_values.has(p_class)) { + default_values[p_class] = HashMap<StringName, Variant>(); + } + + Object *c = NULL; + bool cleanup_c = false; - if (ClassDB::can_instance(p_class)) { + if (Engine::get_singleton()->has_singleton(p_class)) { + c = Engine::get_singleton()->get_singleton_object(p_class); + cleanup_c = false; + } else if (ClassDB::can_instance(p_class)) { + c = ClassDB::instance(p_class); + cleanup_c = true; + } + + if (c) { - Object *c = ClassDB::instance(p_class); List<PropertyInfo> plist; c->get_property_list(&plist); for (List<PropertyInfo>::Element *E = plist.front(); E; E = E->next()) { if (E->get().usage & (PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_EDITOR)) { - Variant v = c->get(E->get().name); - default_values[p_class][E->get().name] = v; + if (!default_values[p_class].has(E->get().name)) { + Variant v = c->get(E->get().name); + default_values[p_class][E->get().name] = v; + } } } - memdelete(c); + + if (cleanup_c) { + memdelete(c); + } } + + default_values_cached.insert(p_class); } if (!default_values.has(p_class)) { + if (r_valid != NULL) *r_valid = false; return Variant(); } if (!default_values[p_class].has(p_property)) { + if (r_valid != NULL) *r_valid = false; return Variant(); } + if (r_valid != NULL) *r_valid = true; return default_values[p_class][p_property]; } @@ -1424,6 +1459,12 @@ void ClassDB::init() { lock = RWLock::create(); } +void ClassDB::cleanup_defaults() { + + default_values.clear(); + default_values_cached.clear(); +} + void ClassDB::cleanup() { //OBJTYPE_LOCK; hah not here @@ -1443,7 +1484,6 @@ void ClassDB::cleanup() { classes.clear(); resource_base_extensions.clear(); compat_classes.clear(); - default_values.clear(); memdelete(lock); } diff --git a/core/class_db.h b/core/class_db.h index efa1a46866..237ae9b806 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -162,6 +162,7 @@ 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; public: // DO NOT USE THIS!!!!!! NEEDS TO BE PUBLIC BUT DO NOT USE NO MATTER WHAT!!! @@ -329,6 +330,7 @@ public: static void add_property_group(StringName p_class, const String &p_name, const String &p_prefix = ""); static void add_property(StringName p_class, const PropertyInfo &p_pinfo, const StringName &p_setter, const StringName &p_getter, int p_index = -1); + static void set_property_default_value(StringName p_class, const StringName &p_name, const Variant &p_default); static void get_property_list(StringName p_class, List<PropertyInfo> *p_list, bool p_no_inheritance = false, const Object *p_validator = NULL); static bool set_property(Object *p_object, const StringName &p_property, const Variant &p_value, bool *r_valid = NULL); static bool get_property(Object *p_object, const StringName &p_property, Variant &r_value); @@ -355,7 +357,7 @@ public: static void get_enum_list(const StringName &p_class, List<StringName> *p_enums, bool p_no_inheritance = false); static void get_enum_constants(const StringName &p_class, const StringName &p_enum, List<StringName> *p_constants, bool p_no_inheritance = false); - static Variant class_get_default_property_value(const StringName &p_class, const StringName &p_property); + static Variant class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid = NULL); static StringName get_category(const StringName &p_node); @@ -373,6 +375,7 @@ public: static void set_current_api(APIType p_api); static APIType get_current_api(); + static void cleanup_defaults(); static void cleanup(); }; diff --git a/core/color.cpp b/core/color.cpp index 8959fce4e3..1843532124 100644 --- a/core/color.cpp +++ b/core/color.cpp @@ -388,9 +388,8 @@ bool Color::html_is_valid(const String &p_color) { return false; } - int a = 255; if (alpha) { - a = _parse_col(color, 0); + int a = _parse_col(color, 0); if (a < 0) { return false; } diff --git a/core/command_queue_mt.h b/core/command_queue_mt.h index 798fa4394d..3789eda5db 100644 --- a/core/command_queue_mt.h +++ b/core/command_queue_mt.h @@ -346,7 +346,7 @@ class CommandQueueMT { } return NULL; } - } else if (write_ptr >= dealloc_ptr) { + } else { // ahead of dealloc_ptr, check that there is room if ((COMMAND_MEM_SIZE - write_ptr) < alloc_size + sizeof(uint32_t)) { diff --git a/core/engine.cpp b/core/engine.cpp index 50822244cf..2d8473fbd9 100644 --- a/core/engine.cpp +++ b/core/engine.cpp @@ -197,8 +197,10 @@ void Engine::add_singleton(const Singleton &p_singleton) { Object *Engine::get_singleton_object(const String &p_name) const { const Map<StringName, Object *>::Element *E = singleton_ptrs.find(p_name); - ERR_EXPLAIN("Failed to retrieve non-existent singleton '" + p_name + "'"); - ERR_FAIL_COND_V(!E, NULL); + if (!E) { + ERR_EXPLAIN("Failed to retrieve non-existent singleton '" + p_name + "'"); + ERR_FAIL_V(NULL); + } return E->get(); }; diff --git a/core/hash_map.h b/core/hash_map.h index 31332991de..1513d7a65b 100644 --- a/core/hash_map.h +++ b/core/hash_map.h @@ -208,7 +208,10 @@ private: /* if element doesn't exist, create it */ Element *e = memnew(Element); - ERR_FAIL_COND_V(!e, NULL); /* out of memory */ + if (!e) { + ERR_EXPLAIN("Out of memory"); + ERR_FAIL_V(NULL); + } uint32_t hash = Hasher::hash(p_key); uint32_t index = hash & ((1 << hash_table_power) - 1); e->next = hash_table[index]; @@ -495,8 +498,10 @@ public: } else { /* get the next key */ const Element *e = get_element(*p_key); - ERR_FAIL_COND_V(!e, NULL); /* invalid key supplied */ - + if (!e) { + ERR_EXPLAIN("Invalid key supplied") + ERR_FAIL_V(NULL); + } if (e->next) { /* if there is a "next" in the list, return that */ return &e->next->pair.key; diff --git a/core/image.cpp b/core/image.cpp index dd8f2b9bac..18a3aae88f 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1372,6 +1372,7 @@ void Image::shrink_x2() { int new_size = data.size() - ofs; new_img.resize(new_size); + ERR_FAIL_COND(new_img.size() == 0); { PoolVector<uint8_t>::Write w = new_img.write(); @@ -1391,6 +1392,7 @@ void Image::shrink_x2() { ERR_FAIL_COND(!_can_modify(format)); int ps = get_format_pixel_size(format); new_img.resize((width / 2) * (height / 2) * ps); + ERR_FAIL_COND(new_img.size() == 0); { PoolVector<uint8_t>::Write w = new_img.write(); @@ -1464,7 +1466,10 @@ Error Image::generate_mipmaps(bool p_renormalize) { ERR_FAIL_V(ERR_UNAVAILABLE); } - ERR_FAIL_COND_V(width == 0 || height == 0, ERR_UNCONFIGURED); + if (width == 0 || height == 0) { + ERR_EXPLAIN("Cannot generate mipmaps with width or height equal to 0."); + ERR_FAIL_V(ERR_UNCONFIGURED); + } int mmcount; @@ -2532,7 +2537,7 @@ Color Image::get_pixel(int p_x, int p_y) const { } void Image::set_pixelv(const Point2 &p_dst, const Color &p_color) { - return set_pixel(p_dst.x, p_dst.y, p_color); + set_pixel(p_dst.x, p_dst.y, p_color); } void Image::set_pixel(int p_x, int p_y, const Color &p_color) { diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp index 871e21df3e..f7fb72c089 100644 --- a/core/io/config_file.cpp +++ b/core/io/config_file.cpp @@ -30,7 +30,7 @@ #include "config_file.h" -#include "core/os/file_access.h" +#include "core/io/file_access_encrypted.h" #include "core/os/keyboard.h" #include "core/variant_parser.h" @@ -137,6 +137,48 @@ Error ConfigFile::save(const String &p_path) { return err; } + return _internal_save(file); +} + +Error ConfigFile::save_encrypted(const String &p_path, const Vector<uint8_t> &p_key) { + + Error err; + FileAccess *f = FileAccess::open(p_path, FileAccess::WRITE, &err); + + if (err) + return err; + + FileAccessEncrypted *fae = memnew(FileAccessEncrypted); + err = fae->open_and_parse(f, p_key, FileAccessEncrypted::MODE_WRITE_AES256); + if (err) { + memdelete(fae); + memdelete(f); + return err; + } + return _internal_save(fae); +} + +Error ConfigFile::save_encrypted_pass(const String &p_path, const String &p_pass) { + + Error err; + FileAccess *f = FileAccess::open(p_path, FileAccess::WRITE, &err); + + if (err) + return err; + + FileAccessEncrypted *fae = memnew(FileAccessEncrypted); + err = fae->open_and_parse_password(f, p_pass, FileAccessEncrypted::MODE_WRITE_AES256); + if (err) { + memdelete(fae); + memdelete(f); + return err; + } + + return _internal_save(fae); +} + +Error ConfigFile::_internal_save(FileAccess *file) { + for (OrderedHashMap<String, OrderedHashMap<String, Variant> >::Element E = values.front(); E; E = E.next()) { if (E != values.front()) @@ -164,6 +206,48 @@ Error ConfigFile::load(const String &p_path) { if (!f) return ERR_CANT_OPEN; + return _internal_load(p_path, f); +} + +Error ConfigFile::load_encrypted(const String &p_path, const Vector<uint8_t> &p_key) { + + Error err; + FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); + + if (err) + return err; + + FileAccessEncrypted *fae = memnew(FileAccessEncrypted); + err = fae->open_and_parse(f, p_key, FileAccessEncrypted::MODE_READ); + if (err) { + memdelete(fae); + memdelete(f); + return err; + } + return _internal_load(p_path, fae); +} + +Error ConfigFile::load_encrypted_pass(const String &p_path, const String &p_pass) { + + Error err; + FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err); + + if (err) + return err; + + FileAccessEncrypted *fae = memnew(FileAccessEncrypted); + err = fae->open_and_parse_password(f, p_pass, FileAccessEncrypted::MODE_READ); + if (err) { + memdelete(fae); + memdelete(f); + return err; + } + + return _internal_load(p_path, fae); +} + +Error ConfigFile::_internal_load(const String &p_path, FileAccess *f) { + VariantParser::StreamFile stream; stream.f = f; @@ -182,7 +266,7 @@ Error ConfigFile::load(const String &p_path) { next_tag.fields.clear(); next_tag.name = String(); - err = VariantParser::parse_tag_assign_eof(&stream, lines, error_text, next_tag, assign, value, NULL, true); + Error err = VariantParser::parse_tag_assign_eof(&stream, lines, error_text, next_tag, assign, value, NULL, true); if (err == ERR_FILE_EOF) { memdelete(f); return OK; @@ -215,6 +299,12 @@ void ConfigFile::_bind_methods() { ClassDB::bind_method(D_METHOD("load", "path"), &ConfigFile::load); ClassDB::bind_method(D_METHOD("save", "path"), &ConfigFile::save); + + ClassDB::bind_method(D_METHOD("load_encrypted", "path", "key"), &ConfigFile::load_encrypted); + ClassDB::bind_method(D_METHOD("load_encrypted_pass", "path", "pass"), &ConfigFile::load_encrypted_pass); + + ClassDB::bind_method(D_METHOD("save_encrypted", "path", "key"), &ConfigFile::save_encrypted); + ClassDB::bind_method(D_METHOD("save_encrypted_pass", "path", "pass"), &ConfigFile::save_encrypted_pass); } ConfigFile::ConfigFile() { diff --git a/core/io/config_file.h b/core/io/config_file.h index 36e5c0ca7d..3ab6fef868 100644 --- a/core/io/config_file.h +++ b/core/io/config_file.h @@ -32,6 +32,7 @@ #define CONFIG_FILE_H #include "core/ordered_hash_map.h" +#include "core/os/file_access.h" #include "core/reference.h" class ConfigFile : public Reference { @@ -42,6 +43,8 @@ class ConfigFile : public Reference { PoolStringArray _get_sections() const; PoolStringArray _get_section_keys(const String &p_section) const; + Error _internal_load(const String &p_path, FileAccess *f); + Error _internal_save(FileAccess *file); protected: static void _bind_methods(); @@ -61,6 +64,12 @@ public: Error save(const String &p_path); Error load(const String &p_path); + Error load_encrypted(const String &p_path, const Vector<uint8_t> &p_key); + Error load_encrypted_pass(const String &p_path, const String &p_pass); + + Error save_encrypted(const String &p_path, const Vector<uint8_t> &p_key); + Error save_encrypted_pass(const String &p_path, const String &p_pass); + ConfigFile(); }; diff --git a/core/io/file_access_buffered.cpp b/core/io/file_access_buffered.cpp index 93eaeb08c5..15523a49a9 100644 --- a/core/io/file_access_buffered.cpp +++ b/core/io/file_access_buffered.cpp @@ -35,79 +35,79 @@ Error FileAccessBuffered::set_error(Error p_error) const { return (last_error = p_error); -}; +} void FileAccessBuffered::set_cache_size(int p_size) { cache_size = p_size; -}; +} int FileAccessBuffered::get_cache_size() { return cache_size; -}; +} int FileAccessBuffered::cache_data_left() const { if (file.offset >= file.size) { return 0; - }; + } if (cache.offset == -1 || file.offset < cache.offset || file.offset >= cache.offset + cache.buffer.size()) { return read_data_block(file.offset, cache_size); + } - } else { - - return cache.buffer.size() - (file.offset - cache.offset); - }; - - return 0; -}; + return cache.buffer.size() - (file.offset - cache.offset); +} void FileAccessBuffered::seek(size_t p_position) { file.offset = p_position; -}; +} void FileAccessBuffered::seek_end(int64_t p_position) { file.offset = file.size + p_position; -}; +} size_t FileAccessBuffered::get_position() const { return file.offset; -}; +} size_t FileAccessBuffered::get_len() const { return file.size; -}; +} bool FileAccessBuffered::eof_reached() const { return file.offset > file.size; -}; +} uint8_t FileAccessBuffered::get_8() const { - - ERR_FAIL_COND_V(!file.open, 0); + if (!file.open) { + ERR_EXPLAIN("Can't get data, when file is not opened."); + ERR_FAIL_V(0); + } uint8_t byte = 0; if (cache_data_left() >= 1) { byte = cache.buffer[file.offset - cache.offset]; - }; + } ++file.offset; return byte; -}; +} int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const { - - ERR_FAIL_COND_V(!file.open, -1); + if (!file.open) { + ERR_EXPLAIN("Can't get buffer, when file is not opened."); + ERR_FAIL_V(-1); + } if (p_length > cache_size) { @@ -124,16 +124,16 @@ int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const { p_length -= size; file.offset += size; total_read += size; - }; + } int err = read_data_block(file.offset, p_length, p_dest); if (err >= 0) { total_read += err; file.offset += err; - }; + } return total_read; - }; + } int to_read = p_length; int total_read = 0; @@ -143,10 +143,10 @@ int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const { if (left == 0) { file.offset += to_read; return total_read; - }; + } if (left < 0) { return left; - }; + } int r = MIN(left, to_read); //PoolVector<uint8_t>::Read read = cache.buffer.read(); @@ -156,25 +156,25 @@ int FileAccessBuffered::get_buffer(uint8_t *p_dest, int p_length) const { file.offset += r; total_read += r; to_read -= r; - }; + } return p_length; -}; +} bool FileAccessBuffered::is_open() const { return file.open; -}; +} Error FileAccessBuffered::get_error() const { return last_error; -}; +} FileAccessBuffered::FileAccessBuffered() { cache_size = DEFAULT_CACHE_SIZE; -}; +} FileAccessBuffered::~FileAccessBuffered() { } diff --git a/core/io/file_access_buffered_fa.h b/core/io/file_access_buffered_fa.h index 24b40cbce8..6e806e7b3f 100644 --- a/core/io/file_access_buffered_fa.h +++ b/core/io/file_access_buffered_fa.h @@ -40,7 +40,10 @@ class FileAccessBufferedFA : public FileAccessBuffered { int read_data_block(int p_offset, int p_size, uint8_t *p_dest = 0) const { - ERR_FAIL_COND_V(!f.is_open(), -1); + if (!f.is_open()) { + ERR_EXPLAIN("Can't read data block, when file is not opened."); + ERR_FAIL_V(-1); + } ((T *)&f)->seek(p_offset); diff --git a/core/io/http_client.cpp b/core/io/http_client.cpp index c3626bfe31..170bef4430 100644 --- a/core/io/http_client.cpp +++ b/core/io/http_client.cpp @@ -482,8 +482,6 @@ Error HTTPClient::poll() { return OK; } } - // Wait for response - return OK; } break; case STATUS_DISCONNECTED: { return ERR_UNCONFIGURED; diff --git a/core/io/json.cpp b/core/io/json.cpp index c211ca2ed4..4e729cb355 100644 --- a/core/io/json.cpp +++ b/core/io/json.cpp @@ -347,8 +347,6 @@ Error JSON::_parse_value(Variant &value, Token &token, const CharType *p_str, in r_err_str = "Expected value, got " + String(tk_name[token.type]) + "."; return ERR_PARSE_ERROR; } - - return ERR_PARSE_ERROR; } Error JSON::_parse_array(Array &array, const CharType *p_str, int &index, int p_len, int &line, String &r_err_str) { diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 2779837190..33dc4dbde4 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -874,6 +874,7 @@ void MultiplayerAPI::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "allow_object_decoding"), "set_allow_object_decoding", "is_object_decoding_allowed"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_network_connections"), "set_refuse_new_network_connections", "is_refusing_new_network_connections"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "network_peer", PROPERTY_HINT_RESOURCE_TYPE, "NetworkedMultiplayerPeer", 0), "set_network_peer", "get_network_peer"); + ADD_PROPERTY_DEFAULT("refuse_new_network_connections", false); ADD_SIGNAL(MethodInfo("network_peer_connected", PropertyInfo(Variant::INT, "id"))); ADD_SIGNAL(MethodInfo("network_peer_disconnected", PropertyInfo(Variant::INT, "id"))); diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index 55685a2d9a..c16d89d695 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -63,10 +63,11 @@ void PCKPacker::_bind_methods() { Error PCKPacker::pck_start(const String &p_file, int p_alignment) { file = FileAccess::open(p_file, FileAccess::WRITE); - if (file == NULL) { - return ERR_CANT_CREATE; - }; + if (!file) { + ERR_EXPLAIN("Can't open file to write: " + String(p_file)); + ERR_FAIL_V(ERR_CANT_CREATE); + } alignment = p_alignment; diff --git a/core/io/resource_importer.cpp b/core/io/resource_importer.cpp index 4a58d37ca5..63d7ba547c 100644 --- a/core/io/resource_importer.cpp +++ b/core/io/resource_importer.cpp @@ -161,7 +161,8 @@ void ResourceFormatImporter::get_recognized_extensions(List<String> *p_extension void ResourceFormatImporter::get_recognized_extensions_for_type(const String &p_type, List<String> *p_extensions) const { if (p_type == "") { - return get_recognized_extensions(p_extensions); + get_recognized_extensions(p_extensions); + return; } Set<String> found; @@ -347,7 +348,7 @@ void ResourceFormatImporter::get_dependencies(const String &p_path, List<String> return; } - return ResourceLoader::get_dependencies(pat.path, p_dependencies, p_add_types); + ResourceLoader::get_dependencies(pat.path, p_dependencies, p_add_types); } Ref<ResourceImporter> ResourceFormatImporter::get_importer_by_name(const String &p_name) const { diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 56d3b8b133..a29b9d1ddb 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -207,8 +207,6 @@ RES ResourceFormatLoader::load(const String &p_path, const String &p_original_pa ERR_FAIL_COND_V(err != OK, RES()); } - - return RES(); } void ResourceFormatLoader::get_dependencies(const String &p_path, List<String> *p_dependencies, bool p_add_types) { @@ -283,7 +281,6 @@ RES ResourceLoader::_load(const String &p_path, const String &p_original_path, c ERR_EXPLAIN("No loader found for resource: " + p_path); } ERR_FAIL_V(RES()); - return RES(); } bool ResourceLoader::_add_to_loading_map(const String &p_path) { @@ -543,7 +540,6 @@ Ref<ResourceInteractiveLoader> ResourceLoader::load_interactive(const String &p_ ERR_EXPLAIN("No loader found for resource: " + path); } ERR_FAIL_V(Ref<ResourceInteractiveLoader>()); - return Ref<ResourceInteractiveLoader>(); } void ResourceLoader::add_resource_format_loader(Ref<ResourceFormatLoader> p_format_loader, bool p_at_front) { diff --git a/core/math/a_star.cpp b/core/math/a_star.cpp index 7ce3824505..b61119d8df 100644 --- a/core/math/a_star.cpp +++ b/core/math/a_star.cpp @@ -216,6 +216,8 @@ int AStar::get_closest_point(const Vector3 &p_point) const { for (const Map<int, Point *>::Element *E = points.front(); E; E = E->next()) { + if (!E->get()->enabled) + continue; //Disabled points should not be considered real_t d = p_point.distance_squared_to(E->get()->pos); if (closest_id < 0 || d < closest_dist) { closest_dist = d; @@ -234,6 +236,10 @@ Vector3 AStar::get_closest_position_in_segment(const Vector3 &p_point) const { for (const Set<Segment>::Element *E = segments.front(); E; E = E->next()) { + if (!(E->get().from_point->enabled && E->get().to_point->enabled)) { + continue; + } + Vector3 segment[2] = { E->get().from_point->pos, E->get().to_point->pos, diff --git a/core/math/bsp_tree.cpp b/core/math/bsp_tree.cpp index d7e6e82cd9..a12f9fee2e 100644 --- a/core/math/bsp_tree.cpp +++ b/core/math/bsp_tree.cpp @@ -142,7 +142,7 @@ int BSP_Tree::_get_points_inside(int p_node, const Vector3 *p_points, int *p_ind } return _get_points_inside(node->over, p_points, p_indices, p_center, p_half_extents, p_indices_count); - } else if (dist_min <= 0) { //all points behind plane + } else { //all points behind plane if (node->under == UNDER_LEAF) { @@ -150,8 +150,6 @@ int BSP_Tree::_get_points_inside(int p_node, const Vector3 *p_points, int *p_ind } return _get_points_inside(node->under, p_points, p_indices, p_center, p_half_extents, p_indices_count); } - - return 0; } int BSP_Tree::get_points_inside(const Vector3 *p_points, int p_point_count) const { @@ -271,8 +269,6 @@ bool BSP_Tree::point_is_inside(const Vector3 &p_point) const { ERR_FAIL_COND_V(idx < MAX_NODES && idx >= node_count, false); #endif } - - return false; } static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_indices, real_t p_tolerance) { diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp index f615cc8c65..8b3b6c82f3 100644 --- a/core/math/camera_matrix.cpp +++ b/core/math/camera_matrix.cpp @@ -507,21 +507,21 @@ void CameraMatrix::set_light_bias() { real_t *m = &matrix[0][0]; - m[0] = 0.5, - m[1] = 0.0, - m[2] = 0.0, - m[3] = 0.0, - m[4] = 0.0, - m[5] = 0.5, - m[6] = 0.0, - m[7] = 0.0, - m[8] = 0.0, - m[9] = 0.0, - m[10] = 0.5, - m[11] = 0.0, - m[12] = 0.5, - m[13] = 0.5, - m[14] = 0.5, + m[0] = 0.5; + m[1] = 0.0; + m[2] = 0.0; + m[3] = 0.0; + m[4] = 0.0; + m[5] = 0.5; + m[6] = 0.0; + m[7] = 0.0; + m[8] = 0.0; + m[9] = 0.0; + m[10] = 0.5; + m[11] = 0.0; + m[12] = 0.5; + m[13] = 0.5; + m[14] = 0.5; m[15] = 1.0; } @@ -529,21 +529,21 @@ void CameraMatrix::set_light_atlas_rect(const Rect2 &p_rect) { real_t *m = &matrix[0][0]; - m[0] = p_rect.size.width, - m[1] = 0.0, - m[2] = 0.0, - m[3] = 0.0, - m[4] = 0.0, - m[5] = p_rect.size.height, - m[6] = 0.0, - m[7] = 0.0, - m[8] = 0.0, - m[9] = 0.0, - m[10] = 1.0, - m[11] = 0.0, - m[12] = p_rect.position.x, - m[13] = p_rect.position.y, - m[14] = 0.0, + m[0] = p_rect.size.width; + m[1] = 0.0; + m[2] = 0.0; + m[3] = 0.0; + m[4] = 0.0; + m[5] = p_rect.size.height; + m[6] = 0.0; + m[7] = 0.0; + m[8] = 0.0; + m[9] = 0.0; + m[10] = 1.0; + m[11] = 0.0; + m[12] = p_rect.position.x; + m[13] = p_rect.position.y; + m[14] = 0.0; m[15] = 1.0; } diff --git a/core/math/math_funcs.cpp b/core/math/math_funcs.cpp index 5b5fd8e283..7a2e74a413 100644 --- a/core/math/math_funcs.cpp +++ b/core/math/math_funcs.cpp @@ -161,8 +161,6 @@ uint32_t Math::larger_prime(uint32_t p_val) { return primes[idx]; idx++; } - - return 0; } double Math::random(double from, double to) { diff --git a/core/math/random_number_generator.h b/core/math/random_number_generator.h index a6182a4b33..9b54ea9b2e 100644 --- a/core/math/random_number_generator.h +++ b/core/math/random_number_generator.h @@ -47,7 +47,7 @@ public: _FORCE_INLINE_ uint64_t get_seed() { return randbase.get_seed(); } - _FORCE_INLINE_ void randomize() { return randbase.randomize(); } + _FORCE_INLINE_ void randomize() { randbase.randomize(); } _FORCE_INLINE_ uint32_t randi() { return randbase.rand(); } diff --git a/core/object.cpp b/core/object.cpp index ee512ff23c..3367d6b6c3 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -742,13 +742,11 @@ void Object::call_multilevel(const StringName &p_method, const Variant **p_args, if (Object::cast_to<Reference>(this)) { ERR_EXPLAIN("Can't 'free' a reference."); ERR_FAIL(); - return; } if (_lock_index.get() > 1) { ERR_EXPLAIN("Object is locked and can't be freed."); ERR_FAIL(); - return; } #endif @@ -1467,7 +1465,7 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str if (!signal_is_valid) { ERR_EXPLAIN("In Object of type '" + String(get_class()) + "': Attempt to connect nonexistent signal '" + p_signal + "' to method '" + p_to_object->get_class() + "." + p_to_method + "'"); - ERR_FAIL_COND_V(!signal_is_valid, ERR_INVALID_PARAMETER); + ERR_FAIL_V(ERR_INVALID_PARAMETER); } signal_map[p_signal] = Signal(); s = &signal_map[p_signal]; @@ -1517,7 +1515,7 @@ bool Object::is_connected(const StringName &p_signal, Object *p_to_object, const return false; ERR_EXPLAIN("Nonexistent signal: " + p_signal); - ERR_FAIL_COND_V(!s, false); + ERR_FAIL_V(false); } Signal::Target target(p_to_object->get_instance_id(), p_to_method); diff --git a/core/object.h b/core/object.h index 4394c1c3da..1e0b22c086 100644 --- a/core/object.h +++ b/core/object.h @@ -130,6 +130,7 @@ enum PropertyUsageFlags { #define ADD_SIGNAL(m_signal) ClassDB::add_signal(get_class_static(), m_signal) #define ADD_PROPERTY(m_property, m_setter, m_getter) ClassDB::add_property(get_class_static(), m_property, _scs_create(m_setter), _scs_create(m_getter)) #define ADD_PROPERTYI(m_property, m_setter, m_getter, m_index) ClassDB::add_property(get_class_static(), m_property, _scs_create(m_setter), _scs_create(m_getter), m_index) +#define ADD_PROPERTY_DEFAULT(m_property, m_default) ClassDB::set_property_default_value(get_class_static(), m_property, m_default) #define ADD_GROUP(m_name, m_prefix) ClassDB::add_property_group(get_class_static(), m_name, m_prefix) struct PropertyInfo { diff --git a/core/os/dir_access.cpp b/core/os/dir_access.cpp index 1c57bfdf3d..0cdb5b41b7 100644 --- a/core/os/dir_access.cpp +++ b/core/os/dir_access.cpp @@ -43,8 +43,6 @@ String DirAccess::_get_root_path() const { case ACCESS_USERDATA: return OS::get_singleton()->get_user_data_dir(); default: return ""; } - - return ""; } String DirAccess::_get_root_string() const { @@ -54,8 +52,6 @@ String DirAccess::_get_root_string() const { case ACCESS_USERDATA: return "user://"; default: return ""; } - - return ""; } int DirAccess::get_current_drive() { @@ -378,7 +374,7 @@ Error DirAccess::_copy_dir(DirAccess *p_target_da, String p_to, int p_chmod_flag list_dir_end(); return ERR_BUG; } - Error err = copy(get_current_dir() + "/" + n, p_to + rel_path, p_chmod_flags); + Error err = copy(get_current_dir().plus_file(n), p_to + rel_path, p_chmod_flags); if (err) { list_dir_end(); return err; diff --git a/core/os/memory.h b/core/os/memory.h index f3ca9fc614..e073b11e76 100644 --- a/core/os/memory.h +++ b/core/os/memory.h @@ -66,7 +66,7 @@ public: class DefaultAllocator { public: _FORCE_INLINE_ static void *alloc(size_t p_memory) { return Memory::alloc_static(p_memory, false); } - _FORCE_INLINE_ static void free(void *p_ptr) { return Memory::free_static(p_ptr, false); } + _FORCE_INLINE_ static void free(void *p_ptr) { Memory::free_static(p_ptr, false); } }; void *operator new(size_t p_size, const char *p_description); ///< operator new that takes a description and uses MemoryStaticPool diff --git a/core/packed_data_container.cpp b/core/packed_data_container.cpp index fa60be64a7..54bf12b314 100644 --- a/core/packed_data_container.cpp +++ b/core/packed_data_container.cpp @@ -224,7 +224,8 @@ uint32_t PackedDataContainer::_pack(const Variant &p_data, Vector<uint8_t> &tmpd string_cache[s] = tmpdata.size(); - }; //fallthrough + FALLTHROUGH; + }; case Variant::NIL: case Variant::BOOL: case Variant::INT: diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 983b2a2576..fc1a74801d 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -863,8 +863,6 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust ERR_EXPLAIN("Unknown config file format: " + p_path); ERR_FAIL_V(ERR_FILE_UNRECOGNIZED); } - - return OK; } Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed) { diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp index 135df4e5bd..af863dd385 100644 --- a/core/register_core_types.cpp +++ b/core/register_core_types.cpp @@ -273,6 +273,7 @@ void unregister_core_types() { ResourceLoader::finalize(); + ClassDB::cleanup_defaults(); ObjectDB::cleanup(); unregister_variant_methods(); diff --git a/core/ustring.cpp b/core/ustring.cpp index ff28fa420d..18c48b4dad 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -481,8 +481,6 @@ signed char String::nocasecmp_to(const String &p_str) const { this_str++; that_str++; } - - return 0; //should never reach anyway } signed char String::casecmp_to(const String &p_str) const { @@ -513,8 +511,6 @@ signed char String::casecmp_to(const String &p_str) const { this_str++; that_str++; } - - return 0; //should never reach anyway } signed char String::naturalnocasecmp_to(const String &p_str) const { @@ -731,8 +727,6 @@ String String::get_slicec(CharType p_splitter, int p_slice) const { i++; } - - return String(); //no find! } Vector<String> String::split_spaces() const { diff --git a/core/variant.cpp b/core/variant.cpp index 9306867ac7..5b51a4e513 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1171,8 +1171,6 @@ Variant::operator signed int() const { return 0; } } - - return 0; } Variant::operator unsigned int() const { @@ -1188,8 +1186,6 @@ Variant::operator unsigned int() const { return 0; } } - - return 0; } Variant::operator int64_t() const { @@ -1206,8 +1202,6 @@ Variant::operator int64_t() const { return 0; } } - - return 0; } /* @@ -1244,8 +1238,6 @@ Variant::operator uint64_t() const { return 0; } } - - return 0; } #ifdef NEED_LONG_INT @@ -1300,8 +1292,6 @@ Variant::operator signed short() const { return 0; } } - - return 0; } Variant::operator unsigned short() const { @@ -1317,8 +1307,6 @@ Variant::operator unsigned short() const { return 0; } } - - return 0; } Variant::operator signed char() const { @@ -1334,8 +1322,6 @@ Variant::operator signed char() const { return 0; } } - - return 0; } Variant::operator unsigned char() const { @@ -1351,8 +1337,6 @@ Variant::operator unsigned char() const { return 0; } } - - return 0; } Variant::operator CharType() const { @@ -1374,8 +1358,6 @@ Variant::operator float() const { return 0; } } - - return 0; } Variant::operator double() const { @@ -1391,8 +1373,6 @@ Variant::operator double() const { return 0; } } - - return true; } Variant::operator StringName() const { diff --git a/core/variant_op.cpp b/core/variant_op.cpp index f3c9bcaa7e..d677c7776a 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -2183,7 +2183,8 @@ void Variant::set(const Variant &p_index, const Variant &p_value, bool *r_valid) return; } - return obj->set(p_index, p_value, r_valid); + obj->set(p_index, p_value, r_valid); + return; } } break; case DICTIONARY: { diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index d7371b0434..d5513bc2d7 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -436,8 +436,6 @@ Error VariantParser::_parse_enginecfg(Stream *p_stream, Vector<String> &strings, line++; } } - - return OK; } template <class T> @@ -799,8 +797,6 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, } } - return OK; - } else if (id == "Resource" || id == "SubResource" || id == "ExtResource") { get_token(p_stream, token, line, r_err_str); @@ -864,8 +860,6 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return ERR_PARSE_ERROR; } } - - return OK; #ifndef DISABLE_DEPRECATED } else if (id == "InputEvent") { @@ -1256,8 +1250,6 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, r_err_str = "Expected value, got " + String(tk_name[token.type]) + "."; return ERR_PARSE_ERROR; } - - return ERR_PARSE_ERROR; } Error VariantParser::_parse_array(Array &array, Stream *p_stream, int &line, String &r_err_str, ResourceParser *p_res_parser) { @@ -1301,8 +1293,6 @@ Error VariantParser::_parse_array(Array &array, Stream *p_stream, int &line, Str array.push_back(v); need_comma = true; } - - return OK; } Error VariantParser::_parse_dictionary(Dictionary &object, Stream *p_stream, int &line, String &r_err_str, ResourceParser *p_res_parser) { @@ -1372,8 +1362,6 @@ Error VariantParser::_parse_dictionary(Dictionary &object, Stream *p_stream, int at_key = true; } } - - return OK; } Error VariantParser::_parse_tag(Token &token, Stream *p_stream, int &line, String &r_err_str, Tag &r_tag, ResourceParser *p_res_parser, bool p_simple_tag) { @@ -1557,8 +1545,6 @@ Error VariantParser::parse_tag_assign_eof(Stream *p_stream, int &line, String &r line++; } } - - return OK; } Error VariantParser::parse(Stream *p_stream, Variant &r_ret, String &r_err_str, int &r_err_line, ResourceParser *p_res_parser) { diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index df98048a97..0428140908 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -4,7 +4,7 @@ Global scope constants and variables. </brief_description> <description> - Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. It's not much. + Global scope constants and variables. This is all that resides in the globals, constants regarding error codes, scancodes, property hints, etc. Singletons are also documented here, since they can be accessed from anywhere. </description> <tutorials> @@ -13,100 +13,105 @@ </methods> <members> <member name="ARVRServer" type="ARVRServer" setter="" getter=""> - [ARVRServer] singleton + The [ARVRServer] singleton. </member> <member name="AudioServer" type="AudioServer" setter="" getter=""> - [AudioServer] singleton + The [AudioServer] singleton. </member> <member name="CameraServer" type="CameraServer" setter="" getter=""> - [CameraServer] singleton + The [CameraServer] singleton. </member> <member name="ClassDB" type="ClassDB" setter="" getter=""> - [ClassDB] singleton + The [ClassDB] singleton. </member> <member name="Engine" type="Engine" setter="" getter=""> - [Engine] singleton + The [Engine] singleton. </member> <member name="Geometry" type="Geometry" setter="" getter=""> - [Geometry] singleton + The [Geometry] singleton. </member> <member name="IP" type="IP" setter="" getter=""> - [IP] singleton + The [IP] singleton. </member> <member name="Input" type="Input" setter="" getter=""> - [Input] singleton + The [Input] singleton. </member> <member name="InputMap" type="InputMap" setter="" getter=""> - [InputMap] singleton + The [InputMap] singleton. </member> <member name="JSON" type="JSON" setter="" getter=""> - [JSON] singleton + The [JSON] singleton. </member> <member name="JavaScript" type="JavaScript" setter="" getter=""> - [JavaScript] singleton + The [JavaScript] singleton. </member> <member name="Marshalls" type="Reference" setter="" getter=""> - [Marshalls] singleton + The [Marshalls] singleton. </member> <member name="NavigationMeshGenerator" type="EditorNavigationMeshGenerator" setter="" getter=""> + The [EditorNavigationMeshGenerator] singleton. </member> <member name="OS" type="OS" setter="" getter=""> - [OS] singleton + The [OS] singleton. </member> <member name="Performance" type="Performance" setter="" getter=""> - [Performance] singleton + The [Performance] singleton. </member> <member name="Physics2DServer" type="Physics2DServer" setter="" getter=""> - [Physics2DServer] singleton + The [Physics2DServer] singleton. </member> <member name="PhysicsServer" type="PhysicsServer" setter="" getter=""> - [PhysicsServer] singleton + The [PhysicsServer] singleton. </member> <member name="ProjectSettings" type="ProjectSettings" setter="" getter=""> - [ProjectSettings] singleton + The [ProjectSettings] singleton. </member> <member name="ResourceLoader" type="ResourceLoader" setter="" getter=""> - [ResourceLoader] singleton + The [ResourceLoader] singleton. </member> <member name="ResourceSaver" type="ResourceSaver" setter="" getter=""> - [ResourceSaver] singleton + The [ResourceSaver] singleton. </member> <member name="TranslationServer" type="TranslationServer" setter="" getter=""> - [TranslationServer] singleton + The [TranslationServer] singleton. </member> <member name="VisualScriptEditor" type="VisualScriptEditor" setter="" getter=""> - [VisualScriptEditor] singleton + The [VisualScriptEditor] singleton. </member> <member name="VisualServer" type="VisualServer" setter="" getter=""> - [VisualServer] singleton + The [VisualServer] singleton. </member> </members> <constants> <constant name="MARGIN_LEFT" value="0" enum="Margin"> - Left margin, used usually for [Control] or [StyleBox] derived classes. + Left margin, usually used for [Control] or [StyleBox]-derived classes. </constant> <constant name="MARGIN_TOP" value="1" enum="Margin"> - Top margin, used usually for [Control] or [StyleBox] derived classes. + Top margin, usually used for [Control] or [StyleBox]-derived classes. </constant> <constant name="MARGIN_RIGHT" value="2" enum="Margin"> - Right margin, used usually for [Control] or [StyleBox] derived classes. + Right margin, usually used for [Control] or [StyleBox]-derived classes. </constant> <constant name="MARGIN_BOTTOM" value="3" enum="Margin"> - Bottom margin, used usually for [Control] or [StyleBox] derived classes. + Bottom margin, usually used for [Control] or [StyleBox]-derived classes. </constant> <constant name="CORNER_TOP_LEFT" value="0" enum="Corner"> + Top-left corner. </constant> <constant name="CORNER_TOP_RIGHT" value="1" enum="Corner"> + Top-right corner. </constant> <constant name="CORNER_BOTTOM_RIGHT" value="2" enum="Corner"> + Bottom-right corner. </constant> <constant name="CORNER_BOTTOM_LEFT" value="3" enum="Corner"> + Bottom-left corner. </constant> <constant name="VERTICAL" value="1" enum="Orientation"> - General vertical alignment, used usually for [Separator], [ScrollBar], [Slider], etc. + General vertical alignment, usually used for [Separator], [ScrollBar], [Slider], etc. </constant> <constant name="HORIZONTAL" value="0" enum="Orientation"> - General horizontal alignment, used usually for [Separator], [ScrollBar], [Slider], etc. + General horizontal alignment, usually used for [Separator], [ScrollBar], [Slider], etc. </constant> <constant name="HALIGN_LEFT" value="0" enum="HAlign"> Horizontal left alignment, usually for text-derived classes. @@ -127,1017 +132,1033 @@ Vertical bottom alignment, usually for text-derived classes. </constant> <constant name="SPKEY" value="16777216"> - Scancodes with this bit applied are non printable. + Scancodes with this bit applied are non-printable. </constant> <constant name="KEY_ESCAPE" value="16777217" enum="KeyList"> - Escape Key + Escape key. </constant> <constant name="KEY_TAB" value="16777218" enum="KeyList"> - Tab Key + Tab key. </constant> <constant name="KEY_BACKTAB" value="16777219" enum="KeyList"> - Shift-Tab Key + Shift+Tab key. </constant> <constant name="KEY_BACKSPACE" value="16777220" enum="KeyList"> - Backspace Key + Backspace key. </constant> <constant name="KEY_ENTER" value="16777221" enum="KeyList"> - Return Key (On Main Keyboard) + Return key (on the main keyboard). </constant> <constant name="KEY_KP_ENTER" value="16777222" enum="KeyList"> - Enter Key (On Numpad) + Enter key on the numeric keypad. </constant> <constant name="KEY_INSERT" value="16777223" enum="KeyList"> - Insert Key + Insert key. </constant> <constant name="KEY_DELETE" value="16777224" enum="KeyList"> - Delete Key + Delete key. </constant> <constant name="KEY_PAUSE" value="16777225" enum="KeyList"> - Pause Key + Pause key. </constant> <constant name="KEY_PRINT" value="16777226" enum="KeyList"> - Printscreen Key + Print Screen key. </constant> <constant name="KEY_SYSREQ" value="16777227" enum="KeyList"> - System Request Key + System Request key. </constant> <constant name="KEY_CLEAR" value="16777228" enum="KeyList"> - Clear Key + Clear key. </constant> <constant name="KEY_HOME" value="16777229" enum="KeyList"> - Home Key + Home key. </constant> <constant name="KEY_END" value="16777230" enum="KeyList"> - End Key + End key. </constant> <constant name="KEY_LEFT" value="16777231" enum="KeyList"> - Left Arrow Key + Left arrow key. </constant> <constant name="KEY_UP" value="16777232" enum="KeyList"> - Up Arrow Key + Up arrow key. </constant> <constant name="KEY_RIGHT" value="16777233" enum="KeyList"> - Right Arrow Key + Right arrow key. </constant> <constant name="KEY_DOWN" value="16777234" enum="KeyList"> - Down Arrow Key + Down arrow key. </constant> <constant name="KEY_PAGEUP" value="16777235" enum="KeyList"> - Pageup Key + Page Up key. </constant> <constant name="KEY_PAGEDOWN" value="16777236" enum="KeyList"> - Pagedown Key + Page Down key. </constant> <constant name="KEY_SHIFT" value="16777237" enum="KeyList"> - Shift Key + Shift key. </constant> <constant name="KEY_CONTROL" value="16777238" enum="KeyList"> - Control Key + Control key. </constant> <constant name="KEY_META" value="16777239" enum="KeyList"> - Meta Key + Meta key. </constant> <constant name="KEY_ALT" value="16777240" enum="KeyList"> - Alt Key + Alt key. </constant> <constant name="KEY_CAPSLOCK" value="16777241" enum="KeyList"> - Capslock Key + Caps Lock key. </constant> <constant name="KEY_NUMLOCK" value="16777242" enum="KeyList"> - Numlock Key + Num Lock key. </constant> <constant name="KEY_SCROLLLOCK" value="16777243" enum="KeyList"> - Scrolllock Key + Scroll Lock key. </constant> <constant name="KEY_F1" value="16777244" enum="KeyList"> - F1 Key + F1 key. </constant> <constant name="KEY_F2" value="16777245" enum="KeyList"> - F2 Key + F2 key. </constant> <constant name="KEY_F3" value="16777246" enum="KeyList"> - F3 Key + F3 key. </constant> <constant name="KEY_F4" value="16777247" enum="KeyList"> - F4 Key + F4 key. </constant> <constant name="KEY_F5" value="16777248" enum="KeyList"> - F5 Key + F5 key. </constant> <constant name="KEY_F6" value="16777249" enum="KeyList"> - F6 Key + F6 key. </constant> <constant name="KEY_F7" value="16777250" enum="KeyList"> - F7 Key + F7 key. </constant> <constant name="KEY_F8" value="16777251" enum="KeyList"> - F8 Key + F8 key. </constant> <constant name="KEY_F9" value="16777252" enum="KeyList"> - F9 Key + F9 key. </constant> <constant name="KEY_F10" value="16777253" enum="KeyList"> - F10 Key + F10 key. </constant> <constant name="KEY_F11" value="16777254" enum="KeyList"> - F11 Key + F11 key. </constant> <constant name="KEY_F12" value="16777255" enum="KeyList"> - F12 Key + F12 key. </constant> <constant name="KEY_F13" value="16777256" enum="KeyList"> - F13 Key + F13 key. </constant> <constant name="KEY_F14" value="16777257" enum="KeyList"> - F14 Key + F14 key. </constant> <constant name="KEY_F15" value="16777258" enum="KeyList"> - F15 Key + F15 key. </constant> <constant name="KEY_F16" value="16777259" enum="KeyList"> - F16 Key + F16 key. </constant> <constant name="KEY_KP_MULTIPLY" value="16777345" enum="KeyList"> - Multiply Key on Numpad + Multiply (*) key on the numeric keypad. </constant> <constant name="KEY_KP_DIVIDE" value="16777346" enum="KeyList"> - Divide Key on Numpad + Divide (/) key on the numeric keypad. </constant> <constant name="KEY_KP_SUBTRACT" value="16777347" enum="KeyList"> - Subtract Key on Numpad + Subtract (-) key on the numeric keypad. </constant> <constant name="KEY_KP_PERIOD" value="16777348" enum="KeyList"> - Period Key on Numpad + Period (.) key on the numeric keypad. </constant> <constant name="KEY_KP_ADD" value="16777349" enum="KeyList"> - Add Key on Numpad + Add (+) key on the numeric keypad. </constant> <constant name="KEY_KP_0" value="16777350" enum="KeyList"> - Number 0 on Numpad + Number 0 on the numeric keypad. </constant> <constant name="KEY_KP_1" value="16777351" enum="KeyList"> - Number 1 on Numpad + Number 1 on the numeric keypad. </constant> <constant name="KEY_KP_2" value="16777352" enum="KeyList"> - Number 2 on Numpad + Number 2 on the numeric keypad. </constant> <constant name="KEY_KP_3" value="16777353" enum="KeyList"> - Number 3 on Numpad + Number 3 on the numeric keypad. </constant> <constant name="KEY_KP_4" value="16777354" enum="KeyList"> - Number 4 on Numpad + Number 4 on the numeric keypad. </constant> <constant name="KEY_KP_5" value="16777355" enum="KeyList"> - Number 5 on Numpad + Number 5 on the numeric keypad. </constant> <constant name="KEY_KP_6" value="16777356" enum="KeyList"> - Number 6 on Numpad + Number 6 on the numeric keypad. </constant> <constant name="KEY_KP_7" value="16777357" enum="KeyList"> - Number 7 on Numpad + Number 7 on the numeric keypad. </constant> <constant name="KEY_KP_8" value="16777358" enum="KeyList"> - Number 8 on Numpad + Number 8 on the numeric keypad. </constant> <constant name="KEY_KP_9" value="16777359" enum="KeyList"> - Number 9 on Numpad + Number 9 on the numeric keypad. </constant> <constant name="KEY_SUPER_L" value="16777260" enum="KeyList"> - Left Super Key (Windows Key) + Left Super key (Windows key). </constant> <constant name="KEY_SUPER_R" value="16777261" enum="KeyList"> - Right Super Key (Windows Key) + Right Super key (Windows key). </constant> <constant name="KEY_MENU" value="16777262" enum="KeyList"> - Context menu key + Context menu key. </constant> <constant name="KEY_HYPER_L" value="16777263" enum="KeyList"> - Left Hyper Key + Left Hyper key. </constant> <constant name="KEY_HYPER_R" value="16777264" enum="KeyList"> - Right Hyper Key + Right Hyper key. </constant> <constant name="KEY_HELP" value="16777265" enum="KeyList"> - Help key + Help key. </constant> <constant name="KEY_DIRECTION_L" value="16777266" enum="KeyList"> - Left Direction Key + Left Direction key. </constant> <constant name="KEY_DIRECTION_R" value="16777267" enum="KeyList"> - Right Direction Key + Right Direction key. </constant> <constant name="KEY_BACK" value="16777280" enum="KeyList"> - Back key + Back key. </constant> <constant name="KEY_FORWARD" value="16777281" enum="KeyList"> - Forward key + Forward key. </constant> <constant name="KEY_STOP" value="16777282" enum="KeyList"> - Stop key + Stop key. </constant> <constant name="KEY_REFRESH" value="16777283" enum="KeyList"> - Refresh key + Refresh key. </constant> <constant name="KEY_VOLUMEDOWN" value="16777284" enum="KeyList"> - Volume down key + Volume down key. </constant> <constant name="KEY_VOLUMEMUTE" value="16777285" enum="KeyList"> - Mute volume key + Mute volume key. </constant> <constant name="KEY_VOLUMEUP" value="16777286" enum="KeyList"> - Volume up key + Volume up key. </constant> <constant name="KEY_BASSBOOST" value="16777287" enum="KeyList"> - Bass Boost Key + Bass Boost key. </constant> <constant name="KEY_BASSUP" value="16777288" enum="KeyList"> - Bass Up Key + Bass up key. </constant> <constant name="KEY_BASSDOWN" value="16777289" enum="KeyList"> - Bass Down Key + Bass down key. </constant> <constant name="KEY_TREBLEUP" value="16777290" enum="KeyList"> - Treble Up Key + Treble up key. </constant> <constant name="KEY_TREBLEDOWN" value="16777291" enum="KeyList"> - Treble Down Key + Treble down key. </constant> <constant name="KEY_MEDIAPLAY" value="16777292" enum="KeyList"> - Media play key + Media play key. </constant> <constant name="KEY_MEDIASTOP" value="16777293" enum="KeyList"> - Media stop key + Media stop key. </constant> <constant name="KEY_MEDIAPREVIOUS" value="16777294" enum="KeyList"> - Previous song key + Previous song key. </constant> <constant name="KEY_MEDIANEXT" value="16777295" enum="KeyList"> - Next song key + Next song key. </constant> <constant name="KEY_MEDIARECORD" value="16777296" enum="KeyList"> - Media record key + Media record key. </constant> <constant name="KEY_HOMEPAGE" value="16777297" enum="KeyList"> - Home page key + Home page key. </constant> <constant name="KEY_FAVORITES" value="16777298" enum="KeyList"> - Favorites key + Favorites key. </constant> <constant name="KEY_SEARCH" value="16777299" enum="KeyList"> - Search key + Search key. </constant> <constant name="KEY_STANDBY" value="16777300" enum="KeyList"> - Standby Key + Standby key. </constant> <constant name="KEY_OPENURL" value="16777301" enum="KeyList"> - Open URL / Launch Browser Key + Open URL / Launch Browser key. </constant> <constant name="KEY_LAUNCHMAIL" value="16777302" enum="KeyList"> - Launch Mail Key + Launch Mail key. </constant> <constant name="KEY_LAUNCHMEDIA" value="16777303" enum="KeyList"> - Launch Media Key + Launch Media key. </constant> <constant name="KEY_LAUNCH0" value="16777304" enum="KeyList"> - Launch Shortcut 0 Key + Launch Shortcut 0 key. </constant> <constant name="KEY_LAUNCH1" value="16777305" enum="KeyList"> - Launch Shortcut 1 Key + Launch Shortcut 1 key. </constant> <constant name="KEY_LAUNCH2" value="16777306" enum="KeyList"> - Launch Shortcut 2 Key + Launch Shortcut 2 key. </constant> <constant name="KEY_LAUNCH3" value="16777307" enum="KeyList"> - Launch Shortcut 3 Key + Launch Shortcut 3 key. </constant> <constant name="KEY_LAUNCH4" value="16777308" enum="KeyList"> - Launch Shortcut 4 Key + Launch Shortcut 4 key. </constant> <constant name="KEY_LAUNCH5" value="16777309" enum="KeyList"> - Launch Shortcut 5 Key + Launch Shortcut 5 key. </constant> <constant name="KEY_LAUNCH6" value="16777310" enum="KeyList"> - Launch Shortcut 6 Key + Launch Shortcut 6 key. </constant> <constant name="KEY_LAUNCH7" value="16777311" enum="KeyList"> - Launch Shortcut 7 Key + Launch Shortcut 7 key. </constant> <constant name="KEY_LAUNCH8" value="16777312" enum="KeyList"> - Launch Shortcut 8 Key + Launch Shortcut 8 key. </constant> <constant name="KEY_LAUNCH9" value="16777313" enum="KeyList"> - Launch Shortcut 9 Key + Launch Shortcut 9 key. </constant> <constant name="KEY_LAUNCHA" value="16777314" enum="KeyList"> - Launch Shortcut A Key + Launch Shortcut A key. </constant> <constant name="KEY_LAUNCHB" value="16777315" enum="KeyList"> - Launch Shortcut B Key + Launch Shortcut B key. </constant> <constant name="KEY_LAUNCHC" value="16777316" enum="KeyList"> - Launch Shortcut C Key + Launch Shortcut C key. </constant> <constant name="KEY_LAUNCHD" value="16777317" enum="KeyList"> - Launch Shortcut D Key + Launch Shortcut D key. </constant> <constant name="KEY_LAUNCHE" value="16777318" enum="KeyList"> - Launch Shortcut E Key + Launch Shortcut E key. </constant> <constant name="KEY_LAUNCHF" value="16777319" enum="KeyList"> - Launch Shortcut F Key + Launch Shortcut F key. </constant> <constant name="KEY_UNKNOWN" value="33554431" enum="KeyList"> - Unknown Key + Unknown key. </constant> <constant name="KEY_SPACE" value="32" enum="KeyList"> - Space Key + Space key. </constant> <constant name="KEY_EXCLAM" value="33" enum="KeyList"> - ! key + ! key. </constant> <constant name="KEY_QUOTEDBL" value="34" enum="KeyList"> - " key + " key. </constant> <constant name="KEY_NUMBERSIGN" value="35" enum="KeyList"> - # key + # key. </constant> <constant name="KEY_DOLLAR" value="36" enum="KeyList"> - $ key + $ key. </constant> <constant name="KEY_PERCENT" value="37" enum="KeyList"> - % key + % key. </constant> <constant name="KEY_AMPERSAND" value="38" enum="KeyList"> - & key + & key. </constant> <constant name="KEY_APOSTROPHE" value="39" enum="KeyList"> - ' key + ' key. </constant> <constant name="KEY_PARENLEFT" value="40" enum="KeyList"> - ( key + ( key. </constant> <constant name="KEY_PARENRIGHT" value="41" enum="KeyList"> - ) key + ) key. </constant> <constant name="KEY_ASTERISK" value="42" enum="KeyList"> - * key + * key. </constant> <constant name="KEY_PLUS" value="43" enum="KeyList"> - + key + + key. </constant> <constant name="KEY_COMMA" value="44" enum="KeyList"> - , key + , key. </constant> <constant name="KEY_MINUS" value="45" enum="KeyList"> - - key + - key. </constant> <constant name="KEY_PERIOD" value="46" enum="KeyList"> - . key + . key. </constant> <constant name="KEY_SLASH" value="47" enum="KeyList"> - / key + / key. </constant> <constant name="KEY_0" value="48" enum="KeyList"> - Number 0 + Number 0. </constant> <constant name="KEY_1" value="49" enum="KeyList"> - Number 1 + Number 1. </constant> <constant name="KEY_2" value="50" enum="KeyList"> - Number 2 + Number 2. </constant> <constant name="KEY_3" value="51" enum="KeyList"> - Number 3 + Number 3. </constant> <constant name="KEY_4" value="52" enum="KeyList"> - Number 4 + Number 4. </constant> <constant name="KEY_5" value="53" enum="KeyList"> - Number 5 + Number 5. </constant> <constant name="KEY_6" value="54" enum="KeyList"> - Number 6 + Number 6. </constant> <constant name="KEY_7" value="55" enum="KeyList"> - Number 7 + Number 7. </constant> <constant name="KEY_8" value="56" enum="KeyList"> - Number 8 + Number 8. </constant> <constant name="KEY_9" value="57" enum="KeyList"> - Number 9 + Number 9. </constant> <constant name="KEY_COLON" value="58" enum="KeyList"> - : key + : key. </constant> <constant name="KEY_SEMICOLON" value="59" enum="KeyList"> - ; key + ; key. </constant> <constant name="KEY_LESS" value="60" enum="KeyList"> - Lower than key + < key. </constant> <constant name="KEY_EQUAL" value="61" enum="KeyList"> - = key + = key. </constant> <constant name="KEY_GREATER" value="62" enum="KeyList"> - Greater than key + > key. </constant> <constant name="KEY_QUESTION" value="63" enum="KeyList"> - ? key + ? key. </constant> <constant name="KEY_AT" value="64" enum="KeyList"> - @ key + @ key. </constant> <constant name="KEY_A" value="65" enum="KeyList"> - A Key + A key. </constant> <constant name="KEY_B" value="66" enum="KeyList"> - B Key + B key. </constant> <constant name="KEY_C" value="67" enum="KeyList"> - C Key + C key. </constant> <constant name="KEY_D" value="68" enum="KeyList"> - D Key + D key. </constant> <constant name="KEY_E" value="69" enum="KeyList"> - E Key + E key. </constant> <constant name="KEY_F" value="70" enum="KeyList"> - F Key + F key. </constant> <constant name="KEY_G" value="71" enum="KeyList"> - G Key + G key. </constant> <constant name="KEY_H" value="72" enum="KeyList"> - H Key + H key. </constant> <constant name="KEY_I" value="73" enum="KeyList"> - I Key + I key. </constant> <constant name="KEY_J" value="74" enum="KeyList"> - J Key + J key. </constant> <constant name="KEY_K" value="75" enum="KeyList"> - K Key + K key. </constant> <constant name="KEY_L" value="76" enum="KeyList"> - L Key + L key. </constant> <constant name="KEY_M" value="77" enum="KeyList"> - M Key + M key. </constant> <constant name="KEY_N" value="78" enum="KeyList"> - N Key + N key. </constant> <constant name="KEY_O" value="79" enum="KeyList"> - O Key + O key. </constant> <constant name="KEY_P" value="80" enum="KeyList"> - P Key + P key. </constant> <constant name="KEY_Q" value="81" enum="KeyList"> - Q Key + Q key. </constant> <constant name="KEY_R" value="82" enum="KeyList"> - R Key + R key. </constant> <constant name="KEY_S" value="83" enum="KeyList"> - S Key + S key. </constant> <constant name="KEY_T" value="84" enum="KeyList"> - T Key + T key. </constant> <constant name="KEY_U" value="85" enum="KeyList"> - U Key + U key. </constant> <constant name="KEY_V" value="86" enum="KeyList"> - V Key + V key. </constant> <constant name="KEY_W" value="87" enum="KeyList"> - W Key + W key. </constant> <constant name="KEY_X" value="88" enum="KeyList"> - X Key + X key. </constant> <constant name="KEY_Y" value="89" enum="KeyList"> - Y Key + Y key. </constant> <constant name="KEY_Z" value="90" enum="KeyList"> - Z Key + Z key. </constant> <constant name="KEY_BRACKETLEFT" value="91" enum="KeyList"> - [ key + [ key. </constant> <constant name="KEY_BACKSLASH" value="92" enum="KeyList"> - \ key + \ key. </constant> <constant name="KEY_BRACKETRIGHT" value="93" enum="KeyList"> - ] key + ] key. </constant> <constant name="KEY_ASCIICIRCUM" value="94" enum="KeyList"> - ^ key + ^ key. </constant> <constant name="KEY_UNDERSCORE" value="95" enum="KeyList"> - _ key + _ key. </constant> <constant name="KEY_QUOTELEFT" value="96" enum="KeyList"> - Left Quote Key + ` key. </constant> <constant name="KEY_BRACELEFT" value="123" enum="KeyList"> - { key + { key. </constant> <constant name="KEY_BAR" value="124" enum="KeyList"> - | key + | key. </constant> <constant name="KEY_BRACERIGHT" value="125" enum="KeyList"> - } key + } key. </constant> <constant name="KEY_ASCIITILDE" value="126" enum="KeyList"> - ~ key + ~ key. </constant> <constant name="KEY_NOBREAKSPACE" value="160" enum="KeyList"> + Non-breakable space key. </constant> <constant name="KEY_EXCLAMDOWN" value="161" enum="KeyList"> + ¡ key. </constant> <constant name="KEY_CENT" value="162" enum="KeyList"> - ¢ key + ¢ key. </constant> <constant name="KEY_STERLING" value="163" enum="KeyList"> + £ key. </constant> <constant name="KEY_CURRENCY" value="164" enum="KeyList"> + ¤ key. </constant> <constant name="KEY_YEN" value="165" enum="KeyList"> - Yen Key + ¥ key. </constant> <constant name="KEY_BROKENBAR" value="166" enum="KeyList"> - ¦ key + ¦ key. </constant> <constant name="KEY_SECTION" value="167" enum="KeyList"> - § key + § key. </constant> <constant name="KEY_DIAERESIS" value="168" enum="KeyList"> - ¨ key + ¨ key. </constant> <constant name="KEY_COPYRIGHT" value="169" enum="KeyList"> - © key + © key. </constant> <constant name="KEY_ORDFEMININE" value="170" enum="KeyList"> + ª key. </constant> <constant name="KEY_GUILLEMOTLEFT" value="171" enum="KeyList"> - « key + « key. </constant> <constant name="KEY_NOTSIGN" value="172" enum="KeyList"> - » key + ¬ key. </constant> <constant name="KEY_HYPHEN" value="173" enum="KeyList"> - ‐ key + Soft hyphen key. </constant> <constant name="KEY_REGISTERED" value="174" enum="KeyList"> - ® key + ® key. </constant> <constant name="KEY_MACRON" value="175" enum="KeyList"> - Macron Key + ¯ key. </constant> <constant name="KEY_DEGREE" value="176" enum="KeyList"> - ° key + ° key. </constant> <constant name="KEY_PLUSMINUS" value="177" enum="KeyList"> - ± key + ± key. </constant> <constant name="KEY_TWOSUPERIOR" value="178" enum="KeyList"> - ² key + ² key. </constant> <constant name="KEY_THREESUPERIOR" value="179" enum="KeyList"> - ³ key + ³ key. </constant> <constant name="KEY_ACUTE" value="180" enum="KeyList"> - ´ key + ´ key. </constant> <constant name="KEY_MU" value="181" enum="KeyList"> - µ key + µ key. </constant> <constant name="KEY_PARAGRAPH" value="182" enum="KeyList"> - Paragraph Key + ¶ key. </constant> <constant name="KEY_PERIODCENTERED" value="183" enum="KeyList"> - · key + · key. </constant> <constant name="KEY_CEDILLA" value="184" enum="KeyList"> - ¬ key + ¸ key. </constant> <constant name="KEY_ONESUPERIOR" value="185" enum="KeyList"> - ¹ key + ¹ key. </constant> <constant name="KEY_MASCULINE" value="186" enum="KeyList"> - ♂ key + º key. </constant> <constant name="KEY_GUILLEMOTRIGHT" value="187" enum="KeyList"> - » key + » key. </constant> <constant name="KEY_ONEQUARTER" value="188" enum="KeyList"> - ¼ key + ¼ key. </constant> <constant name="KEY_ONEHALF" value="189" enum="KeyList"> - ½ key + ½ key. </constant> <constant name="KEY_THREEQUARTERS" value="190" enum="KeyList"> - ¾ key + ¾ key. </constant> <constant name="KEY_QUESTIONDOWN" value="191" enum="KeyList"> - ¿ key + ¿ key. </constant> <constant name="KEY_AGRAVE" value="192" enum="KeyList"> - à key + À key. </constant> <constant name="KEY_AACUTE" value="193" enum="KeyList"> - á key + Á key. </constant> <constant name="KEY_ACIRCUMFLEX" value="194" enum="KeyList"> - â key + Â key. </constant> <constant name="KEY_ATILDE" value="195" enum="KeyList"> - ã key + Ã key. </constant> <constant name="KEY_ADIAERESIS" value="196" enum="KeyList"> - ä key + Ä key. </constant> <constant name="KEY_ARING" value="197" enum="KeyList"> - å key + Å key. </constant> <constant name="KEY_AE" value="198" enum="KeyList"> - æ key + Æ key. </constant> <constant name="KEY_CCEDILLA" value="199" enum="KeyList"> - ç key + Ç key. </constant> <constant name="KEY_EGRAVE" value="200" enum="KeyList"> - è key + È key. </constant> <constant name="KEY_EACUTE" value="201" enum="KeyList"> - é key + É key. </constant> <constant name="KEY_ECIRCUMFLEX" value="202" enum="KeyList"> - ê key + Ê key. </constant> <constant name="KEY_EDIAERESIS" value="203" enum="KeyList"> - ë key + Ë key. </constant> <constant name="KEY_IGRAVE" value="204" enum="KeyList"> - ì key + Ì key. </constant> <constant name="KEY_IACUTE" value="205" enum="KeyList"> - í key + Í key. </constant> <constant name="KEY_ICIRCUMFLEX" value="206" enum="KeyList"> - î key + Î key. </constant> <constant name="KEY_IDIAERESIS" value="207" enum="KeyList"> - ë key + Ï key. </constant> <constant name="KEY_ETH" value="208" enum="KeyList"> - ð key + Ð key. </constant> <constant name="KEY_NTILDE" value="209" enum="KeyList"> - ñ key + Ñ key. </constant> <constant name="KEY_OGRAVE" value="210" enum="KeyList"> - ò key + Ò key. </constant> <constant name="KEY_OACUTE" value="211" enum="KeyList"> - ó key + Ó key. </constant> <constant name="KEY_OCIRCUMFLEX" value="212" enum="KeyList"> - ô key + Ô key. </constant> <constant name="KEY_OTILDE" value="213" enum="KeyList"> - õ key + Õ key. </constant> <constant name="KEY_ODIAERESIS" value="214" enum="KeyList"> - ö key + Ö key. </constant> <constant name="KEY_MULTIPLY" value="215" enum="KeyList"> - × key + × key. </constant> <constant name="KEY_OOBLIQUE" value="216" enum="KeyList"> - ø key + Ø key. </constant> <constant name="KEY_UGRAVE" value="217" enum="KeyList"> - ù key + Ù key. </constant> <constant name="KEY_UACUTE" value="218" enum="KeyList"> - ú key + Ú key. </constant> <constant name="KEY_UCIRCUMFLEX" value="219" enum="KeyList"> - û key + Û key. </constant> <constant name="KEY_UDIAERESIS" value="220" enum="KeyList"> - ü key + Ü key. </constant> <constant name="KEY_YACUTE" value="221" enum="KeyList"> - ý key + Ý key. </constant> <constant name="KEY_THORN" value="222" enum="KeyList"> - þ key + Þ key. </constant> <constant name="KEY_SSHARP" value="223" enum="KeyList"> - ß key + ß key. </constant> <constant name="KEY_DIVISION" value="247" enum="KeyList"> - ÷ key + ÷ key. </constant> <constant name="KEY_YDIAERESIS" value="255" enum="KeyList"> - ÿ key + ÿ key. </constant> <constant name="KEY_CODE_MASK" value="33554431" enum="KeyModifierMask"> - Key Code Mask + Key Code mask. </constant> <constant name="KEY_MODIFIER_MASK" value="-16777216" enum="KeyModifierMask"> - Modifier Key Mask + Modifier key mask. </constant> <constant name="KEY_MASK_SHIFT" value="33554432" enum="KeyModifierMask"> - Shift Key Mask + Shift key mask. </constant> <constant name="KEY_MASK_ALT" value="67108864" enum="KeyModifierMask"> - Alt Key Mask + Alt key mask. </constant> <constant name="KEY_MASK_META" value="134217728" enum="KeyModifierMask"> - Meta Key Mask + Meta key mask. </constant> <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask"> - CTRL Key Mask + Ctrl key mask. </constant> <constant name="KEY_MASK_CMD" value="268435456" enum="KeyModifierMask"> - CMD Key Mask + Cmd key mask. </constant> <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask"> - Keypad Key Mask + Keypad key mask. </constant> <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask"> - Group Switch Key Mask + Group Switch key mask. </constant> <constant name="BUTTON_LEFT" value="1" enum="ButtonList"> - Left Mouse Button + Left mouse button. </constant> <constant name="BUTTON_RIGHT" value="2" enum="ButtonList"> - Right Mouse Button + Right mouse button. </constant> <constant name="BUTTON_MIDDLE" value="3" enum="ButtonList"> - Middle Mouse Button + Middle mouse button. </constant> <constant name="BUTTON_XBUTTON1" value="8" enum="ButtonList"> - Extra Mouse Button 1 + Extra mouse button 1 (only present on some mice). </constant> <constant name="BUTTON_XBUTTON2" value="9" enum="ButtonList"> - Extra Mouse Button 2 + Extra mouse button 2 (only present on some mice). </constant> <constant name="BUTTON_WHEEL_UP" value="4" enum="ButtonList"> - Mouse wheel up + Mouse wheel up. </constant> <constant name="BUTTON_WHEEL_DOWN" value="5" enum="ButtonList"> - Mouse wheel down + Mouse wheel down. </constant> <constant name="BUTTON_WHEEL_LEFT" value="6" enum="ButtonList"> - Mouse wheel left button + Mouse wheel left button (only present on some mice). </constant> <constant name="BUTTON_WHEEL_RIGHT" value="7" enum="ButtonList"> - Mouse wheel right button + Mouse wheel right button (only present on some mice). </constant> <constant name="BUTTON_MASK_LEFT" value="1" enum="ButtonList"> - Left Mouse Button Mask + Left mouse button mask. </constant> <constant name="BUTTON_MASK_RIGHT" value="2" enum="ButtonList"> - Right Mouse Button Mask + Right mouse button mask. </constant> <constant name="BUTTON_MASK_MIDDLE" value="4" enum="ButtonList"> - Middle Mouse Button Mask + Middle mouse button mask. </constant> <constant name="BUTTON_MASK_XBUTTON1" value="128" enum="ButtonList"> - Extra Mouse Button 1 Mask + Extra mouse button 1 mask. </constant> <constant name="BUTTON_MASK_XBUTTON2" value="256" enum="ButtonList"> - Extra Mouse Button 2 Mask + Extra mouse button 2 mask. </constant> <constant name="JOY_BUTTON_0" value="0" enum="JoystickList"> - Joypad Button 0 + Gamepad button 0. </constant> <constant name="JOY_BUTTON_1" value="1" enum="JoystickList"> - Joypad Button 1 + Gamepad button 1. </constant> <constant name="JOY_BUTTON_2" value="2" enum="JoystickList"> - Joypad Button 2 + Gamepad button 2. </constant> <constant name="JOY_BUTTON_3" value="3" enum="JoystickList"> - Joypad Button 3 + Gamepad button 3. </constant> <constant name="JOY_BUTTON_4" value="4" enum="JoystickList"> - Joypad Button 4 + Gamepad button 4. </constant> <constant name="JOY_BUTTON_5" value="5" enum="JoystickList"> - Joypad Button 5 + Gamepad button 5. </constant> <constant name="JOY_BUTTON_6" value="6" enum="JoystickList"> - Joypad Button 6 + Gamepad button 6. </constant> <constant name="JOY_BUTTON_7" value="7" enum="JoystickList"> - Joypad Button 7 + Gamepad button 7. </constant> <constant name="JOY_BUTTON_8" value="8" enum="JoystickList"> - Joypad Button 8 + Gamepad button 8. </constant> <constant name="JOY_BUTTON_9" value="9" enum="JoystickList"> - Joypad Button 9 + Gamepad button 9. </constant> <constant name="JOY_BUTTON_10" value="10" enum="JoystickList"> - Joypad Button 10 + Gamepad button 10. </constant> <constant name="JOY_BUTTON_11" value="11" enum="JoystickList"> - Joypad Button 11 + Gamepad button 11. </constant> <constant name="JOY_BUTTON_12" value="12" enum="JoystickList"> - Joypad Button 12 + Gamepad button 12. </constant> <constant name="JOY_BUTTON_13" value="13" enum="JoystickList"> - Joypad Button 13 + Gamepad button 13. </constant> <constant name="JOY_BUTTON_14" value="14" enum="JoystickList"> - Joypad Button 14 + Gamepad button 14. </constant> <constant name="JOY_BUTTON_15" value="15" enum="JoystickList"> - Joypad Button 15 + Gamepad button 15. </constant> <constant name="JOY_BUTTON_MAX" value="16" enum="JoystickList"> Represents the maximum number of joystick buttons supported. </constant> <constant name="JOY_SONY_CIRCLE" value="1" enum="JoystickList"> - DUALSHOCK circle button + DualShock circle button. </constant> <constant name="JOY_SONY_X" value="0" enum="JoystickList"> - DUALSHOCK X button + DualShock X button. </constant> <constant name="JOY_SONY_SQUARE" value="2" enum="JoystickList"> - DUALSHOCK square button + DualShock square button. </constant> <constant name="JOY_SONY_TRIANGLE" value="3" enum="JoystickList"> - DUALSHOCK triangle button + DualShock triangle button. </constant> <constant name="JOY_XBOX_B" value="1" enum="JoystickList"> - XBOX controller B button + Xbox controller B button. </constant> <constant name="JOY_XBOX_A" value="0" enum="JoystickList"> - XBOX controller A button + Xbox controller A button. </constant> <constant name="JOY_XBOX_X" value="2" enum="JoystickList"> - XBOX controller X button + Xbox controller X button. </constant> <constant name="JOY_XBOX_Y" value="3" enum="JoystickList"> - XBOX controller Y button + Xbox controller Y button. </constant> <constant name="JOY_DS_A" value="1" enum="JoystickList"> - DualShock controller A button + Nintendo controller A button. </constant> <constant name="JOY_DS_B" value="0" enum="JoystickList"> - DualShock controller B button + Nintendo controller B button. </constant> <constant name="JOY_DS_X" value="3" enum="JoystickList"> - DualShock controller X button + Nintendo controller X button. </constant> <constant name="JOY_DS_Y" value="2" enum="JoystickList"> - DualShock controller Y button + Nintendo controller Y button. </constant> <constant name="JOY_VR_GRIP" value="2" enum="JoystickList"> - Grip (side) buttons on a VR controller + Grip (side) buttons on a VR controller. </constant> <constant name="JOY_VR_PAD" value="14" enum="JoystickList"> - Push down on the touchpad or main joystick on a VR controller + Push down on the touchpad or main joystick on a VR controller. </constant> <constant name="JOY_VR_TRIGGER" value="15" enum="JoystickList"> - Trigger on a VR controller + Trigger on a VR controller. </constant> <constant name="JOY_OCULUS_AX" value="7" enum="JoystickList"> - A button on the right Oculus Touch controller, X button on the left controller (also when used in OpenVR) + A button on the right Oculus Touch controller, X button on the left controller (also when used in OpenVR). </constant> <constant name="JOY_OCULUS_BY" value="1" enum="JoystickList"> - B button on the right Oculus Touch controller, Y button on the left controller (also when used in OpenVR) + B button on the right Oculus Touch controller, Y button on the left controller (also when used in OpenVR). </constant> <constant name="JOY_OCULUS_MENU" value="3" enum="JoystickList"> Menu button on either Oculus Touch controller. </constant> <constant name="JOY_OPENVR_MENU" value="1" enum="JoystickList"> - Menu button in OpenVR (Except when Oculus Touch controllers are used) + Menu button in OpenVR (Except when Oculus Touch controllers are used). </constant> <constant name="JOY_SELECT" value="10" enum="JoystickList"> - Joypad Button Select + Gamepad button Select. </constant> <constant name="JOY_START" value="11" enum="JoystickList"> - Joypad Button Start + Gamepad button Start. </constant> <constant name="JOY_DPAD_UP" value="12" enum="JoystickList"> - Joypad DPad Up + Gamepad DPad up. </constant> <constant name="JOY_DPAD_DOWN" value="13" enum="JoystickList"> - Joypad DPad Down + Gamepad DPad down. </constant> <constant name="JOY_DPAD_LEFT" value="14" enum="JoystickList"> - Joypad DPad Left + Gamepad DPad left. </constant> <constant name="JOY_DPAD_RIGHT" value="15" enum="JoystickList"> - Joypad DPad Right + Gamepad DPad right. </constant> <constant name="JOY_L" value="4" enum="JoystickList"> - Joypad Left Shoulder Button + Gamepad left Shoulder button. </constant> <constant name="JOY_L2" value="6" enum="JoystickList"> - Joypad Left Trigger + Gamepad left trigger. </constant> <constant name="JOY_L3" value="8" enum="JoystickList"> - Joypad Left Stick Click + Gamepad left stick click. </constant> <constant name="JOY_R" value="5" enum="JoystickList"> - Joypad Right Shoulder Button + Gamepad right Shoulder button. </constant> <constant name="JOY_R2" value="7" enum="JoystickList"> - Joypad Right Trigger + Gamepad right trigger. </constant> <constant name="JOY_R3" value="9" enum="JoystickList"> - Joypad Right Stick Click + Gamepad right stick click. </constant> <constant name="JOY_AXIS_0" value="0" enum="JoystickList"> - Joypad Left Stick Horizontal Axis + Gamepad left stick horizontal axis. </constant> <constant name="JOY_AXIS_1" value="1" enum="JoystickList"> - Joypad Left Stick Vertical Axis + Gamepad left stick vertical axis. </constant> <constant name="JOY_AXIS_2" value="2" enum="JoystickList"> - Joypad Right Stick Horizontal Axis + Gamepad right stick horizontal axis. </constant> <constant name="JOY_AXIS_3" value="3" enum="JoystickList"> - Joypad Right Stick Vertical Axis + Gamepad right stick vertical axis. </constant> <constant name="JOY_AXIS_4" value="4" enum="JoystickList"> + Generic gamepad axis 4. </constant> <constant name="JOY_AXIS_5" value="5" enum="JoystickList"> + Generic gamepad axis 5. </constant> <constant name="JOY_AXIS_6" value="6" enum="JoystickList"> - Joypad Left Trigger Analog Axis + Gamepad left trigger analog axis. </constant> <constant name="JOY_AXIS_7" value="7" enum="JoystickList"> - Joypad Right Trigger Analog Axis + Gamepad right trigger analog axis. </constant> <constant name="JOY_AXIS_8" value="8" enum="JoystickList"> + Generic gamepad axis 8. </constant> <constant name="JOY_AXIS_9" value="9" enum="JoystickList"> + Generic gamepad axis 9. </constant> <constant name="JOY_AXIS_MAX" value="10" enum="JoystickList"> Represents the maximum number of joystick axes supported. </constant> <constant name="JOY_ANALOG_LX" value="0" enum="JoystickList"> - Joypad Left Stick Horizontal Axis + Gamepad left stick horizontal axis. </constant> <constant name="JOY_ANALOG_LY" value="1" enum="JoystickList"> - Joypad Left Stick Vertical Axis + Gamepad left stick vertical axis. </constant> <constant name="JOY_ANALOG_RX" value="2" enum="JoystickList"> - Joypad Right Stick Horizontal Axis + Gamepad right stick horizontal axis. </constant> <constant name="JOY_ANALOG_RY" value="3" enum="JoystickList"> - Joypad Right Stick Vertical Axis + Gamepad right stick vertical axis. </constant> <constant name="JOY_ANALOG_L2" value="6" enum="JoystickList"> - Joypad Left Analog Trigger + Gamepad left analog trigger. </constant> <constant name="JOY_ANALOG_R2" value="7" enum="JoystickList"> - Joypad Right Analog Trigger + Gamepad right analog trigger. </constant> <constant name="JOY_VR_ANALOG_TRIGGER" value="2" enum="JoystickList"> - VR Controller Analog Trigger + VR Controller analog trigger. </constant> <constant name="JOY_VR_ANALOG_GRIP" value="4" enum="JoystickList"> - VR Controller Analog Grip (side buttons) + VR Controller analog grip (side buttons). </constant> <constant name="JOY_OPENVR_TOUCHPADX" value="0" enum="JoystickList"> - OpenVR touchpad X axis (Joystick axis on Oculus Touch and Windows MR controllers) + OpenVR touchpad X axis (Joystick axis on Oculus Touch and Windows MR controllers). </constant> <constant name="JOY_OPENVR_TOUCHPADY" value="1" enum="JoystickList"> - OpenVR touchpad Y axis (Joystick axis on Oculus Touch and Windows MR controllers) + OpenVR touchpad Y axis (Joystick axis on Oculus Touch and Windows MR controllers). </constant> <constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MidiMessageList"> + MIDI note OFF message. </constant> <constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MidiMessageList"> + MIDI note ON message. </constant> <constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MidiMessageList"> + MIDI aftertouch message. </constant> <constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MidiMessageList"> + MIDI control change message. </constant> <constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MidiMessageList"> + MIDI program change message. </constant> <constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MidiMessageList"> + MIDI channel pressure message. </constant> <constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MidiMessageList"> + MIDI pitch bend message. </constant> <constant name="OK" value="0" enum="Error"> - Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to stdout. + Methods that return [enum Error] return [constant OK] when no error occurred. Note that many functions don't return an error code but will print error messages to standard output. Since [constant OK] has value 0, and all other failure codes are positive integers, it can also be used in boolean checks, e.g.: [codeblock] var err = method_that_returns_error() @@ -1293,116 +1314,142 @@ Printer on fire error. (This is an easter egg, no engine methods return this error code.) </constant> <constant name="PROPERTY_HINT_NONE" value="0" enum="PropertyHint"> - No hint for edited property. + No hint for the edited property. </constant> <constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint"> - Hints that the string is a range, defined as "min,max" or "min,max,step". This is valid for integers and floats. + Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"allow_greater"[/code] and/or [code]"allow_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,allow_greater,allow_lesser"[/code]. </constant> <constant name="PROPERTY_HINT_EXP_RANGE" value="2" enum="PropertyHint"> - Hints that the string is an exponential range, defined as "min,max" or "min,max,step". This is valid for integers and floats. + Hints that an integer or float property should be within an exponential range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"allow_greater"[/code] and/or [code]"allow_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"0.01,100,0.01,allow_greater"[/code]. </constant> <constant name="PROPERTY_HINT_ENUM" value="3" enum="PropertyHint"> - Property hint for an enumerated value, like "Hello,Something,Else". This is valid for integer, float and string properties. + Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code]. </constant> <constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint"> + Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing. </constant> <constant name="PROPERTY_HINT_LENGTH" value="5" enum="PropertyHint"> + Deprecated hint, unused. </constant> <constant name="PROPERTY_HINT_KEY_ACCEL" value="7" enum="PropertyHint"> + Deprecated hint, unused. </constant> <constant name="PROPERTY_HINT_FLAGS" value="8" enum="PropertyHint"> - Property hint for a bitmask description, for bits 0,1,2,3 and 5 the hint would be like "Bit0,Bit1,Bit2,Bit3,,Bit5". Valid only for integers. + Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code]. </constant> <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="9" enum="PropertyHint"> + Hints that an integer property is a bitmask using the optionally named 2D render layers. </constant> <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="10" enum="PropertyHint"> + Hints that an integer property is a bitmask using the optionally named 2D physics layers. </constant> <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint"> + Hints that an integer property is a bitmask using the optionally named 3D render layers. </constant> <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint"> + Hints that an integer property is a bitmask using the optionally named 3D physics layers. </constant> <constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint"> - String property is a file (so pop up a file dialog when edited). Hint string can be a set of wildcards like "*.doc". + Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. </constant> <constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint"> - String property is a directory (so pop up a file dialog when edited). + Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path. </constant> <constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint"> + Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. </constant> <constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint"> + Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path. </constant> <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint"> - String property is a resource, so open the resource popup menu when edited. + Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture"[/code]). Editing it will show a popup menu of valid resource types to instantiate. </constant> <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint"> + Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed. </constant> <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="19" enum="PropertyHint"> + Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use. </constant> <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="20" enum="PropertyHint"> + Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited. </constant> <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="21" enum="PropertyHint"> - Hints that the image is compressed using lossy compression. + Hints that an image is compressed using lossy compression. </constant> <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="22" enum="PropertyHint"> - Hints that the image is compressed using lossless compression. + Hints that an image is compressed using lossless compression. </constant> <constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags"> - Property will be used as storage (default). + The property is serialized and saved in the scene file (default). </constant> <constant name="PROPERTY_USAGE_EDITOR" value="2" enum="PropertyUsageFlags"> - Property will be visible in editor (default). + The property is shown in the editor inspector (default). </constant> <constant name="PROPERTY_USAGE_NETWORK" value="4" enum="PropertyUsageFlags"> + Deprecated usage flag, unused. </constant> <constant name="PROPERTY_USAGE_EDITOR_HELPER" value="8" enum="PropertyUsageFlags"> + Deprecated usage flag, unused. </constant> <constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags"> + The property can be checked in the editor inspector. </constant> <constant name="PROPERTY_USAGE_CHECKED" value="32" enum="PropertyUsageFlags"> + The property is checked in the editor inspector. </constant> <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="64" enum="PropertyUsageFlags"> + The property is a translatable string. </constant> <constant name="PROPERTY_USAGE_GROUP" value="128" enum="PropertyUsageFlags"> + Used to group properties together in the editor. </constant> <constant name="PROPERTY_USAGE_CATEGORY" value="256" enum="PropertyUsageFlags"> + Used to categorize properties together in the editor. </constant> <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="2048" enum="PropertyUsageFlags"> + The property does not save its state in [PackedScene]. </constant> <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="4096" enum="PropertyUsageFlags"> + Editing the property prompts the user for restarting the editor. </constant> <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192" enum="PropertyUsageFlags"> + The property is a script variable which should be serialized and saved in the scene file. </constant> <constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags"> - Default usage (storage and editor). + Default usage (storage, editor and network). </constant> <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="71" enum="PropertyUsageFlags"> + Default usage for translatable strings (storage, editor, network and internationalized). </constant> <constant name="PROPERTY_USAGE_NOEDITOR" value="5" enum="PropertyUsageFlags"> + Default usage but without showing the property in the editor (storage, network). </constant> <constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags"> - Flag for normal method + Flag for a normal method. </constant> <constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags"> - Flag for editor method + Flag for an editor method. </constant> <constant name="METHOD_FLAG_NOSCRIPT" value="4" enum="MethodFlags"> + Deprecated method flag, unused. </constant> <constant name="METHOD_FLAG_CONST" value="8" enum="MethodFlags"> - Flag for constant method + Flag for a constant method. </constant> <constant name="METHOD_FLAG_REVERSE" value="16" enum="MethodFlags"> + Deprecated method flag, unused. </constant> <constant name="METHOD_FLAG_VIRTUAL" value="32" enum="MethodFlags"> - Flag for virtual method + Flag for a virtual method. </constant> <constant name="METHOD_FLAG_FROM_SCRIPT" value="64" enum="MethodFlags"> - Flag for method from script + Deprecated method flag, unused. </constant> <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags"> - Default method flags + Default method flags. </constant> <constant name="TYPE_NIL" value="0" enum="Variant.Type"> - Variable is of type nil (only applied for null). + Variable is of type [Nil] (only applied for [code]null[/code]). </constant> <constant name="TYPE_BOOL" value="1" enum="Variant.Type"> Variable is of type [bool]. @@ -1411,7 +1458,7 @@ Variable is of type [int]. </constant> <constant name="TYPE_REAL" value="3" enum="Variant.Type"> - Variable is of type [float]/real. + Variable is of type [float] (real). </constant> <constant name="TYPE_STRING" value="4" enum="Variant.Type"> Variable is of type [String]. @@ -1486,54 +1533,79 @@ Represents the size of the [enum Variant.Type] enum. </constant> <constant name="OP_EQUAL" value="0" enum="Variant.Operator"> + Equality operator ([code]==[/code]). </constant> <constant name="OP_NOT_EQUAL" value="1" enum="Variant.Operator"> + Inequality operator ([code]!=[/code]). </constant> <constant name="OP_LESS" value="2" enum="Variant.Operator"> + Less than operator ([code]<[/code]). </constant> <constant name="OP_LESS_EQUAL" value="3" enum="Variant.Operator"> + Less than or equal operator ([code]<=[/code]). </constant> <constant name="OP_GREATER" value="4" enum="Variant.Operator"> + Greater than operator ([code]>[/code]). </constant> <constant name="OP_GREATER_EQUAL" value="5" enum="Variant.Operator"> + Greater than or equal operator ([code]>=[/code]). </constant> <constant name="OP_ADD" value="6" enum="Variant.Operator"> + Addition operator ([code]+[/code]). </constant> <constant name="OP_SUBTRACT" value="7" enum="Variant.Operator"> + Subtraction operator ([code]-[/code]). </constant> <constant name="OP_MULTIPLY" value="8" enum="Variant.Operator"> + Multiplication operator ([code]*[/code]). </constant> <constant name="OP_DIVIDE" value="9" enum="Variant.Operator"> + Division operator ([code]/[/code]). </constant> <constant name="OP_NEGATE" value="10" enum="Variant.Operator"> + Unary negation operator ([code]-[/code]). </constant> <constant name="OP_POSITIVE" value="11" enum="Variant.Operator"> + Unary plus operator ([code]+[/code]). </constant> <constant name="OP_MODULE" value="12" enum="Variant.Operator"> + Remainder/modulo operator ([code]%[/code]). </constant> <constant name="OP_STRING_CONCAT" value="13" enum="Variant.Operator"> + String concatenation 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="15" enum="Variant.Operator"> + Right shift operator ([code]>>[/code]). </constant> <constant name="OP_BIT_AND" value="16" enum="Variant.Operator"> + Bitwise AND operator ([code]&[/code]). </constant> <constant name="OP_BIT_OR" value="17" enum="Variant.Operator"> + Bitwise OR operator ([code]|[/code]). </constant> <constant name="OP_BIT_XOR" value="18" enum="Variant.Operator"> + Bitwise XOR operator ([code]^[/code]). </constant> <constant name="OP_BIT_NEGATE" value="19" enum="Variant.Operator"> + Bitwise NOT operator ([code]~[/code]). </constant> <constant name="OP_AND" value="20" enum="Variant.Operator"> + Logical AND operator ([code]and[/code] or [code]&&[/code]). </constant> <constant name="OP_OR" value="21" enum="Variant.Operator"> + Logical OR operator ([code]or[/code] or [code]||[/code]). </constant> <constant name="OP_XOR" value="22" enum="Variant.Operator"> + Logical XOR operator (not implemented in GDScript). </constant> <constant name="OP_NOT" value="23" enum="Variant.Operator"> + Logical NOT operator ([code]not[/code] or [code]![/code]). </constant> <constant name="OP_IN" value="24" enum="Variant.Operator"> + Logical IN operator ([code]in[/code]). </constant> <constant name="OP_MAX" value="25" enum="Variant.Operator"> Represents the size of the [enum Variant.Operator] enum. diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 8ec07e4d5c..7dcfa5345d 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -187,13 +187,13 @@ </method> </methods> <members> - <member name="end" type="Vector3" setter="" getter=""> + <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> Ending corner. </member> - <member name="position" type="Vector3" setter="" getter=""> + <member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> Beginning corner. </member> - <member name="size" type="Vector3" setter="" getter=""> + <member name="size" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> Size from position to end. </member> </members> diff --git a/doc/classes/ARVRAnchor.xml b/doc/classes/ARVRAnchor.xml index ff2691f7a7..2177ed8930 100644 --- a/doc/classes/ARVRAnchor.xml +++ b/doc/classes/ARVRAnchor.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVRAnchor" inherits="Spatial" category="Core" version="3.2"> <brief_description> - Anchor point in AR Space. + An anchor point in AR space. </brief_description> <description> The ARVR Anchor point is a spatial node that maps a real world location identified by the AR platform to a position within the game world. For example, as long as plane detection in ARKit is on, ARKit will identify and update the position of planes (tables, floors, etc) and create anchors for them. - This node is mapped to one of the anchors through its unique id. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the id and the nodes will simply remain on 0,0,0 until a plane is recognized. + This node is mapped to one of the anchors through its unique ID. When you receive a signal that a new anchor is available, you should add this node to your scene for that anchor. You can predefine nodes and set the ID; the nodes will simply remain on 0,0,0 until a plane is recognized. Keep in mind that, as long as plane detection is enabled, the size, placing and orientation of an anchor will be updated as the detection logic learns more about the real world out there especially if only part of the surface is in view. </description> <tutorials> @@ -22,14 +22,14 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the anchor is being tracked and [code]false[/code] if no anchor with this id is currently known. + Returns [code]true[/code] if the anchor is being tracked and [code]false[/code] if no anchor with this ID is currently known. </description> </method> <method name="get_mesh" qualifiers="const"> <return type="Mesh"> </return> <description> - If provided by the ARVR Interface this returns a mesh object for the anchor. For an anchor this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes. + If provided by the ARVR Interface, this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes. </description> </method> <method name="get_plane" qualifiers="const"> @@ -48,8 +48,8 @@ </method> </methods> <members> - <member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id"> - The anchor's id. You can set this before the anchor itself exists. The first anchor gets an id of [code]1[/code], the second an id of [code]2[/code], etc. When anchors get removed, the engine can then assign the corresponding id to new anchors. The most common situation where anchors 'disappear' is when the AR server identifies that two anchors represent different parts of the same plane and merges them. + <member name="anchor_id" type="int" setter="set_anchor_id" getter="get_anchor_id" default="1"> + The anchor's ID. You can set this before the anchor itself exists. The first anchor gets an ID of [code]1[/code], the second an ID of [code]2[/code], etc. When anchors get removed, the engine can then assign the corresponding ID to new anchors. The most common situation where anchors "disappear" is when the AR server identifies that two anchors represent different parts of the same plane and merges them. </member> </members> <signals> @@ -57,7 +57,7 @@ <argument index="0" name="mesh" type="Mesh"> </argument> <description> - Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being mesh_updated. + Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being [code]mesh_updated[/code]. </description> </signal> </signals> diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index c2b7fb2c08..9c6cfc1d7d 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVRController" inherits="Spatial" category="Core" version="3.2"> <brief_description> - A spatial node representing a spatially tracked controller. + A spatial node representing a spatially-tracked controller. </brief_description> <description> This is a helper spatial node that is linked to the tracking of controllers. It also offers several handy passthroughs to the state of buttons and such on the controllers. - Controllers are linked by their id. You can create controller nodes before the controllers are available. Say your game always uses two controllers (one for each hand) you can predefine the controllers with id 1 and 2 and they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. - The position of the controller node is automatically updated by the ARVR Server. This makes this node ideal to add child nodes to visualise the controller. + Controllers are linked by their ID. You can create controller nodes before the controllers are available. If your game always uses two controllers (one for each hand), you can predefine the controllers with ID 1 and 2; they will become active as soon as the controllers are identified. If you expect additional controllers to be used, you should react to the signals and add ARVRController nodes to your scene. + The position of the controller node is automatically updated by the [ARVRServer]. This makes this node ideal to add child nodes to visualize the controller. </description> <tutorials> </tutorials> @@ -22,7 +22,7 @@ <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this controller, if known. See TRACKER_* constants in [ARVRPositionalTracker]. + Returns the hand holding this controller, if known. See [code]TRACKER_*[/code] constants in [ARVRPositionalTracker]. </description> </method> <method name="get_is_active" qualifiers="const"> @@ -45,14 +45,14 @@ <return type="int"> </return> <description> - Returns the ID of the joystick object bound to this. Every controller tracked by the ARVR Server that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry. + Returns the ID of the joystick object bound to this. Every controller tracked by the [ARVRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry. </description> </method> <method name="get_mesh" qualifiers="const"> <return type="Mesh"> </return> <description> - If provided by the ARVR Interface this returns a mesh associated with the controller. This can be used to visualise the controller. + If provided by the [ARVRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller. </description> </method> <method name="is_button_pressed" qualifiers="const"> @@ -66,13 +66,13 @@ </method> </methods> <members> - <member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id"> - The controller's id. - A controller id of 0 is unbound and will always result in an inactive node. Controller id 1 is reserved for the first controller that identifies itself as the left hand controller and id 2 is reserved for the first controller that identifies itself as the right hand controller. - For any other controller that the [ARVRServer] detects, we continue with controller id 3. - When a controller is turned off, its slot is freed. This ensures controllers will keep the same id even when controllers with lower ids are turned off. + <member name="controller_id" type="int" setter="set_controller_id" getter="get_controller_id" default="1"> + The controller's ID. + A controller ID of 0 is unbound and will always result in an inactive node. Controller ID 1 is reserved for the first controller that identifies itself as the left-hand controller and ID 2 is reserved for the first controller that identifies itself as the right-hand controller. + For any other controller that the [ARVRServer] detects, we continue with controller ID 3. + When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off. </member> - <member name="rumble" type="float" setter="set_rumble" getter="get_rumble"> + <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0"> The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. </member> </members> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index c286811b5d..1da1351e49 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVRInterface" inherits="Reference" category="Core" version="3.2"> <brief_description> - Base class for ARVR interface implementation. + Base class for an AR/VR interface implementation. </brief_description> <description> This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass ARVRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. - Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through ARVRServer. + Interfaces should be written in such a way that simply enabling them will give us a working setup. You can query the available interfaces through [ARVRServer]. </description> <tutorials> </tutorials> @@ -14,7 +14,7 @@ <return type="int"> </return> <description> - If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed id in the [CameraServer] for this interface. + If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the [CameraServer] for this interface. </description> </method> <method name="get_capabilities" qualifiers="const"> @@ -51,9 +51,9 @@ <description> Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. - Note that you must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. - If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. - While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However at this point in time only one interface can render to an HMD. + [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. + If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. + While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. </description> </method> <method name="is_stereo"> @@ -72,13 +72,13 @@ </method> </methods> <members> - <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled"> + <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false"> On an AR interface, is our anchor detection enabled? </member> - <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized"> + <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false"> Has this interface been initialized? </member> - <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary"> + <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false"> Is this our primary interface? </member> </members> @@ -96,7 +96,7 @@ This interface support AR (video background and real world tracking). </constant> <constant name="ARVR_EXTERNAL" value="8" enum="Capabilities"> - This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of get_render_targetsize. Using a separate viewport node frees up the main viewport for other purposes. + This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. </constant> <constant name="EYE_MONO" value="0" enum="Eyes"> Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. @@ -111,10 +111,10 @@ Tracking is behaving as expected. </constant> <constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status"> - Tracking is hindered by excessive motion, player is moving faster then tracking can keep up. + Tracking is hindered by excessive motion, player is moving faster than tracking can keep up. </constant> <constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status"> - Tracking is hindered by insufficient features, it's too dark (for camera based tracking), player is blocked, etc. + Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. </constant> <constant name="ARVR_UNKNOWN_TRACKING" value="3" enum="Tracking_status"> We don't know the status of the tracking or this interface does not provide feedback. diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml index 758f00a9ca..b6b55741aa 100644 --- a/doc/classes/ARVROrigin.xml +++ b/doc/classes/ARVROrigin.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVROrigin" inherits="Spatial" category="Core" version="3.2"> <brief_description> - Our origin point in AR/VR. + The origin point in AR/VR. </brief_description> <description> This is a special node within the AR/VR system that maps the physical location of the center of our tracking space to the virtual location within our game world. There should be only one of these nodes in your scene and you must have one. All the ARVRCamera, ARVRController and ARVRAnchor nodes should be direct children of this node for spatial tracking to work correctly. It is the position of this node that you update when your character needs to move through your game world while we're not moving in the real world. Movement in the real world is always in relation to this origin point. - So say that your character is driving a car, the ARVROrigin node should be a child node of this car. If you implement a teleport system to move your character, you change the position of this node. Etc. + For example, if your character is driving a car, the ARVROrigin node should be a child node of this car. Or, if you're implementing a teleport system to move your character, you should change the position of this node. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale"> - Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. - Note that this method is a passthrough to the [ARVRServer] itself. + <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0"> + Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. + [b]Note:[/b] This method is a passthrough to the [ARVRServer] itself. </member> </members> <constants> diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml index de8b6b0620..5551d48a08 100644 --- a/doc/classes/ARVRPositionalTracker.xml +++ b/doc/classes/ARVRPositionalTracker.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVRPositionalTracker" inherits="Object" category="Core" version="3.2"> <brief_description> - A tracked object + A tracked object. </brief_description> <description> - An instance of this object represents a device that is tracked such as a controller or anchor point. HMDs aren't represented here as they are fully handled internally. - As controllers are turned on and the AR/VR interface detects them instances of this object are automatically added to this list of active tracking objects accessible through the ARVRServer - The ARVRController and ARVRAnchor both consume objects of this type and should be the objects you use in game. The positional trackers are just the under the hood objects that make this all work and are mostly exposed so GDNative based interfaces can interact with them. + An instance of this object represents a device that is tracked, such as a controller or anchor point. HMDs aren't represented here as they are handled internally. + As controllers are turned on and the AR/VR interface detects them, instances of this object are automatically added to this list of active tracking objects accessible through the [ARVRServer]. + The [ARVRController] and [ARVRAnchor] both consume objects of this type and should be used in your project. The positional trackers are just under-the-hood objects that make this all work. These are mostly exposed so that GDNative-based interfaces can interact with them. </description> <tutorials> </tutorials> @@ -15,14 +15,14 @@ <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this tracker, if known. See TRACKER_* constants. + Returns the hand holding this tracker, if known. See [code]TRACKER_*[/code] constants. </description> </method> <method name="get_joy_id" qualifiers="const"> <return type="int"> </return> <description> - If this is a controller that is being tracked the controller will also be represented by a joystick entry with this id. + If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID. </description> </method> <method name="get_mesh" qualifiers="const"> @@ -85,7 +85,7 @@ </method> </methods> <members> - <member name="rumble" type="float" setter="set_rumble" getter="get_rumble"> + <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0"> The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. </member> </members> diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 6f5a76943f..af1a1b0fff 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVRServer" inherits="Object" category="Core" version="3.2"> <brief_description> - This is our AR/VR Server. + The AR/VR server. </brief_description> <description> - The AR/VR Server is the heart of our AR/VR solution and handles all the processing. + The AR/VR server is the heart of our AR/VR solution and handles all the processing. </description> <tutorials> </tutorials> @@ -17,12 +17,12 @@ <argument index="1" name="keep_height" type="bool"> </argument> <description> - This is a really important function to understand correctly. AR and VR platforms all handle positioning slightly differently. - For platforms that do not offer spatial tracking our origin point (0,0,0) is the location of our HMD but you have little control over the direction the player is facing in the real world. - For platforms that do offer spatial tracking our origin point depends very much on the system. For OpenVR our origin point is usually the center of the tracking space, on the ground. For other platforms its often the location of the tracking camera. - This method allows you to center our tracker on the location of the HMD, it will take the current location of the HMD and use that to adjust all our tracking data in essence realigning the real world to your players current position in your game world. - For this method to produce usable results tracking information should be available and this often takes a few frames after starting your game. - You should call this method after a few seconds have passed, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, and when implementing a teleport mechanism. + This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently. + For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world. + For platforms that do offer spatial tracking, our origin point depends very much on the system. For OpenVR, our origin point is usually the center of the tracking space, on the ground. For other platforms, it's often the location of the tracking camera. + This method allows you to center your tracker on the location of the HMD. It will take the current location of the HMD and use that to adjust all your tracking data; in essence, realigning the real world to your player's current position in the game world. + For this method to produce usable results, tracking information must be available. This often takes a few frames after starting your game. + You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. </description> </method> <method name="find_interface" qualifiers="const"> @@ -31,7 +31,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Find an interface by its name. Say that you're making a game that uses specific capabilities of an AR/VR platform you can find the interface for that platform by name and initialize it. + Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it. </description> </method> <method name="get_hmd_transform"> @@ -47,21 +47,21 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the interface registered at a given index in our list of interfaces. + Gets the interface registered at a given index in our list of interfaces. </description> </method> <method name="get_interface_count" qualifiers="const"> <return type="int"> </return> <description> - Get the number of interfaces currently registered with the AR/VR server. If your game supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try an initialize each interface and use the first one that returns [code]true[/code]. + Gets the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code]. </description> </method> <method name="get_interfaces" qualifiers="const"> <return type="Array"> </return> <description> - Returns a list of available interfaces with both id and name of the interface. + Returns a list of available interfaces the ID and name of each interface. </description> </method> <method name="get_last_commit_usec"> @@ -86,7 +86,7 @@ <return type="Transform"> </return> <description> - Gets our reference frame transform, mostly used internally and exposed for GDNative build interfaces. + Gets the reference frame transform. Mostly used internally and exposed for GDNative build interfaces. </description> </method> <method name="get_tracker" qualifiers="const"> @@ -95,22 +95,22 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the positional tracker at the given ID. + Gets the positional tracker at the given ID. </description> </method> <method name="get_tracker_count" qualifiers="const"> <return type="int"> </return> <description> - Get the number of trackers currently registered. + Gets the number of trackers currently registered. </description> </method> </methods> <members> - <member name="primary_interface" type="ARVRInterface" setter="set_primary_interface" getter="get_primary_interface"> + <member name="primary_interface" type="ARVRInterface" setter="set_primary_interface" getter="get_primary_interface" default="null"> </member> - <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale"> - Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 meter in the real world. + <member name="world_scale" type="float" setter="set_world_scale" getter="get_world_scale" default="1.0"> + Allows you to adjust the scale to your game's units. Most AR/VR platforms assume a scale of 1 game world unit = 1 real world meter. </member> </members> <signals> @@ -118,14 +118,14 @@ <argument index="0" name="interface_name" type="String"> </argument> <description> - Signal send when a new interface has been added. + Emitted when a new interface has been added. </description> </signal> <signal name="interface_removed"> <argument index="0" name="interface_name" type="String"> </argument> <description> - Signal send when an interface is removed. + Emitted when an interface is removed. </description> </signal> <signal name="tracker_added"> @@ -136,7 +136,7 @@ <argument index="2" name="id" type="int"> </argument> <description> - Signal send when a new tracker has been added. If you don't use a fixed number of controllers or if you're using ARVRAnchors for an AR solution it is important to react to this signal and add the appropriate ARVRController or ARVRAnchor node related to this new tracker. + Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [ARVRAnchor]s for an AR solution, it is important to react to this signal to add the appropriate [ARVRController] or [ARVRAnchor] nodes related to this new tracker. </description> </signal> <signal name="tracker_removed"> @@ -147,19 +147,19 @@ <argument index="2" name="id" type="int"> </argument> <description> - Signal send when a tracker is removed, you should remove any ARVRController or ARVRAnchor points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). + Emitted when a tracker is removed. You should remove any [ARVRController] or [ARVRAnchor] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). </description> </signal> </signals> <constants> <constant name="TRACKER_CONTROLLER" value="1" enum="TrackerType"> - Our tracker tracks the location of a controller. + The tracker tracks the location of a controller. </constant> <constant name="TRACKER_BASESTATION" value="2" enum="TrackerType"> - Our tracker tracks the location of a base station. + The tracker tracks the location of a base station. </constant> <constant name="TRACKER_ANCHOR" value="4" enum="TrackerType"> - Our tracker tracks the location and size of an AR anchor. + The tracker tracks the location and size of an AR anchor. </constant> <constant name="TRACKER_ANY_KNOWN" value="127" enum="TrackerType"> Used internally to filter trackers of any known type. diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 0c7de55329..99e2db6d83 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -47,7 +47,7 @@ var as = AStar.new() as.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1 [/codeblock] - If there already exists a point for the given id, its position and weight scale are updated to the given values. + If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values. </description> </method> <method name="are_points_connected" qualifiers="const"> @@ -102,7 +102,7 @@ <return type="int"> </return> <description> - Returns the next available point id with no point associated to it. + Returns the next available point ID with no point associated to it. </description> </method> <method name="get_closest_point" qualifiers="const"> @@ -111,7 +111,7 @@ <argument index="0" name="to_position" type="Vector3"> </argument> <description> - Returns the id of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool. + Returns the ID of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool. </description> </method> <method name="get_closest_position_in_segment" qualifiers="const"> @@ -126,7 +126,7 @@ as.add_point(1, Vector3(0, 0, 0)) as.add_point(2, Vector3(0, 5, 0)) as.connect_points(1, 2) - var res = as.get_closest_position_in_segment(Vector3(3, 3, 0)) # returns (0, 3, 0) + var res = as.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0) [/codeblock] The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point. </description> @@ -139,11 +139,11 @@ <argument index="1" name="to_id" type="int"> </argument> <description> - Returns an array with the ids of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. + Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. [codeblock] var as = AStar.new() as.add_point(1, Vector3(0, 0, 0)) - as.add_point(2, Vector3(0, 1, 0), 1) # default weight is 1 + as.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1 as.add_point(3, Vector3(1, 1, 0)) as.add_point(4, Vector3(2, 0, 0)) @@ -153,7 +153,7 @@ as.connect_points(1, 4, false) as.connect_points(5, 4, false) - var res = as.get_id_path(1, 3) # returns [1, 2, 3] + var res = as.get_id_path(1, 3) # Returns [1, 2, 3] [/codeblock] If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. </description> @@ -164,7 +164,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns an array with the ids of the points that form the connect with the given point. + Returns an array with the IDs of the points that form the connection with the given point. [codeblock] var as = AStar.new() as.add_point(1, Vector3(0, 0, 0)) @@ -175,7 +175,7 @@ as.connect_points(1, 2, true) as.connect_points(1, 3, true) - var neighbors = as.get_point_connections(1) # returns [2, 3] + var neighbors = as.get_point_connections(1) # Returns [2, 3] [/codeblock] </description> </method> @@ -196,7 +196,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the position of the point associated with the given id. + Returns the position of the point associated with the given [code]id[/code]. </description> </method> <method name="get_point_weight_scale" qualifiers="const"> @@ -205,7 +205,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the weight scale of the point associated with the given id. + Returns the weight scale of the point associated with the given [code]id[/code]. </description> </method> <method name="get_points"> @@ -221,7 +221,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns whether a point associated with the given id exists. + Returns whether a point associated with the given [code]id[/code] exists. </description> </method> <method name="is_point_disabled" qualifiers="const"> @@ -239,7 +239,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Removes the point associated with the given id from the points pool. + Removes the point associated with the given [code]id[/code] from the points pool. </description> </method> <method name="set_point_disabled"> @@ -261,7 +261,7 @@ <argument index="1" name="position" type="Vector3"> </argument> <description> - Sets the position for the point with the given id. + Sets the [code]position[/code] for the point with the given [code]id[/code]. </description> </method> <method name="set_point_weight_scale"> @@ -272,7 +272,7 @@ <argument index="1" name="weight_scale" type="float"> </argument> <description> - Sets the [code]weight_scale[/code] for the point with the given id. + Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. </description> </method> </methods> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index b86e53d4d4..526d1c16da 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -24,7 +24,7 @@ var as = AStar2D.new() as.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1 [/codeblock] - If there already exists a point for the given id, its position and weight scale are updated to the given values. + If there already exists a point for the given [code]id[/code], its position and weight scale are updated to the given values. </description> </method> <method name="are_points_connected" qualifiers="const"> @@ -79,7 +79,7 @@ <return type="int"> </return> <description> - Returns the next available point id with no point associated to it. + Returns the next available point ID with no point associated to it. </description> </method> <method name="get_closest_point" qualifiers="const"> @@ -88,7 +88,7 @@ <argument index="0" name="to_position" type="Vector2"> </argument> <description> - Returns the id of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool. + Returns the ID of the closest point to [code]to_position[/code]. Returns -1 if there are no points in the points pool. </description> </method> <method name="get_closest_position_in_segment" qualifiers="const"> @@ -103,7 +103,7 @@ as.add_point(1, Vector2(0, 0)) as.add_point(2, Vector2(0, 5)) as.connect_points(1, 2) - var res = as.get_closest_position_in_segment(Vector2(3, 3)) # returns (0, 3) + var res = as.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3) [/codeblock] The result is in the segment that goes from [code]y = 0[/code] to [code]y = 5[/code]. It's the closest position in the segment to the given point. </description> @@ -116,11 +116,11 @@ <argument index="1" name="to_id" type="int"> </argument> <description> - Returns an array with the ids of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. + Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. [codeblock] var as = AStar2D.new() as.add_point(1, Vector2(0, 0)) - as.add_point(2, Vector2(0, 1), 1) # default weight is 1 + as.add_point(2, Vector2(0, 1), 1) # Default weight is 1 as.add_point(3, Vector2(1, 1)) as.add_point(4, Vector2(2, 0)) @@ -130,7 +130,7 @@ as.connect_points(1, 4, false) as.connect_points(5, 4, false) - var res = as.get_id_path(1, 3) # returns [1, 2, 3] + var res = as.get_id_path(1, 3) # Returns [1, 2, 3] [/codeblock] If you change the 2nd point's weight to 3, then the result will be [code][1, 4, 3][/code] instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2. </description> @@ -141,7 +141,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns an array with the ids of the points that form the connect with the given point. + Returns an array with the IDs of the points that form the connection with the given point. [codeblock] var as = AStar2D.new() as.add_point(1, Vector2(0, 0)) @@ -152,7 +152,7 @@ as.connect_points(1, 2, true) as.connect_points(1, 3, true) - var neighbors = as.get_point_connections(1) # returns [2, 3] + var neighbors = as.get_point_connections(1) # Returns [2, 3] [/codeblock] </description> </method> @@ -173,7 +173,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the position of the point associated with the given id. + Returns the position of the point associated with the given [code]id[/code]. </description> </method> <method name="get_point_weight_scale" qualifiers="const"> @@ -182,7 +182,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the weight scale of the point associated with the given id. + Returns the weight scale of the point associated with the given [code]id[/code]. </description> </method> <method name="get_points"> @@ -198,7 +198,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns whether a point associated with the given id exists. + Returns whether a point associated with the given [code]id[/code] exists. </description> </method> <method name="is_point_disabled" qualifiers="const"> @@ -216,7 +216,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Removes the point associated with the given id from the points pool. + Removes the point associated with the given [code]id[/code] from the points pool. </description> </method> <method name="set_point_disabled"> @@ -238,7 +238,7 @@ <argument index="1" name="position" type="Vector2"> </argument> <description> - Sets the position for the point with the given id. + Sets the [code]position[/code] for the point with the given [code]id[/code]. </description> </method> <method name="set_point_weight_scale"> @@ -249,7 +249,7 @@ <argument index="1" name="weight_scale" type="float"> </argument> <description> - Sets the [code]weight_scale[/code] for the point with the given id. + Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. </description> </method> </methods> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 3ea280cba3..980adb4fca 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -19,8 +19,8 @@ <argument index="2" name="action" type="String" default=""""> </argument> <description> - Adds a button with label [i]text[/i] and a custom [i]action[/i] to the dialog and returns the created button. [i]action[/i] will be passed to the [signal custom_action] signal when pressed. - If [code]true[/code], [i]right[/i] will place the button to the right of any sibling buttons. Default value: [code]false[/code]. + Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed. + If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons. </description> </method> <method name="add_cancel"> @@ -29,7 +29,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Adds a button with label [i]name[/i] and a cancel action to the dialog and returns the created button. + Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button. </description> </method> <method name="get_label"> @@ -43,7 +43,7 @@ <return type="Button"> </return> <description> - Returns the OK Button. + Returns the OK [Button] instance. </description> </method> <method name="register_text_enter"> @@ -57,14 +57,14 @@ </method> </methods> <members> - <member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap"> + <member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> Sets autowrapping for the text in the dialog. </member> - <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok"> - If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. Default value: [code]true[/code]. - Note: Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to [code]false[/code], and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK. + <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" default="true"> + If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. + [b]Note:[/b] Some nodes derived from this class can have a different default value, and potentially their own built-in logic overriding this setting. For example [FileDialog] defaults to [code]false[/code], and has its own input validation code that is called when you press OK, which eventually hides the dialog if the input is valid. As such, this property can't be used in [FileDialog] to disable hiding the dialog when pressing OK. </member> - <member name="dialog_text" type="String" setter="set_text" getter="get_text"> + <member name="dialog_text" type="String" setter="set_text" getter="get_text" default=""""> The text displayed by the dialog. </member> </members> diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index da85f91367..72d1fa4881 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -13,7 +13,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if an animation if currently being played. + Returns [code]true[/code] if an animation is currently being played. </description> </method> <method name="play"> @@ -24,43 +24,43 @@ <argument index="1" name="backwards" type="bool" default="false"> </argument> <description> - Play the animation set in parameter. If no parameter is provided, the current animation is played. Property [code]backwards[/code] plays the animation in reverse if set to [code]true[/code]. + Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse. </description> </method> <method name="stop"> <return type="void"> </return> <description> - Stop the current animation (does not reset the frame counter). + Stops the current animation (does not reset the frame counter). </description> </method> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation"> + <member name="animation" type="String" 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. </member> - <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code], texture will be centered. Default value: [code]true[/code]. + <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> + If [code]true[/code], texture will be centered. </member> - <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. + <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false"> + If [code]true[/code], texture is flipped horizontally. </member> - <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. + <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false"> + If [code]true[/code], texture is flipped vertically. </member> - <member name="frame" type="int" setter="set_frame" getter="get_frame"> + <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> The displayed animation frame's index. </member> - <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> + <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames" default="null"> The [SpriteFrames] resource containing the animation(s). </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The texture's drawing offset. </member> - <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> + <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false"> If [code]true[/code], the [member animation] is currently playing. </member> - <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> + <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The animation speed is multiplied by this value. </member> </members> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 96196f7601..ff7d2fb9eb 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -13,7 +13,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if an animation if currently being played. + Returns [code]true[/code] if an animation is currently being played. </description> </method> <method name="play"> @@ -22,28 +22,28 @@ <argument index="0" name="anim" type="String" default=""""> </argument> <description> - Play the animation set in parameter. If no parameter is provided, the current animation is played. + Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. </description> </method> <method name="stop"> <return type="void"> </return> <description> - Stop the current animation (does not reset the frame counter). + Stops the current animation (does not reset the frame counter). </description> </method> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation"> + <member name="animation" type="String" 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. </member> - <member name="frame" type="int" setter="set_frame" getter="get_frame"> + <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> The displayed animation frame's index. </member> - <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames"> + <member name="frames" type="SpriteFrames" setter="set_sprite_frames" getter="get_sprite_frames" default="null"> The [SpriteFrames] resource containing the animation(s). </member> - <member name="playing" type="bool" setter="_set_playing" getter="_is_playing"> + <member name="playing" type="bool" setter="_set_playing" getter="_is_playing" default="false"> If [code]true[/code], the [member animation] is currently playing. </member> </members> diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index 2009139474..7e32db1bb8 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -61,12 +61,12 @@ </method> </methods> <members> - <member name="fps" type="float" setter="set_fps" getter="get_fps"> - Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). Default value: 4. + <member name="fps" type="float" setter="set_fps" getter="get_fps" default="4.0"> + Animation speed in frames per second. This value defines the default time interval between two frames of the animation, and thus the overall duration of the animation loop based on the [member frames] property. A value of 0 means no predefined number of frames per second, the animation will play according to each frame's frame delay (see [method set_frame_delay]). For example, an animation with 8 frames, no frame delay and a [code]fps[/code] value of 2 will run for 4 seconds, with each frame lasting 0.5 seconds. </member> - <member name="frames" type="int" setter="set_frames" getter="get_frames"> - Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. Default value: 1. + <member name="frames" type="int" setter="set_frames" getter="get_frames" default="1"> + Number of frames to use in the animation. While you can create the frames independently with [method set_frame_texture], you need to set this value for the animation to take new frames into account. The maximum number of frames is [constant MAX_FRAMES]. </member> </members> <constants> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index c79903cb80..bc64cfbb19 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -28,7 +28,7 @@ <argument index="1" name="at_position" type="int" default="-1"> </argument> <description> - Add a track to the Animation. The track type must be specified as any of the values in the TYPE_* enumeration. + Adds a track to the Animation. </description> </method> <method name="animation_track_get_key_animation" qualifiers="const"> @@ -314,7 +314,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Remove a track by specifying the track index. + Removes a track by specifying the track index. </description> </method> <method name="track_find_key" qualifiers="const"> @@ -327,7 +327,7 @@ <argument index="2" name="exact" type="bool" default="false"> </argument> <description> - Find the key index by time in a given track. Optionally, only find it if the exact time is given. + Finds the key index by time in a given track. Optionally, only find it if the exact time is given. </description> </method> <method name="track_get_interpolation_loop_wrap" qualifiers="const"> @@ -336,7 +336,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. Default value: [code]true[/code]. + Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default. </description> </method> <method name="track_get_interpolation_type" qualifiers="const"> @@ -345,7 +345,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the interpolation type of a given track, from the INTERPOLATION_* enum. + Returns the interpolation type of a given track. </description> </method> <method name="track_get_key_count" qualifiers="const"> @@ -376,7 +376,7 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> - Returns the transition curve (easing) for a specific key (see built-in math function "ease"). + Returns the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]). </description> </method> <method name="track_get_key_value" qualifiers="const"> @@ -396,7 +396,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the path of a track. for more information on the path format, see [method track_set_path] + Gets the path of a track. For more information on the path format, see [method track_set_path]. </description> </method> <method name="track_get_type" qualifiers="const"> @@ -405,7 +405,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the type of a track. + Gets the type of a track. </description> </method> <method name="track_insert_key"> @@ -447,7 +447,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Move a track down. + Moves a track down. </description> </method> <method name="track_move_to"> @@ -467,7 +467,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Move a track up. + Moves a track up. </description> </method> <method name="track_remove_key"> @@ -478,7 +478,7 @@ <argument index="1" name="key_idx" type="int"> </argument> <description> - Remove a key by index in a given track. + Removes a key by index in a given track. </description> </method> <method name="track_remove_key_at_position"> @@ -489,7 +489,7 @@ <argument index="1" name="position" type="float"> </argument> <description> - Remove a key by position (seconds) in a given track. + Removes a key by position (seconds) in a given track. </description> </method> <method name="track_set_enabled"> @@ -511,7 +511,7 @@ <argument index="1" name="imported" type="bool"> </argument> <description> - Set the given track as imported or not. + Sets the given track as imported or not. </description> </method> <method name="track_set_interpolation_loop_wrap"> @@ -533,7 +533,7 @@ <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType"> </argument> <description> - Set the interpolation type of a given track, from the INTERPOLATION_* enum. + Sets the interpolation type of a given track. </description> </method> <method name="track_set_key_time"> @@ -546,7 +546,7 @@ <argument index="2" name="time" type="float"> </argument> <description> - Set the time of an existing key. + Sets the time of an existing key. </description> </method> <method name="track_set_key_transition"> @@ -559,7 +559,7 @@ <argument index="2" name="transition" type="float"> </argument> <description> - Set the transition curve (easing) for a specific key (see built-in math function "ease"). + Sets the transition curve (easing) for a specific key (see the built-in math function [method @GDScript.ease]). </description> </method> <method name="track_set_key_value"> @@ -572,7 +572,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Set the value of an existing key. + Sets the value of an existing key. </description> </method> <method name="track_set_path"> @@ -583,8 +583,8 @@ <argument index="1" name="path" type="NodePath"> </argument> <description> - Set the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by ":". - [b]Example:[/b] "character/skeleton:ankle" or "character/mesh:transform/local". + Sets the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code]. + For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code]. </description> </method> <method name="track_swap"> @@ -656,18 +656,19 @@ <argument index="1" name="mode" type="int" enum="Animation.UpdateMode"> </argument> <description> - Set the update mode (UPDATE_*) of a value track. + Sets the update mode ([code]UPDATE_*[/code]) of a value track. </description> </method> </methods> <members> - <member name="length" type="float" setter="set_length" getter="get_length"> - The total length of the animation (in seconds). Note that length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. + <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> + The total length of the animation (in seconds). + [b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. </member> - <member name="loop" type="bool" setter="set_loop" getter="has_loop"> + <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false"> A flag indicating that the animation must loop. This is uses for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. </member> - <member name="step" type="float" setter="set_step" getter="get_step"> + <member name="step" type="float" setter="set_step" getter="get_step" default="0.1"> The animation step value. </member> </members> @@ -682,7 +683,7 @@ Value tracks set values in node properties, but only those which can be Interpolated. </constant> <constant name="TYPE_TRANSFORM" value="1" enum="TrackType"> - Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are Interpolated. + Transform tracks are used to change node local transforms or skeleton pose bones. Transitions are interpolated. </constant> <constant name="TYPE_METHOD" value="2" enum="TrackType"> Method tracks call functions with given arguments per key. diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 23f7a316d9..7d5d8a2db1 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -4,7 +4,7 @@ Base resource for [AnimationTree] nodes. </brief_description> <description> - Base resource for [AnimationTree] nodes. In general it's not used directly but you can create custom ones with custom blending formulas. + Base resource for [AnimationTree] nodes. In general, it's not used directly, but you can create custom ones with custom blending formulas. Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. </description> <tutorials> @@ -16,7 +16,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Add an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree] + Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree] </description> </method> <method name="blend_animation"> @@ -80,7 +80,7 @@ <return type="String"> </return> <description> - Get the text caption for this node (used by some editors) + Gets the text caption for this node (used by some editors). </description> </method> <method name="get_child_by_name" qualifiers="virtual"> @@ -89,14 +89,14 @@ <argument index="0" name="name" type="String"> </argument> <description> - Get the a child node by index (used by editors inheriting from [AnimationRootNode]). + Gets a child node by index (used by editors inheriting from [AnimationRootNode]). </description> </method> <method name="get_child_nodes" qualifiers="virtual"> <return type="Dictionary"> </return> <description> - Get all children nodes, in order as a name:node dictionary. Only useful when inheriting [AnimationRootNode]. + Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode]. </description> </method> <method name="get_input_count" qualifiers="const"> @@ -112,7 +112,7 @@ <argument index="0" name="input" type="int"> </argument> <description> - Get the name of an input by index. + Gets the name of an input by index. </description> </method> <method name="get_parameter" qualifiers="const"> @@ -121,7 +121,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Get the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. + Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. </description> </method> <method name="get_parameter_default_value" qualifiers="virtual"> @@ -130,14 +130,14 @@ <argument index="0" name="name" type="String"> </argument> <description> - Get the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. + Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. </description> </method> <method name="get_parameter_list" qualifiers="virtual"> <return type="Array"> </return> <description> - Get the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. + Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. </description> </method> <method name="has_filter" qualifiers="virtual"> @@ -176,7 +176,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Remove an input, call this only when inactive. + Removes an input, call this only when inactive. </description> </method> <method name="set_filter_path"> @@ -187,7 +187,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Add/Remove a path for the filter. + Adds or removes a path for the filter. </description> </method> <method name="set_parameter"> @@ -198,7 +198,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Set a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes. + Sets a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes. </description> </method> </methods> diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index 890d6f8b49..bb7857717d 100644 --- a/doc/classes/AnimationNodeAdd2.xml +++ b/doc/classes/AnimationNodeAdd2.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 7747c333bf..d338c2cf9e 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index 420a702d38..a964877068 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="animation" type="String" setter="set_animation" getter="get_animation"> + <member name="animation" type="String" setter="set_animation" getter="get_animation" default=""""> Animation to use as an output. It is one of the animations provided by [member AnimationTree.anim_player]. </member> </members> diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index 9358c5eeef..cac97b9ee7 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index f4a108f930..3b5c1f0b99 100644 --- a/doc/classes/AnimationNodeBlend3.xml +++ b/doc/classes/AnimationNodeBlend3.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> If [code]true[/code], sets the [code]optimization[/code] to [code]false[/code] when calling [method AnimationNode.blend_input], forcing the blended animations to update every frame. </member> </members> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index 6fb5c6312b..82d5716ee3 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -22,7 +22,7 @@ <argument index="2" name="at_index" type="int" default="-1"> </argument> <description> - Add a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. + Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> @@ -83,16 +83,16 @@ </method> </methods> <members> - <member name="max_space" type="float" setter="set_max_space" getter="get_max_space"> + <member name="max_space" type="float" setter="set_max_space" getter="get_max_space" default="1.0"> The blend space's axis's upper limit for the points' position. See [method add_blend_point]. </member> - <member name="min_space" type="float" setter="set_min_space" getter="get_min_space"> + <member name="min_space" type="float" setter="set_min_space" getter="get_min_space" default="-1.0"> The blend space's axis's lower limit for the points' position. See [method add_blend_point]. </member> - <member name="snap" type="float" setter="set_snap" getter="get_snap"> + <member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.1"> Position increment to snap to when moving a point on the axis. </member> - <member name="value_label" type="String" setter="set_value_label" getter="get_value_label"> + <member name="value_label" type="String" setter="set_value_label" getter="get_value_label" default=""value""> Label of the virtual axis of the blend space. </member> </members> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 6567098d6c..c71a06d931 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -21,7 +21,7 @@ <argument index="2" name="at_index" type="int" default="-1"> </argument> <description> - Add a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. + Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code] , the point is inserted at the end of the blend points array. </description> </method> <method name="add_triangle"> @@ -124,25 +124,25 @@ </method> </methods> <members> - <member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles"> + <member name="auto_triangles" type="bool" setter="set_auto_triangles" getter="get_auto_triangles" default="true"> If true, the blend space is triangulated automatically. The mesh updates every time you add or remove points with [method add_blend_point] and [method remove_blend_point]. </member> - <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode"> + <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="AnimationNodeBlendSpace2D.BlendMode" default="0"> Controls the interpolation between animations. See [enum BlendMode] constants. </member> - <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space"> + <member name="max_space" type="Vector2" setter="set_max_space" getter="get_max_space" default="Vector2( 1, 1 )"> The blend space's X and Y axes' upper limit for the points' position. See [method add_blend_point]. </member> - <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space"> + <member name="min_space" type="Vector2" setter="set_min_space" getter="get_min_space" default="Vector2( -1, -1 )"> The blend space's X and Y axes' lower limit for the points' position. See [method add_blend_point]. </member> - <member name="snap" type="Vector2" setter="set_snap" getter="get_snap"> + <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2( 0.1, 0.1 )"> Position increment to snap to when moving a point. </member> - <member name="x_label" type="String" setter="set_x_label" getter="get_x_label"> + <member name="x_label" type="String" setter="set_x_label" getter="get_x_label" default=""x""> Name of the blend space's X axis. </member> - <member name="y_label" type="String" setter="set_y_label" getter="get_y_label"> + <member name="y_label" type="String" setter="set_y_label" getter="get_y_label" default=""y""> Name of the blend space's Y axis. </member> </members> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index 6454a26a04..76a0d65920 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -95,7 +95,7 @@ </method> </methods> <members> - <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset"> + <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index b6a6459c9e..099548f60a 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -23,17 +23,17 @@ </method> </methods> <members> - <member name="autorestart" type="bool" setter="set_autorestart" getter="has_autorestart"> + <member name="autorestart" type="bool" setter="set_autorestart" getter="has_autorestart" default="false"> </member> - <member name="autorestart_delay" type="float" setter="set_autorestart_delay" getter="get_autorestart_delay"> + <member name="autorestart_delay" type="float" setter="set_autorestart_delay" getter="get_autorestart_delay" default="1.0"> </member> - <member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay"> + <member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay" default="0.0"> </member> - <member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time"> + <member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.1"> </member> - <member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time"> + <member name="fadeout_time" type="float" setter="set_fadeout_time" getter="get_fadeout_time" default="0.1"> </member> - <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync"> + <member name="sync" type="bool" setter="set_use_sync" getter="is_using_sync" default="false"> </member> </members> <constants> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 2834f83d2f..9a21492b8a 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -4,7 +4,8 @@ State machine for control of animations. </brief_description> <description> - Contains multiple nodes representing animation states, connected in a graph. Nodes transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the [AnimationTree] node to control it programatically. Example: + Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the [AnimationTree] node to control it programmatically. + [b]Example:[/b] [codeblock] var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 796d92d7d6..ab9652fcd8 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -4,7 +4,8 @@ Playback control for AnimationNodeStateMachine. </brief_description> <description> - Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. Example: + Allows control of [AnimationTree] state machines created with [AnimationNodeStateMachine]. Retrieve with [code]$AnimationTree.get("parameters/playback")[/code]. + [b]Example:[/b] [codeblock] var state_machine = $AnimationTree.get("parameters/playback") state_machine.travel("some_state") diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 0ba3e7057e..08ff9997cf 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -9,25 +9,25 @@ <methods> </methods> <members> - <member name="advance_condition" type="String" setter="set_advance_condition" getter="get_advance_condition"> + <member name="advance_condition" type="String" setter="set_advance_condition" getter="get_advance_condition" default=""""> Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the [AnimationTree] that can be controlled from code (see [url=https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to "idle": [codeblock] $animation_tree["parameters/conditions/idle"] = is_on_floor and linear_velocity.x == 0 [/codeblock] </member> - <member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance"> + <member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false"> Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END]. </member> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> Don't use this transition during [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance]. </member> - <member name="priority" type="int" setter="set_priority" getter="get_priority"> + <member name="priority" type="int" setter="set_priority" getter="get_priority" default="1"> Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance]. </member> - <member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode"> + <member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0"> The transition type. </member> - <member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time"> + <member name="xfade_time" type="float" setter="set_xfade_time" getter="get_xfade_time" default="0.0"> The time to cross-fade between this state and the next. </member> </members> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index 311d0e8486..4d2a11578f 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -137,9 +137,9 @@ </member> <member name="input_9/name" type="String" setter="set_input_caption" getter="get_input_caption"> </member> - <member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs"> + <member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0"> </member> - <member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time"> + <member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0"> </member> </members> <constants> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 3e2fad8a92..b4c44fe8eb 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -4,7 +4,7 @@ Container and player of [Animation] resources. </brief_description> <description> - An animation player is used for general purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. + An animation player is used for general-purpose playback of [Animation] resources. It contains a dictionary of animations (referenced by name) and custom blend times between their transitions. Additionally, animations can be played and blended in different channels. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/animations.html</link> @@ -55,7 +55,7 @@ <return type="void"> </return> <description> - [AnimationPlayer] caches animated nodes. It may not notice if a node disappears, so clear_caches forces it to update the cache again. + [AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again. </description> </method> <method name="clear_queue"> @@ -98,14 +98,14 @@ <argument index="1" name="anim_to" type="String"> </argument> <description> - Get the blend time (in seconds) between two animations, referenced by their names. + Gets the blend time (in seconds) between two animations, referenced by their names. </description> </method> <method name="get_playing_speed" qualifiers="const"> <return type="float"> </return> <description> - Get the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method. + Gets the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method. </description> </method> <method name="get_queue"> @@ -142,8 +142,8 @@ <argument index="3" name="from_end" type="bool" default="false"> </argument> <description> - Play the animation with key [code]name[/code]. Custom speed and blend times can be set. If custom speed is negative (-1), 'from_end' being [code]true[/code] can play the animation backwards. - If the animation has been paused by [code]stop(true)[/code] it will be resumed. Calling [code]play()[/code] without arguments will also resume the animation. + Plays the animation with key [code]name[/code]. Custom speed and blend times can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards. + If the animation has been paused by [method stop], it will be resumed. Calling [method play] without arguments will also resume the animation. </description> </method> <method name="play_backwards"> @@ -154,8 +154,8 @@ <argument index="1" name="custom_blend" type="float" default="-1"> </argument> <description> - Play the animation with key [code]name[/code] in reverse. - If the animation has been paused by [code]stop(true)[/code] it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards. + Plays the animation with key [code]name[/code] in reverse. + If the animation has been paused by [code]stop(true)[/code], it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards. </description> </method> <method name="queue"> @@ -164,7 +164,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Queue an animation for playback once the current one is done. + Queues an animation for playback once the current one is done. </description> </method> <method name="remove_animation"> @@ -173,7 +173,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Remove the animation with key [code]name[/code]. + Removes the animation with key [code]name[/code]. </description> </method> <method name="rename_animation"> @@ -184,7 +184,7 @@ <argument index="1" name="newname" type="String"> </argument> <description> - Rename an existing animation with key [code]name[/code] to [code]newname[/code]. + Renames an existing animation with key [code]name[/code] to [code]newname[/code]. </description> </method> <method name="seek"> @@ -195,7 +195,7 @@ <argument index="1" name="update" type="bool" default="false"> </argument> <description> - Seek the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped. + Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped. </description> </method> <method name="set_blend_time"> @@ -208,7 +208,7 @@ <argument index="2" name="sec" type="float"> </argument> <description> - Specify a blend time (in seconds) between two animations, referenced by their names. + Specifies a blend time (in seconds) between two animations, referenced by their names. </description> </method> <method name="stop"> @@ -217,8 +217,8 @@ <argument index="0" name="reset" type="bool" default="true"> </argument> <description> - Stop the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. - If [code]reset[/code] is [code]false[/code], then calling [code]play()[/code] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [code]play_backwards()[/code] method. + Stops the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. + If [code]reset[/code] is [code]false[/code], then calling [method play] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [method play_backwards]. </description> </method> </methods> @@ -226,11 +226,11 @@ <member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation"> If playing, the current animation; otherwise, the animation last played. When set, would change the animation, but would not play it unless currently playing. See also [member current_animation]. </member> - <member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay"> - The name of the animation to play when the scene loads. Default value: [code]""[/code]. + <member name="autoplay" type="String" setter="set_autoplay" getter="get_autoplay" default=""""> + The name of the animation to play when the scene loads. </member> - <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation"> - The name of the current animation, "" if not playing anything. When being set, does not restart the animation. See also [method play]. Default value: [code]""[/code]. + <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default=""""> + The name of the current animation, "" if not playing anything. When being set, does not restart the animation. See also [method play]. </member> <member name="current_animation_length" type="float" setter="" getter="get_current_animation_length"> The length (in seconds) of the currently being played animation. @@ -238,23 +238,23 @@ <member name="current_animation_position" type="float" setter="" getter="get_current_animation_position"> The position (in seconds) of the currently playing animation. </member> - <member name="method_call_mode" type="int" setter="set_method_call_mode" getter="get_method_call_mode" enum="AnimationPlayer.AnimationMethodCallMode"> - The call mode to use for Call Method tracks. Default value: [constant ANIMATION_METHOD_CALL_DEFERRED]. + <member name="method_call_mode" type="int" setter="set_method_call_mode" getter="get_method_call_mode" enum="AnimationPlayer.AnimationMethodCallMode" default="0"> + The call mode to use for Call Method tracks. </member> <member name="playback_active" type="bool" setter="set_active" getter="is_active"> - If [code]true[/code], updates animations in response to process-related notifications. Default value: [code]true[/code]. + If [code]true[/code], updates animations in response to process-related notifications. </member> - <member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time"> - The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. Default value: [code]0[/code]. + <member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" default="0.0"> + The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. </member> - <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode"> - The process notification in which to update animations. Default value: [constant ANIMATION_PROCESS_IDLE]. + <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode" default="1"> + The process notification in which to update animations. </member> - <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale"> - The speed scaling ratio. For instance, if this value is 1 then the animation plays at normal speed. If it's 0.5 then it plays at half speed. If it's 2 then it plays at double speed. Default value: [code]1[/code]. + <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> + The speed scaling ratio. For instance, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed. </member> - <member name="root_node" type="NodePath" setter="set_root" getter="get_root"> - The node from which node path references will travel. Default value: [code]".."[/code]. + <member name="root_node" type="NodePath" setter="set_root" getter="get_root" default="NodePath("..")"> + The node from which node path references will travel. </member> </members> <signals> @@ -294,7 +294,7 @@ Process animation during the idle process. </constant> <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode"> - Do not process animation. Use the 'advance' method to process the animation manually. + Do not process animation. Use [method advance] to process the animation manually. </constant> <constant name="ANIMATION_METHOD_CALL_DEFERRED" value="0" enum="AnimationMethodCallMode"> Batch method calls during the animation process, then do the calls after events are processed. This avoids bugs involving deleting nodes or modifying the AnimationPlayer while playing. diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index f3dc1ecc1e..70c1b783df 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -35,15 +35,15 @@ </method> </methods> <members> - <member name="active" type="bool" setter="set_active" getter="is_active"> + <member name="active" type="bool" setter="set_active" getter="is_active" default="false"> </member> - <member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player"> + <member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath("")"> </member> - <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode"> + <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1"> </member> - <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track"> + <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")"> </member> - <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root"> + <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root" default="null"> </member> </members> <constants> diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index 179dc5577b..3b6003b478 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -238,7 +238,7 @@ </argument> <description> Sets mix amount of a Mix node given its name and value. - A Mix node adds input b to input a by a the amount given by ratio. + A Mix node adds input b to input a by the amount given by ratio. </description> </method> <method name="node_exists" qualifiers="const"> @@ -285,7 +285,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Get the node type, will return from NODE_* enum. + Gets the node type, will return from [code]NODE_*[/code] enum. </description> </method> <method name="node_rename"> @@ -503,7 +503,7 @@ <argument index="1" name="seconds" type="float"> </argument> <description> - Sets the time seek value of the TimeSeek node with name [code]id[/code] to [code]seconds[/code] + Sets the time seek value of the TimeSeek node with name [code]id[/code] to [code]seconds[/code]. This functions as a seek in the [Animation] or the blend or mix of [Animation]s input in it. </description> </method> @@ -604,19 +604,19 @@ </method> </methods> <members> - <member name="active" type="bool" setter="set_active" getter="is_active"> - If [code]true[/code], the [AnimationTreePlayer] is able to play animations. Default value: [code]false[/code]. + <member name="active" type="bool" setter="set_active" getter="is_active" default="false"> + If [code]true[/code], the [AnimationTreePlayer] is able to play animations. </member> - <member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path"> - The node from which to relatively access other nodes. Default value: [code]".."[/code]. + <member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path" default="NodePath("..")"> + The node from which to relatively access other nodes. It accesses the Bones, so it should point to the same Node the AnimationPlayer would point its Root Node at. </member> - <member name="master_player" type="NodePath" setter="set_master_player" getter="get_master_player"> + <member name="master_player" type="NodePath" setter="set_master_player" getter="get_master_player" default="NodePath("")"> The path to the [AnimationPlayer] from which this [AnimationTreePlayer] binds animations to animation nodes. Once set, Animation nodes can be added to the AnimationTreePlayer. </member> - <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode"> - The thread in which to update animations. Default value: [constant ANIMATION_PROCESS_IDLE]. + <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode" default="1"> + The thread in which to update animations. </member> </members> <constants> diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index 17d9678f64..6bd1382488 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Area" inherits="CollisionObject" category="Core" version="3.2"> <brief_description> - General purpose area node for detection and 3D physics influence. + General-purpose area node for detection and 3D physics influence. </brief_description> <description> 3D area that detects [CollisionObject] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping). @@ -47,7 +47,8 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code], the given area overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given area overlaps the Area. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -56,7 +57,8 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code], the given physics body overlaps the Area. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given physics body overlaps the Area. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. The [code]body[/code] argument can either be a [PhysicsBody] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). </description> </method> @@ -84,58 +86,58 @@ </method> </methods> <members> - <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp"> + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="0.1"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus"> + <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus" default=""Master""> The name of the area's audio bus. </member> - <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> - If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. + <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> + If [code]true[/code], the area's audio bus overrides the default audio bus. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this area scans to determine collision detection. </member> - <member name="gravity" type="float" setter="set_gravity" getter="get_gravity"> + <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="9.8"> The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. </member> - <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale"> + <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0"> The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> - <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> - If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). Also see [member space_override]. Default value: [code]false[/code]. + <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false"> + If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]. </member> - <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector"> + <member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector3( 0, -1, 0 )"> The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. </member> - <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1"> The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> - If [code]true[/code], other monitoring areas can detect this area. Default value: [code]true[/code]. + <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true"> + If [code]true[/code], other monitoring areas can detect this area. </member> - <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> - If [code]true[/code], the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. + <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" default="true"> + If [code]true[/code], the area detects bodies or areas entering and exiting it. </member> - <member name="priority" type="float" setter="set_priority" getter="get_priority"> - The area's priority. Higher priority areas are processed first. Default value: 0. + <member name="priority" type="float" setter="set_priority" getter="get_priority" default="0.0"> + The area's priority. Higher priority areas are processed first. </member> - <member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount"> + <member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount" default="0.0"> The degree to which this area applies reverb to its associated audio. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. </member> - <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus"> + <member name="reverb_bus_enable" type="bool" setter="set_use_reverb_bus" getter="is_using_reverb_bus" default="false"> If [code]true[/code], the area applies reverb to its associated audio. </member> - <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus"> + <member name="reverb_bus_name" type="String" setter="set_reverb_bus" getter="get_reverb_bus" default=""Master""> The reverb bus name to use for this area's associated audio. </member> - <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity"> + <member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity" default="0.0"> The degree to which this area's reverb is a uniform effect. Ranges from [code]0[/code] to [code]1[/code] with [code]0.1[/code] precision. </member> - <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride"> + <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride" default="0"> Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values. </member> </members> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index c287f2b6f5..e1cb9056da 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -47,7 +47,8 @@ <argument index="0" name="area" type="Node"> </argument> <description> - If [code]true[/code], the given area overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given area overlaps the Area2D. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> @@ -56,7 +57,8 @@ <argument index="0" name="body" type="Node"> </argument> <description> - If [code]true[/code], the given physics body overlaps the Area2D. Note that the result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + If [code]true[/code], the given physics body overlaps the Area2D. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). </description> </method> @@ -84,46 +86,46 @@ </method> </methods> <members> - <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp"> + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="1.0"> The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name"> + <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name" default=""Master""> The name of the area's audio bus. </member> - <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus"> - If [code]true[/code], the area's audio bus overrides the default audio bus. Default value: [code]false[/code]. + <member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus" default="false"> + If [code]true[/code], the area's audio bus overrides the default audio bus. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [member collision_mask]. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this area scans to determine collision detection. </member> - <member name="gravity" type="float" setter="set_gravity" getter="get_gravity"> + <member name="gravity" type="float" setter="set_gravity" getter="get_gravity" default="98.0"> The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction. </member> - <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale"> + <member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale" default="0.0"> The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance. </member> - <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point"> - If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). Also see [member space_override]. Default value: [code]false[/code]. + <member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point" default="false"> + If [code]true[/code], gravity is calculated from a point (set via [member gravity_vec]). See also [member space_override]. </member> - <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector"> + <member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector" default="Vector2( 0, 1 )"> The area's gravity vector (not normalized). If gravity is a point (see [member gravity_point]), this will be the point of attraction. </member> - <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="0.1"> The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping). </member> - <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable"> - If [code]true[/code], other monitoring areas can detect this area. Default value: [code]true[/code]. + <member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable" default="true"> + If [code]true[/code], other monitoring areas can detect this area. </member> - <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring"> - If [code]true[/code], the area detects bodies or areas entering and exiting it. Default value: [code]true[/code]. + <member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring" default="true"> + If [code]true[/code], the area detects bodies or areas entering and exiting it. </member> - <member name="priority" type="float" setter="set_priority" getter="get_priority"> - The area's priority. Higher priority areas are processed first. Default value: 0. + <member name="priority" type="float" setter="set_priority" getter="get_priority" default="0.0"> + The area's priority. Higher priority areas are processed first. </member> - <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride"> + <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride" default="0"> Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values. </member> </members> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 75194fbf76..130908b842 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -4,7 +4,8 @@ Generic array datatype. </brief_description> <description> - Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). Example: + Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). + [b]Example:[/b] [codeblock] var array = ["One", 2, 3, "Four"] print(array[0]) # One @@ -103,7 +104,8 @@ <argument index="1" name="before" type="bool" default="True"> </argument> <description> - Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a before specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. Note that calling bsearch on an unsorted array results in unexpected behavior. + Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. + [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> <method name="bsearch_custom"> @@ -118,12 +120,13 @@ <argument index="3" name="before" type="bool" default="True"> </argument> <description> - Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a before specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. Note that calling bsearch on an unsorted array results in unexpected behavior. + Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. + [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> <method name="clear"> <description> - Clears the array (resizes to 0). + Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]. </description> </method> <method name="count"> @@ -275,7 +278,7 @@ <argument index="0" name="size" type="int"> </argument> <description> - Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null. + Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code]. </description> </method> <method name="rfind"> @@ -303,7 +306,8 @@ </method> <method name="sort"> <description> - Sorts the array. Note: strings are sorted in alphabetical, not natural order. + Sorts the array. + [b]Note:[/b] strings are sorted in alphabetical, not natural order. </description> </method> <method name="sort_custom"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 19fe833334..9f32691e57 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -31,7 +31,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Add name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. + Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. </description> </method> <method name="add_surface_from_arrays"> @@ -57,7 +57,7 @@ <return type="void"> </return> <description> - Remove all blend shapes from this [ArrayMesh]. + Removes all blend shapes from this [ArrayMesh]. </description> </method> <method name="get_blend_shape_count" qualifiers="const"> @@ -100,7 +100,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found -1 is returned. + Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned. </description> </method> <method name="surface_get_array_index_len" qualifiers="const"> @@ -136,7 +136,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> - Get the name assigned to this surface. + Gets the name assigned to this surface. </description> </method> <method name="surface_get_primitive_type" qualifiers="const"> @@ -154,7 +154,7 @@ <argument index="0" name="surf_idx" type="int"> </argument> <description> - Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down. + Removes a surface at position [code]surf_idx[/code], shifting greater surfaces one [code]surf_idx[/code] slot down. </description> </method> <method name="surface_set_name"> @@ -165,7 +165,7 @@ <argument index="1" name="name" type="String"> </argument> <description> - Set a name for a given surface. + Sets a name for a given surface. </description> </method> <method name="surface_update_region"> @@ -178,15 +178,16 @@ <argument index="2" name="data" type="PoolByteArray"> </argument> <description> - Updates a specified region of mesh arrays on GPU. Warning: only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments. + Updates a specified region of mesh arrays on the GPU. + [b]Warning:[/b] Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments. </description> </method> </methods> <members> - <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode"> + <member name="blend_shape_mode" type="int" setter="set_blend_shape_mode" getter="get_blend_shape_mode" enum="Mesh.BlendShapeMode" default="1"> </member> - <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb"> - Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. + <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> + Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. </member> </members> <constants> diff --git a/doc/classes/AtlasTexture.xml b/doc/classes/AtlasTexture.xml index e573512f5a..1363287dc1 100644 --- a/doc/classes/AtlasTexture.xml +++ b/doc/classes/AtlasTexture.xml @@ -12,16 +12,16 @@ <methods> </methods> <members> - <member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas"> + <member name="atlas" type="Texture" setter="set_atlas" getter="get_atlas" default="null"> The texture that contains the atlas. Can be any [Texture] subtype. </member> - <member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip"> + <member name="filter_clip" type="bool" setter="set_filter_clip" getter="has_filter_clip" default="false"> If [code]true[/code], clips the area outside of the region to avoid bleeding of the surrounding texture pixels. </member> - <member name="margin" type="Rect2" setter="set_margin" getter="get_margin"> - The margin around the region. The [Rect2]'s 'size' parameter ('w' and 'h' in the editor) resizes the texture so it fits within the margin. + <member name="margin" type="Rect2" setter="set_margin" getter="get_margin" default="Rect2( 0, 0, 0, 0 )"> + The margin around the region. The [Rect2]'s [member Rect2.size] parameter ("w" and "h" in the editor) resizes the texture so it fits within the margin. </member> - <member name="region" type="Rect2" setter="set_region" getter="get_region"> + <member name="region" type="Rect2" setter="set_region" getter="get_region" default="Rect2( 0, 0, 0, 0 )"> The AtlasTexture's used region. </member> </members> diff --git a/doc/classes/AudioBusLayout.xml b/doc/classes/AudioBusLayout.xml index 771e0390d3..fb36440a67 100644 --- a/doc/classes/AudioBusLayout.xml +++ b/doc/classes/AudioBusLayout.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioBusLayout" inherits="Resource" category="Core" version="3.2"> <brief_description> - Stores information about the audiobusses. + Stores information about the audio buses. </brief_description> <description> Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See [AudioServer] for usage. diff --git a/doc/classes/AudioEffect.xml b/doc/classes/AudioEffect.xml index 7c21d04b03..3e7863a44c 100644 --- a/doc/classes/AudioEffect.xml +++ b/doc/classes/AudioEffect.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffect" inherits="Resource" category="Core" version="3.2"> <brief_description> - Audio Effect For Audio. + Audio effect for audio. </brief_description> <description> Base resource for audio bus. Applies an audio effect on the bus that the resource is applied on. diff --git a/doc/classes/AudioEffectAmplify.xml b/doc/classes/AudioEffectAmplify.xml index 9fd3e73b12..3003238eb9 100644 --- a/doc/classes/AudioEffectAmplify.xml +++ b/doc/classes/AudioEffectAmplify.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectAmplify" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Amplify audio effect to an Audio bus. + Adds an amplifying audio effect to an audio bus. Increases or decreases the volume of the selected audio bus. </brief_description> <description> @@ -12,8 +12,8 @@ <methods> </methods> <members> - <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db"> - Amount of amplification. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. Default value: [code]0[/code]. + <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> + Amount of amplification in decibels. Positive values make the sound louder, negative values make it quieter. Value can range from -80 to 24. </member> </members> <constants> diff --git a/doc/classes/AudioEffectBandLimitFilter.xml b/doc/classes/AudioEffectBandLimitFilter.xml index 1b511dfab0..f85c8cdd32 100644 --- a/doc/classes/AudioEffectBandLimitFilter.xml +++ b/doc/classes/AudioEffectBandLimitFilter.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectBandLimitFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> <brief_description> - Adds a band limit filter to the Audio Bus. + Adds a band limit filter to the audio bus. </brief_description> <description> Limits the frequencies in a range around the [member AudioEffectFilter.cutoff_hz] and allows frequencies outside of this range to pass. diff --git a/doc/classes/AudioEffectBandPassFilter.xml b/doc/classes/AudioEffectBandPassFilter.xml index 8df922da3a..359eb9d669 100644 --- a/doc/classes/AudioEffectBandPassFilter.xml +++ b/doc/classes/AudioEffectBandPassFilter.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectBandPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> <brief_description> - Adds a band pass filter to the Audio Bus. + Adds a band pass filter to the audio bus. </brief_description> <description> Attenuates the frequencies inside of a range around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this band. diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml index f85755df08..13bc6ac097 100644 --- a/doc/classes/AudioEffectChorus.xml +++ b/doc/classes/AudioEffectChorus.xml @@ -11,43 +11,43 @@ <methods> </methods> <members> - <member name="dry" type="float" setter="set_dry" getter="get_dry"> + <member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0"> The effect's raw signal. </member> - <member name="voice/1/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz"> + <member name="voice/1/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" default="8000.0"> The voice's cutoff frequency. </member> - <member name="voice/1/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms"> + <member name="voice/1/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" default="15.0"> The voice's signal delay. </member> - <member name="voice/1/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms"> + <member name="voice/1/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" default="2.0"> The voice filter's depth. </member> - <member name="voice/1/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db"> + <member name="voice/1/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" default="0.0"> The voice's volume. </member> - <member name="voice/1/pan" type="float" setter="set_voice_pan" getter="get_voice_pan"> + <member name="voice/1/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" default="-0.5"> The voice's pan level. </member> - <member name="voice/1/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz"> + <member name="voice/1/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" default="0.8"> The voice's filter rate. </member> - <member name="voice/2/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz"> + <member name="voice/2/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz" default="8000.0"> The voice's cutoff frequency. </member> - <member name="voice/2/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms"> + <member name="voice/2/delay_ms" type="float" setter="set_voice_delay_ms" getter="get_voice_delay_ms" default="20.0"> The voice's signal delay. </member> - <member name="voice/2/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms"> + <member name="voice/2/depth_ms" type="float" setter="set_voice_depth_ms" getter="get_voice_depth_ms" default="3.0"> The voice filter's depth. </member> - <member name="voice/2/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db"> + <member name="voice/2/level_db" type="float" setter="set_voice_level_db" getter="get_voice_level_db" default="0.0"> The voice's volume. </member> - <member name="voice/2/pan" type="float" setter="set_voice_pan" getter="get_voice_pan"> + <member name="voice/2/pan" type="float" setter="set_voice_pan" getter="get_voice_pan" default="0.5"> The voice's pan level. </member> - <member name="voice/2/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz"> + <member name="voice/2/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz" default="1.2"> The voice's filter rate. </member> <member name="voice/3/cutoff_hz" type="float" setter="set_voice_cutoff_hz" getter="get_voice_cutoff_hz"> @@ -86,10 +86,10 @@ <member name="voice/4/rate_hz" type="float" setter="set_voice_rate_hz" getter="get_voice_rate_hz"> The voice's filter rate. </member> - <member name="voice_count" type="int" setter="set_voice_count" getter="get_voice_count"> + <member name="voice_count" type="int" setter="set_voice_count" getter="get_voice_count" default="2"> The amount of voices in the effect. </member> - <member name="wet" type="float" setter="set_wet" getter="get_wet"> + <member name="wet" type="float" setter="set_wet" getter="get_wet" default="0.5"> The effect's processed signal. </member> </members> diff --git a/doc/classes/AudioEffectCompressor.xml b/doc/classes/AudioEffectCompressor.xml index 78b8047987..6834804ea7 100644 --- a/doc/classes/AudioEffectCompressor.xml +++ b/doc/classes/AudioEffectCompressor.xml @@ -1,15 +1,15 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectCompressor" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Compressor audio effect to an Audio bus. + Adds a compressor audio effect to an audio bus. Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume. </brief_description> <description> Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB). Compressor has many uses in the mix: - - In the Master bus to compress the whole output (Although a [AudioEffectLimiter] is probably better) + - In the Master bus to compress the whole output (although an [AudioEffectLimiter] is probably better). - In voice channels to ensure they sound as balanced as possible. - - Sidechained. Sidechained, which can reduce the sound level sidechained with another audio bus for threshold detection.. This technique is very common in video game mixing to download the level of Music/SFX while voices are being heard. + - Sidechained. This can reduce the sound level sidechained with another audio bus for threshold detection. This technique is common in video game mixing to the level of music and SFX while voices are being heard. - Accentuates transients by using a wider attack, making effects sound more punchy. </description> <tutorials> @@ -17,26 +17,26 @@ <methods> </methods> <members> - <member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us"> - Compressor's reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: [code]20ms[/code]. + <member name="attack_us" type="float" setter="set_attack_us" getter="get_attack_us" default="20.0"> + Compressor's reaction time when the signal exceeds the threshold, in microseconds. Value can range from 20 to 2000. </member> - <member name="gain" type="float" setter="set_gain" getter="get_gain"> + <member name="gain" type="float" setter="set_gain" getter="get_gain" default="0.0"> Gain applied to the output signal. </member> - <member name="mix" type="float" setter="set_mix" getter="get_mix"> - Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). Default value: [code]1[/code]. + <member name="mix" type="float" setter="set_mix" getter="get_mix" default="1.0"> + Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). </member> - <member name="ratio" type="float" setter="set_ratio" getter="get_ratio"> - Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: [code]4[/code]. + <member name="ratio" type="float" setter="set_ratio" getter="get_ratio" default="4.0"> + Amount of compression applied to the audio once it passes the threshold level. The higher the ratio, the more the loud parts of the audio will be compressed. Value can range from 1 to 48. </member> - <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms"> - Compressor's delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: [code]250ms[/code]. + <member name="release_ms" type="float" setter="set_release_ms" getter="get_release_ms" default="250.0"> + Compressor's delay time to stop reducing the signal after the signal level falls below the threshold, in milliseconds. Value can range from 20 to 2000. </member> - <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain"> + <member name="sidechain" type="String" setter="set_sidechain" getter="get_sidechain" default=""""> Reduce the sound level using another audio bus for threshold detection. </member> - <member name="threshold" type="float" setter="set_threshold" getter="get_threshold"> - The level above which compression is applied to the audio. Value can range from -60 to 0. Default value: [code]0[/code]. + <member name="threshold" type="float" setter="set_threshold" getter="get_threshold" default="0.0"> + The level above which compression is applied to the audio. Value can range from -60 to 0. </member> </members> <constants> diff --git a/doc/classes/AudioEffectDelay.xml b/doc/classes/AudioEffectDelay.xml index 0e19a4a89f..aea6ead983 100644 --- a/doc/classes/AudioEffectDelay.xml +++ b/doc/classes/AudioEffectDelay.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectDelay" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Delay audio effect to an Audio bus. Plays input signal back after a period of time. + Adds a delay audio effect to an audio bus. Plays input signal back after a period of time. Two tap delay and feedback options. </brief_description> <description> @@ -12,44 +12,44 @@ <methods> </methods> <members> - <member name="dry" type="float" setter="set_dry" getter="get_dry"> - Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. Default value: [code]1[/code]. + <member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0"> + Output percent of original sound. At 0, only delayed sounds are output. Value can range from 0 to 1. </member> - <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active"> - If [code]true[/code], feedback is enabled. Default value: [code]false[/code]. + <member name="feedback/active" type="bool" setter="set_feedback_active" getter="is_feedback_active" default="false"> + If [code]true[/code], feedback is enabled. </member> - <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms"> - Feedback delay time in milliseconds. Default value: [code]340[/code]. + <member name="feedback/delay_ms" type="float" setter="set_feedback_delay_ms" getter="get_feedback_delay_ms" default="340.0"> + Feedback delay time in milliseconds. </member> - <member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db"> - Sound level for [code]tap1[/code]. Default value: [code]-6 dB[/code]. + <member name="feedback/level_db" type="float" setter="set_feedback_level_db" getter="get_feedback_level_db" default="-6.0"> + Sound level for [code]tap1[/code]. </member> - <member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass"> - Low-pass filter for feedback. Frequencies below the Low Cut value are filtered out of the source signal. Default value: [code]16000[/code]. + <member name="feedback/lowpass" type="float" setter="set_feedback_lowpass" getter="get_feedback_lowpass" default="16000.0"> + Low-pass filter for feedback, in Hz. Frequencies below this value are filtered out of the source signal. </member> - <member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active"> - If [code]true[/code], [code]tap1[/code] will be enabled. Default value: [code]true[/code]. + <member name="tap1/active" type="bool" setter="set_tap1_active" getter="is_tap1_active" default="true"> + If [code]true[/code], [code]tap1[/code] will be enabled. </member> - <member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms"> - [b]Tap1[/b] delay time in milliseconds. Default value: [code]250ms[/code]. + <member name="tap1/delay_ms" type="float" setter="set_tap1_delay_ms" getter="get_tap1_delay_ms" default="250.0"> + [code]tap1[/code] delay time in milliseconds. </member> - <member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db"> - Sound level for [code]tap1[/code]. Default value: [code]-6 dB[/code]. + <member name="tap1/level_db" type="float" setter="set_tap1_level_db" getter="get_tap1_level_db" default="-6.0"> + Sound level for [code]tap1[/code]. </member> - <member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan"> - Pan position for [code]tap1[/code]. Value can range from -1 (fully left) to 1 (fully right). Default value: [code]0.2[/code]. + <member name="tap1/pan" type="float" setter="set_tap1_pan" getter="get_tap1_pan" default="0.2"> + Pan position for [code]tap1[/code]. Value can range from -1 (fully left) to 1 (fully right). </member> - <member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active"> - If [code]true[/code], [code]tap2[/code] will be enabled. Default value: [code]true[/code]. + <member name="tap2/active" type="bool" setter="set_tap2_active" getter="is_tap2_active" default="true"> + If [code]true[/code], [code]tap2[/code] will be enabled. </member> - <member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms"> - [b]Tap2[/b] delay time in milliseconds. Default value: [code]500ms[/code]. + <member name="tap2/delay_ms" type="float" setter="set_tap2_delay_ms" getter="get_tap2_delay_ms" default="500.0"> + [b]Tap2[/b] delay time in milliseconds. </member> - <member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db"> - Sound level for [code]tap2[/code]. Default value: [code]-12 dB[/code]. + <member name="tap2/level_db" type="float" setter="set_tap2_level_db" getter="get_tap2_level_db" default="-12.0"> + Sound level for [code]tap2[/code]. </member> - <member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan"> - Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right). Default value: [code]-0.4[/code]. + <member name="tap2/pan" type="float" setter="set_tap2_pan" getter="get_tap2_pan" default="-0.4"> + Pan position for [code]tap2[/code]. Value can range from -1 (fully left) to 1 (fully right). </member> </members> <constants> diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml index cf02a8fb6d..0ee7d73f88 100644 --- a/doc/classes/AudioEffectDistortion.xml +++ b/doc/classes/AudioEffectDistortion.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectDistortion" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Distortion audio effect to an Audio bus. + Adds a distortion audio effect to an Audio bus. Modify the sound to make it dirty. </brief_description> <description> - Modify the sound and make it dirty. Different types are available : clip, tan, lofi (bit crushing), overdrive, or waveshape. + Modify the sound and make it dirty. Different types are available: clip, tan, lo-fi (bit crushing), overdrive, or waveshape. By distorting the waveform the frequency content change, which will often make the sound "crunchy" or "abrasive". For games, it can simulate sound coming from some saturated device or speaker very efficiently. </description> <tutorials> @@ -13,20 +13,20 @@ <methods> </methods> <members> - <member name="drive" type="float" setter="set_drive" getter="get_drive"> - Distortion power. Value can range from 0 to 1. Default value: [code]0[/code]. + <member name="drive" type="float" setter="set_drive" getter="get_drive" default="0.0"> + Distortion power. Value can range from 0 to 1. </member> - <member name="keep_hf_hz" type="float" setter="set_keep_hf_hz" getter="get_keep_hf_hz"> - High-pass filter. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. Default value: [code]16000[/code]. + <member name="keep_hf_hz" type="float" setter="set_keep_hf_hz" getter="get_keep_hf_hz" default="16000.0"> + High-pass filter, in Hz. Frequencies higher than this value will not be affected by the distortion. Value can range from 1 to 20000. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="AudioEffectDistortion.Mode"> - Distortion type. Default value: [constant MODE_CLIP]. + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="AudioEffectDistortion.Mode" default="0"> + Distortion type. </member> - <member name="post_gain" type="float" setter="set_post_gain" getter="get_post_gain"> - Increases or decreases the volume after the effect. Value can range from -80 to 24. Default value: [code]0[/code]. + <member name="post_gain" type="float" setter="set_post_gain" getter="get_post_gain" default="0.0"> + Increases or decreases the volume after the effect. Value can range from -80 to 24. </member> - <member name="pre_gain" type="float" setter="set_pre_gain" getter="get_pre_gain"> - Increases or decreases the volume before the effect. Value can range from -60 to 60. Default value: [code]0[/code]. + <member name="pre_gain" type="float" setter="set_pre_gain" getter="get_pre_gain" default="0.0"> + Increases or decreases the volume before the effect. Value can range from -60 to 60. </member> </members> <constants> diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml index fef3868d02..d30b6fc71d 100644 --- a/doc/classes/AudioEffectEQ.xml +++ b/doc/classes/AudioEffectEQ.xml @@ -5,7 +5,7 @@ Use it to create a custom equalizer if [AudioEffectEQ6], [AudioEffectEQ10] or [AudioEffectEQ21] don't fit your needs. </brief_description> <description> - AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQ are very useful on the Master Bus to completely master a mix and give it character. They are also very useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). + AudioEffectEQ gives you control over frequencies. Use it to compensate for existing deficiencies in audio. AudioEffectEQs are useful on the Master bus to completely master a mix and give it more character. They are also useful when a game is run on a mobile device, to adjust the mix to that kind of speakers (it can be added but disabled when headphones are plugged). </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioEffectEQ10.xml b/doc/classes/AudioEffectEQ10.xml index e9fd0d72cb..e94c4c71df 100644 --- a/doc/classes/AudioEffectEQ10.xml +++ b/doc/classes/AudioEffectEQ10.xml @@ -5,17 +5,17 @@ Each frequency can be modulated between -60/+24 dB. </brief_description> <description> - Frequency bands : - Band 1 : 31 Hz - Band 2 : 62 Hz - Band 3 : 125 Hz - Band 4 : 250 Hz - Band 5 : 500 Hz - Band 6 : 1000 Hz - Band 7 : 2000 Hz - Band 8 : 4000 Hz - Band 9 : 8000 Hz - Band 10 : 16000 Hz + Frequency bands: + Band 1: 31 Hz + Band 2: 62 Hz + Band 3: 125 Hz + Band 4: 250 Hz + Band 5: 500 Hz + Band 6: 1000 Hz + Band 7: 2000 Hz + Band 8: 4000 Hz + Band 9: 8000 Hz + Band 10: 16000 Hz See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ21]. </description> <tutorials> diff --git a/doc/classes/AudioEffectEQ21.xml b/doc/classes/AudioEffectEQ21.xml index d1b39d9824..dd26e06ee8 100644 --- a/doc/classes/AudioEffectEQ21.xml +++ b/doc/classes/AudioEffectEQ21.xml @@ -5,28 +5,28 @@ Each frequency can be modulated between -60/+24 dB. </brief_description> <description> - Frequency bands : - Band 1 : 22 Hz - Band 2 : 32 Hz - Band 3 : 44 Hz - Band 4 : 63 Hz - Band 5 : 90 Hz - Band 6 : 125 Hz - Band 7 : 175 Hz - Band 8 : 250 Hz - Band 9 : 350 Hz - Band 10 : 500 Hz - Band 11 : 700 Hz - Band 12 : 1000 Hz - Band 13 : 1400 Hz - Band 14 : 2000 Hz - Band 15 : 2800 Hz - Band 16 : 4000 Hz - Band 17 : 5600 Hz - Band 18 : 8000 Hz - Band 19 : 11000 Hz - Band 20 : 16000 Hz - Band 21 : 22000 Hz + Frequency bands: + Band 1: 22 Hz + Band 2: 32 Hz + Band 3: 44 Hz + Band 4: 63 Hz + Band 5: 90 Hz + Band 6: 125 Hz + Band 7: 175 Hz + Band 8: 250 Hz + Band 9: 350 Hz + Band 10: 500 Hz + Band 11: 700 Hz + Band 12: 1000 Hz + Band 13: 1400 Hz + Band 14: 2000 Hz + Band 15: 2800 Hz + Band 16: 4000 Hz + Band 17: 5600 Hz + Band 18: 8000 Hz + Band 19: 11000 Hz + Band 20: 16000 Hz + Band 21: 22000 Hz See also [AudioEffectEQ], [AudioEffectEQ6], [AudioEffectEQ10]. </description> <tutorials> diff --git a/doc/classes/AudioEffectEQ6.xml b/doc/classes/AudioEffectEQ6.xml index d40471dbd6..eb3dc738ef 100644 --- a/doc/classes/AudioEffectEQ6.xml +++ b/doc/classes/AudioEffectEQ6.xml @@ -5,13 +5,13 @@ Each frequency can be modulated between -60/+24 dB. </brief_description> <description> - Frequency bands : - Band 1 : 32 Hz - Band 2 : 100 Hz - Band 3 : 320 Hz - Band 4 : 1000 Hz - Band 5 : 3200 Hz - Band 6 : 10000 Hz + Frequency bands: + Band 1: 32 Hz + Band 2: 100 Hz + Band 3: 320 Hz + Band 4: 1000 Hz + Band 5: 3200 Hz + Band 6: 10000 Hz See also [AudioEffectEQ], [AudioEffectEQ10], [AudioEffectEQ21]. </description> <tutorials> diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml index 5ed4ae28db..5daad6748f 100644 --- a/doc/classes/AudioEffectFilter.xml +++ b/doc/classes/AudioEffectFilter.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectFilter" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a filter to the Audio Bus. + Adds a filter to the audio bus. </brief_description> <description> Allows frequencies other than the [member cutoff_hz] to pass. @@ -11,15 +11,15 @@ <methods> </methods> <members> - <member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff"> - Threshold frequency for the filter. + <member name="cutoff_hz" type="float" setter="set_cutoff" getter="get_cutoff" default="2000.0"> + Threshold frequency for the filter, in Hz. </member> - <member name="db" type="int" setter="set_db" getter="get_db" enum="AudioEffectFilter.FilterDB"> + <member name="db" type="int" setter="set_db" getter="get_db" enum="AudioEffectFilter.FilterDB" default="0"> </member> - <member name="gain" type="float" setter="set_gain" getter="get_gain"> + <member name="gain" type="float" setter="set_gain" getter="get_gain" default="1.0"> Gain amount of the frequencies after the filter. </member> - <member name="resonance" type="float" setter="set_resonance" getter="get_resonance"> + <member name="resonance" type="float" setter="set_resonance" getter="get_resonance" default="0.5"> Amount of boost in the overtones near the cutoff frequency. </member> </members> diff --git a/doc/classes/AudioEffectHighPassFilter.xml b/doc/classes/AudioEffectHighPassFilter.xml index 3a486acab8..589195da02 100644 --- a/doc/classes/AudioEffectHighPassFilter.xml +++ b/doc/classes/AudioEffectHighPassFilter.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectHighPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> <brief_description> - Adds a high pass filter to the Audio Bus. + Adds a high-pass filter to the Audio Bus. </brief_description> <description> Cuts frequencies lower than the [member AudioEffectFilter.cutoff_hz] and allows higher frequencies to pass. diff --git a/doc/classes/AudioEffectLimiter.xml b/doc/classes/AudioEffectLimiter.xml index c17816bb87..ee6252809a 100644 --- a/doc/classes/AudioEffectLimiter.xml +++ b/doc/classes/AudioEffectLimiter.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectLimiter" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a soft clip Limiter audio effect to an Audio bus. + Adds a soft-clip limiter audio effect to an Audio bus. </brief_description> <description> - A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master Bus is always recommended to reduce the effects of clipping. + A limiter is similar to a compressor, but it's less flexible and designed to disallow sound going over a given dB threshold. Adding one in the Master bus is always recommended to reduce the effects of clipping. Soft clipping starts to reduce the peaks a little below the threshold level and progressively increases its effect as the input level increases such that the threshold is never exceeded. </description> <tutorials> @@ -12,16 +12,16 @@ <methods> </methods> <members> - <member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db"> - The waveform's maximum allowed value. Value can range from -20 to -0.1. Default value: [code]-0.1dB[/code]. + <member name="ceiling_db" type="float" setter="set_ceiling_db" getter="get_ceiling_db" default="-0.1"> + The waveform's maximum allowed value, in decibels. Value can range from -20 to -0.1. </member> - <member name="soft_clip_db" type="float" setter="set_soft_clip_db" getter="get_soft_clip_db"> - Applies a gain to the limited waves. Value can range from 0 to 6. Default value: [code]2dB[/code]. + <member name="soft_clip_db" type="float" setter="set_soft_clip_db" getter="get_soft_clip_db" default="2.0"> + Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. </member> - <member name="soft_clip_ratio" type="float" setter="set_soft_clip_ratio" getter="get_soft_clip_ratio"> + <member name="soft_clip_ratio" type="float" setter="set_soft_clip_ratio" getter="get_soft_clip_ratio" default="10.0"> </member> - <member name="threshold_db" type="float" setter="set_threshold_db" getter="get_threshold_db"> - Threshold from which the limiter begins to be active. Value can range from -30 to 0. Default value: [code]0dB[/code]. + <member name="threshold_db" type="float" setter="set_threshold_db" getter="get_threshold_db" default="0.0"> + Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. </member> </members> <constants> diff --git a/doc/classes/AudioEffectLowPassFilter.xml b/doc/classes/AudioEffectLowPassFilter.xml index 9402045150..c0319a6713 100644 --- a/doc/classes/AudioEffectLowPassFilter.xml +++ b/doc/classes/AudioEffectLowPassFilter.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectLowPassFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> <brief_description> - Adds a low pass filter to the Audio Bus. + Adds a low-pass filter to the Audio bus. </brief_description> <description> Cuts frequencies higher than the [member AudioEffectFilter.cutoff_hz] and allows lower frequencies to pass. diff --git a/doc/classes/AudioEffectNotchFilter.xml b/doc/classes/AudioEffectNotchFilter.xml index 00e950b43a..4b5cfd7e51 100644 --- a/doc/classes/AudioEffectNotchFilter.xml +++ b/doc/classes/AudioEffectNotchFilter.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectNotchFilter" inherits="AudioEffectFilter" category="Core" version="3.2"> <brief_description> - Adds a notch filter to the Audio Bus. + Adds a notch filter to the Audio bus. </brief_description> <description> Attenuates frequencies in a narrow band around the [member AudioEffectFilter.cutoff_hz] and cuts frequencies outside of this range. diff --git a/doc/classes/AudioEffectPanner.xml b/doc/classes/AudioEffectPanner.xml index 7d01a73b0b..e3a2dfcf21 100644 --- a/doc/classes/AudioEffectPanner.xml +++ b/doc/classes/AudioEffectPanner.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPanner" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Panner audio effect to an Audio bus. Pans sound left or right. + Adds a panner audio effect to an Audio bus. Pans sound left or right. </brief_description> <description> Determines how much of an audio signal is sent to the left and right buses. @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="pan" type="float" setter="set_pan" getter="get_pan"> + <member name="pan" type="float" setter="set_pan" getter="get_pan" default="0.0"> Pan position. Value can range from -1 (fully left) to 1 (fully right). </member> </members> diff --git a/doc/classes/AudioEffectPhaser.xml b/doc/classes/AudioEffectPhaser.xml index c42b5f59ee..445f78dd73 100644 --- a/doc/classes/AudioEffectPhaser.xml +++ b/doc/classes/AudioEffectPhaser.xml @@ -1,31 +1,31 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPhaser" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Phaser audio effect to an Audio bus. + Adds a phaser audio effect to an Audio bus. Combines the original signal with a copy that is slightly out of phase with the original. </brief_description> <description> - Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a Low Frequency Oscillator. + Combines phase-shifted signals with the original signal. The movement of the phase-shifted signals is controlled using a low-frequency oscillator. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="depth" type="float" setter="set_depth" getter="get_depth"> - Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. Default value: [code]1[/code]. + <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0"> + Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. </member> - <member name="feedback" type="float" setter="set_feedback" getter="get_feedback"> - Output percent of modified sound. Value can range from 0.1 to 0.9. Default value: [code]0.7[/code]. + <member name="feedback" type="float" setter="set_feedback" getter="get_feedback" default="0.7"> + Output percent of modified sound. Value can range from 0.1 to 0.9. </member> - <member name="range_max_hz" type="float" setter="set_range_max_hz" getter="get_range_max_hz"> - Determines the maximum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: [code]1600hz[/code]. + <member name="range_max_hz" type="float" setter="set_range_max_hz" getter="get_range_max_hz" default="1600.0"> + Determines the maximum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. </member> - <member name="range_min_hz" type="float" setter="set_range_min_hz" getter="get_range_min_hz"> - Determines the minimum frequency affected by the LFO modulations. Value can range from 10 to 10000. Default value: [code]440hz[/code]. + <member name="range_min_hz" type="float" setter="set_range_min_hz" getter="get_range_min_hz" default="440.0"> + Determines the minimum frequency affected by the LFO modulations, in Hz. Value can range from 10 to 10000. </member> - <member name="rate_hz" type="float" setter="set_rate_hz" getter="get_rate_hz"> - Adjusts the rate at which the effect sweeps up and down across the frequency range. + <member name="rate_hz" type="float" setter="set_rate_hz" getter="get_rate_hz" default="0.5"> + Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. </member> </members> <constants> diff --git a/doc/classes/AudioEffectPitchShift.xml b/doc/classes/AudioEffectPitchShift.xml index 271e1a2a4c..1f891dfb32 100644 --- a/doc/classes/AudioEffectPitchShift.xml +++ b/doc/classes/AudioEffectPitchShift.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectPitchShift" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Pitch shift audio effect to an Audio bus. + Adds a pitch-shifting audio effect to an Audio bus. Raises or lowers the pitch of original sound. </brief_description> <description> @@ -12,11 +12,11 @@ <methods> </methods> <members> - <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFT_Size"> + <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectPitchShift.FFT_Size" default="3"> </member> - <member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling"> + <member name="oversampling" type="int" setter="set_oversampling" getter="get_oversampling" default="4"> </member> - <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale"> + <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> Pitch value. Can range from 0 (-1 octave) to 16 (+16 octaves). </member> </members> diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index d6e678f276..4f97797b37 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -29,7 +29,7 @@ </method> </methods> <members> - <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format"> + <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="1"> </member> </members> <constants> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index 8c9652eee2..a0664e727f 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioEffectReverb" inherits="AudioEffect" category="Core" version="3.2"> <brief_description> - Adds a Reverb audio effect to an Audio bus. + Adds a reverberation audio effect to an Audio bus. Simulates the sound of acoustic environments such as rooms, concert halls, caverns, or an open spaces. </brief_description> <description> @@ -12,29 +12,29 @@ <methods> </methods> <members> - <member name="damping" type="float" setter="set_damping" getter="get_damping"> - Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. Default value: [code]1[/code]. + <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.5"> + Defines how reflective the imaginary room's walls are. Value can range from 0 to 1. </member> - <member name="dry" type="float" setter="set_dry" getter="get_dry"> - Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. Default value: [code]1[/code]. + <member name="dry" type="float" setter="set_dry" getter="get_dry" default="1.0"> + Output percent of original sound. At 0, only modified sound is outputted. Value can range from 0 to 1. </member> - <member name="hipass" type="float" setter="set_hpf" getter="get_hpf"> - High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. Default value: [code]0[/code]. + <member name="hipass" type="float" setter="set_hpf" getter="get_hpf" default="0.0"> + High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. </member> - <member name="predelay_feedback" type="float" setter="set_predelay_feedback" getter="get_predelay_feedback"> - Output percent of predelay. Value can range from 0 to 1. Default value: [code]1[/code]. + <member name="predelay_feedback" type="float" setter="set_predelay_feedback" getter="get_predelay_feedback" default="0.4"> + Output percent of predelay. Value can range from 0 to 1. </member> - <member name="predelay_msec" type="float" setter="set_predelay_msec" getter="get_predelay_msec"> - Time between the original signal and the early reflections of the reverb signal. Default value: [code]150ms[/code]. + <member name="predelay_msec" type="float" setter="set_predelay_msec" getter="get_predelay_msec" default="150.0"> + Time between the original signal and the early reflections of the reverb signal, in milliseconds. </member> - <member name="room_size" type="float" setter="set_room_size" getter="get_room_size"> - Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. Default value: [code]0.8[/code]. + <member name="room_size" type="float" setter="set_room_size" getter="get_room_size" default="0.8"> + Dimensions of simulated room. Bigger means more echoes. Value can range from 0 to 1. </member> - <member name="spread" type="float" setter="set_spread" getter="get_spread"> - Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. Default value: [code]1[/code]. + <member name="spread" type="float" setter="set_spread" getter="get_spread" default="1.0"> + Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Value can range from 0 to 1. </member> - <member name="wet" type="float" setter="set_wet" getter="get_wet"> - Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. Default value: [code]0.5[/code]. + <member name="wet" type="float" setter="set_wet" getter="get_wet" default="0.5"> + Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. </member> </members> <constants> diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml index 21d74a8fb0..a56e4f2692 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzer.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml @@ -9,11 +9,11 @@ <methods> </methods> <members> - <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length"> + <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0"> </member> - <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFT_Size"> + <member name="fft_size" type="int" setter="set_fft_size" getter="get_fft_size" enum="AudioEffectSpectrumAnalyzer.FFT_Size" default="2"> </member> - <member name="tap_back_pos" type="float" setter="set_tap_back_pos" getter="get_tap_back_pos"> + <member name="tap_back_pos" type="float" setter="set_tap_back_pos" getter="get_tap_back_pos" default="0.01"> </member> </members> <constants> diff --git a/doc/classes/AudioEffectStereoEnhance.xml b/doc/classes/AudioEffectStereoEnhance.xml index 95bc6128f2..6cb692b5d7 100644 --- a/doc/classes/AudioEffectStereoEnhance.xml +++ b/doc/classes/AudioEffectStereoEnhance.xml @@ -9,11 +9,11 @@ <methods> </methods> <members> - <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout"> + <member name="pan_pullout" type="float" setter="set_pan_pullout" getter="get_pan_pullout" default="1.0"> </member> - <member name="surround" type="float" setter="set_surround" getter="get_surround"> + <member name="surround" type="float" setter="set_surround" getter="get_surround" default="0.0"> </member> - <member name="time_pullout_ms" type="float" setter="set_time_pullout" getter="get_time_pullout"> + <member name="time_pullout_ms" type="float" setter="set_time_pullout" getter="get_time_pullout" default="0.0"> </member> </members> <constants> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 6dc1600cf2..f063cfe5ce 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioServer" inherits="Object" category="Core" version="3.2"> <brief_description> - Server interface for low level audio access. + Server interface for low-level audio access. </brief_description> <description> - AudioServer is a low level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. + AudioServer is a low-level server interface for audio access. It is in charge of creating sample data (playable audio) as well as its playback via a voice interface. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_buses.html</link> @@ -177,6 +177,13 @@ <description> </description> </method> + <method name="get_global_rate_scale"> + <return type="float"> + </return> + <description> + Returns the global rate scale at which audio is being played. + </description> + </method> <method name="get_mix_rate" qualifiers="const"> <return type="float"> </return> @@ -390,6 +397,15 @@ <description> </description> </method> + <method name="set_global_rate_scale"> + <return type="void"> + </return> + <argument index="0" name="scale" type="float"> + </argument> + <description> + Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played twice as fast). + </description> + </method> <method name="swap_bus_effects"> <return type="void"> </return> @@ -407,10 +423,20 @@ <return type="void"> </return> <description> - Unlocks the audiodriver's main loop. After locking it always unlock it. + Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) </description> </method> </methods> + <members> + <member name="bus_count" type="int" setter="set_bus_count" getter="get_bus_count"> + Adds and removes buses to make the number of buses match [code]amount[/code]. + </member> + <member name="device" type="string" setter="set_device" getter="get_device"> + </member> + <member name="global_rate_scale" type="float" setter="set_global_rate_scale" getter="get_global_rate_scale"> + Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played twice as fast). + </member> + </members> <signals> <signal name="bus_layout_changed"> <description> diff --git a/doc/classes/AudioStreamGenerator.xml b/doc/classes/AudioStreamGenerator.xml index ab06ddd710..9d67b88c71 100644 --- a/doc/classes/AudioStreamGenerator.xml +++ b/doc/classes/AudioStreamGenerator.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length"> + <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5"> </member> - <member name="mix_rate" type="float" setter="set_mix_rate" getter="get_mix_rate"> + <member name="mix_rate" type="float" setter="set_mix_rate" getter="get_mix_rate" default="44100.0"> </member> </members> <constants> diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml index 773a396bc4..92e654a50f 100644 --- a/doc/classes/AudioStreamPlayback.xml +++ b/doc/classes/AudioStreamPlayback.xml @@ -4,7 +4,7 @@ Meta class for playing back audio. </brief_description> <description> - Can play, loop, pause a scroll through Audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage. + Can play, loop, pause a scroll through audio. See [AudioStream] and [AudioStreamOGGVorbis] for usage. </description> <tutorials> </tutorials> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index c6ec45f15e..92f3a9bd73 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamPlayer" inherits="Node" category="Core" version="3.2"> <brief_description> - Plays back audio. + Plays back audio non-positionally. </brief_description> <description> - Plays background audio. + Plays an audio stream non-positionally. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/audio/audio_streams.html</link> @@ -29,7 +29,7 @@ <argument index="0" name="from_position" type="float" default="0.0"> </argument> <description> - Plays the audio from the given position 'from_position', in seconds. + Plays the audio from the given [code]from_position[/code], in seconds. </description> </method> <method name="seek"> @@ -50,27 +50,27 @@ </method> </methods> <members> - <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. + <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> + If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus"> + <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> Bus on which this audio is playing. </member> - <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget"> + <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants. </member> - <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale"> + <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> Changes the pitch and the tempo of the audio. </member> - <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> + <member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false"> If [code]true[/code], audio is playing. </member> - <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> + <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream" default="null"> The [AudioStream] object to be played. </member> - <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused"> + <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> </member> - <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db"> + <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Volume of sound, in dB. </member> </members> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index 51bf5e7574..362a096810 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -29,7 +29,7 @@ <argument index="0" name="from_position" type="float" default="0.0"> </argument> <description> - Plays the audio from the given position 'from_position', in seconds. + Plays the audio from the given position [code]from_position[/code], in seconds. </description> </method> <method name="seek"> @@ -50,33 +50,33 @@ </method> </methods> <members> - <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask"> + <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" default="1"> Areas in which this sound plays. </member> - <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation"> + <member name="attenuation" type="float" setter="set_attenuation" getter="get_attenuation" default="1.0"> Dampens audio over distance with this as an exponent. </member> - <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. + <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> + If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus"> + <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> Bus on which this audio is playing. </member> - <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance"> + <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0"> Maximum distance from which audio is still hearable. </member> - <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale"> + <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> Changes the pitch and the tempo of the audio. </member> - <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> + <member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false"> If [code]true[/code], audio is playing. </member> - <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> + <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream" default="null"> The [AudioStream] object to be played. </member> - <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused"> + <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> </member> - <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db"> + <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Base volume without dampening. </member> </members> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 2bd3ac1eaa..d722f2164d 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -29,7 +29,7 @@ <argument index="0" name="from_position" type="float" default="0.0"> </argument> <description> - Plays the audio from the given position 'from_position', in seconds. + Plays the audio from the given position [code]from_position[/code], in seconds. </description> </method> <method name="seek"> @@ -50,67 +50,67 @@ </method> </methods> <members> - <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask"> + <member name="area_mask" type="int" setter="set_area_mask" getter="get_area_mask" default="1"> Areas in which this sound plays. </member> - <member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz"> + <member name="attenuation_filter_cutoff_hz" type="float" setter="set_attenuation_filter_cutoff_hz" getter="get_attenuation_filter_cutoff_hz" default="5000.0"> Dampens audio above this frequency, in Hz. </member> - <member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db"> + <member name="attenuation_filter_db" type="float" setter="set_attenuation_filter_db" getter="get_attenuation_filter_db" default="-24.0"> Amount how much the filter affects the loudness, in dB. </member> - <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel"> + <member name="attenuation_model" type="int" setter="set_attenuation_model" getter="get_attenuation_model" enum="AudioStreamPlayer3D.AttenuationModel" default="0"> Decides if audio should get quieter with distance linearly, quadratically, logarithmically, or not be affected by distance, effectively disabling attenuation. </member> - <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled"> - If [code]true[/code], audio plays when added to scene tree. Default value: [code]false[/code]. + <member name="autoplay" type="bool" setter="set_autoplay" getter="is_autoplay_enabled" default="false"> + If [code]true[/code], audio plays when added to scene tree. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus"> + <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> Bus on which this audio is playing. </member> - <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking"> + <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="AudioStreamPlayer3D.DopplerTracking" default="0"> Decides in which step the Doppler effect should be calculated. </member> - <member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle"> + <member name="emission_angle_degrees" type="float" setter="set_emission_angle" getter="get_emission_angle" default="45.0"> The angle in which the audio reaches cameras undampened. </member> - <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled"> + <member name="emission_angle_enabled" type="bool" setter="set_emission_angle_enabled" getter="is_emission_angle_enabled" default="false"> If [code]true[/code], the audio should be dampened according to the direction of the sound. </member> - <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db"> - dampens audio if camera is outside of 'emission_angle_degrees' and 'emission_angle_enabled' is set by this factor, in dB. + <member name="emission_angle_filter_attenuation_db" type="float" setter="set_emission_angle_filter_attenuation_db" getter="get_emission_angle_filter_attenuation_db" default="-12.0"> + Dampens audio if camera is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set by this factor, in dB. </member> - <member name="max_db" type="float" setter="set_max_db" getter="get_max_db"> + <member name="max_db" type="float" setter="set_max_db" getter="get_max_db" default="3.0"> Sets the absolute maximum of the soundlevel, in dB. </member> - <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance"> - Sets the distance from which the 'out_of_range_mode' takes effect. Has no effect if set to 0. + <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0"> + Sets the distance from which the [member out_of_range_mode] takes effect. Has no effect if set to 0. </member> - <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode"> - Decides if audio should pause when source is outside of 'max_distance' range. + <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode" default="0"> + Decides if audio should pause when source is outside of [member max_distance] range. </member> - <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale"> + <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> Changes the pitch and the tempo of the audio. </member> - <member name="playing" type="bool" setter="_set_playing" getter="is_playing"> + <member name="playing" type="bool" setter="_set_playing" getter="is_playing" default="false"> If [code]true[/code], audio is playing. </member> - <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream"> + <member name="stream" type="AudioStream" setter="set_stream" getter="get_stream" default="null"> The [AudioStream] object to be played. </member> - <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused"> + <member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false"> </member> - <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db"> + <member name="unit_db" type="float" setter="set_unit_db" getter="get_unit_db" default="0.0"> Base sound level unaffected by dampening, in dB. </member> - <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size"> + <member name="unit_size" type="float" setter="set_unit_size" getter="get_unit_size" default="1.0"> Factor for the attenuation effect. </member> </members> <signals> <signal name="finished"> <description> - Fires when the audio stops playing. + Emitted when the audio stops playing. </description> </signal> </signals> diff --git a/doc/classes/AudioStreamRandomPitch.xml b/doc/classes/AudioStreamRandomPitch.xml index 49aa5a0192..9c73a64537 100644 --- a/doc/classes/AudioStreamRandomPitch.xml +++ b/doc/classes/AudioStreamRandomPitch.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamRandomPitch" inherits="AudioStream" category="Core" version="3.2"> <brief_description> - Plays audio with random pitch tweaking. + Plays audio with random pitch shifting. </brief_description> <description> Randomly varies pitch on each start. @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream"> + <member name="audio_stream" type="AudioStream" setter="set_audio_stream" getter="get_audio_stream" default="null"> The current [AudioStream]. </member> - <member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch"> + <member name="random_pitch" type="float" setter="set_random_pitch" getter="get_random_pitch" default="1.1"> The intensity of random pitch variation. </member> </members> diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 4bcf8ea791..6d03301749 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="AudioStreamSample" inherits="AudioStream" category="Core" version="3.2"> <brief_description> - Stores audio data loaded from [code].wav[/code] files. + Stores audio data loaded from WAV files. </brief_description> <description> - AudioStreamSample stores sound samples loaded from [code].wav[/code] files. To play the stored sound use an [AudioStreamPlayer] (for background music) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped. - This class can also be used to store dynamically generated PCM audio data. + AudioStreamSample stores sound samples loaded from WAV files. To play the stored sound, use an [AudioStreamPlayer] (for non-positional audio) or [AudioStreamPlayer2D]/[AudioStreamPlayer3D] (for positional audio). The sound can be looped. + This class can also be used to store dynamically-generated PCM audio data. </description> <tutorials> </tutorials> @@ -17,54 +17,54 @@ </argument> <description> Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved. - Note that a [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing. + [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing. </description> </method> </methods> <members> - <member name="data" type="PoolByteArray" setter="set_data" getter="get_data"> + <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )"> Contains the audio data in bytes. </member> - <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format"> - Audio format. See FORMAT_* constants for values. + <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0"> + Audio format. See [code]FORMAT_*[/code] constants for values. </member> - <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin"> + <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0"> Loop start in bytes. </member> - <member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end"> + <member name="loop_end" type="int" setter="set_loop_end" getter="get_loop_end" default="0"> Loop end in bytes. </member> - <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode"> - Loop mode. See LOOP_* constants for values. + <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0"> + Loop mode. See [code]LOOP_*[/code] constants for values. </member> - <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate"> + <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100"> The sample rate for mixing this audio. </member> - <member name="stereo" type="bool" setter="set_stereo" getter="is_stereo"> - If [code]true[/code], audio is stereo. Default value: [code]false[/code]. + <member name="stereo" type="bool" setter="set_stereo" getter="is_stereo" default="false"> + If [code]true[/code], audio is stereo. </member> </members> <constants> <constant name="FORMAT_8_BITS" value="0" enum="Format"> - Audio codec 8 bit. + 8-bit audio codec. </constant> <constant name="FORMAT_16_BITS" value="1" enum="Format"> - Audio codec 16 bit. + 16-bit audio codec. </constant> <constant name="FORMAT_IMA_ADPCM" value="2" enum="Format"> - Audio codec IMA ADPCM. + Audio is compressed using IMA ADPCM. </constant> <constant name="LOOP_DISABLED" value="0" enum="LoopMode"> Audio does not loop. </constant> <constant name="LOOP_FORWARD" value="1" enum="LoopMode"> - Audio loops the data between loop_begin and loop_end playing forward only. + Audio loops the data between [member loop_begin] and [member loop_end] playing forward only. </constant> <constant name="LOOP_PING_PONG" value="2" enum="LoopMode"> - Audio loops the data between loop_begin and loop_end playing back and forth. + Audio loops the data between [member loop_begin] and [member loop_end] playing back and forth. </constant> <constant name="LOOP_BACKWARD" value="3" enum="LoopMode"> - Audio loops the data between loop_begin and loop_end playing backward only. + Audio loops the data between [member loop_begin] and [member loop_end] playing backward only. </constant> </constants> </class> diff --git a/doc/classes/BackBufferCopy.xml b/doc/classes/BackBufferCopy.xml index 1ee4f08a38..9bb32e0444 100644 --- a/doc/classes/BackBufferCopy.xml +++ b/doc/classes/BackBufferCopy.xml @@ -4,17 +4,17 @@ Copies a region of the screen (or the whole screen) to a buffer so it can be accessed with [code]SCREEN_TEXTURE[/code] in the [code]texture()[/code] function. </brief_description> <description> - Node for back-buffering the currently displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use [code]SCREEN_TEXTURE[/code] in the [code]texture()[/code] function to access the buffer. + Node for back-buffering the currently-displayed screen. The region defined in the BackBufferCopy node is bufferized with the content of the screen it covers, or the entire screen according to the copy mode set. Use [code]SCREEN_TEXTURE[/code] in the [code]texture()[/code] function to access the buffer. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode"> + <member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode" default="1"> Buffer mode. See [enum CopyMode] constants. </member> - <member name="rect" type="Rect2" setter="set_rect" getter="get_rect"> + <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2( -100, -100, 200, 200 )"> The area covered by the BackBufferCopy. Only used if [member copy_mode] is [constant COPY_MODE_RECT]. </member> </members> diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml index 735e55cd39..571a6fde80 100644 --- a/doc/classes/BakedLightmap.xml +++ b/doc/classes/BakedLightmap.xml @@ -28,44 +28,44 @@ </method> </methods> <members> - <member name="bake_cell_size" type="float" setter="set_bake_cell_size" getter="get_bake_cell_size"> - Grid subdivision size for lightmapper calculation. Default value of [code]0.25[/code] will work for most cases. Increase for better lighting on small details or if your scene is very large. + <member name="bake_cell_size" type="float" setter="set_bake_cell_size" getter="get_bake_cell_size" default="0.25"> + Grid subdivision size for lightmapper calculation. The default value will work for most cases. Increase for better lighting on small details or if your scene is very large. </member> - <member name="bake_energy" type="float" setter="set_energy" getter="get_energy"> + <member name="bake_energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> </member> - <member name="bake_extents" type="Vector3" setter="set_extents" getter="get_extents"> - Size of affected area. + <member name="bake_extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )"> + The size of the affected area. </member> - <member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr"> - If [code]true[/code], lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller lightmap. Default value:[code]false[/code]. + <member name="bake_hdr" type="bool" setter="set_hdr" getter="is_hdr" default="false"> + If [code]true[/code], the lightmap can capture light values greater than [code]1.0[/code]. Turning this off will result in a smaller file size. </member> - <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode"> + <member name="bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="BakedLightmap.BakeMode" default="0"> Lightmapping mode. See [enum BakeMode]. </member> - <member name="bake_propagation" type="float" setter="set_propagation" getter="get_propagation"> + <member name="bake_propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0"> </member> - <member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality"> + <member name="bake_quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1"> Three quality modes are available. Higher quality requires more rendering time. See [enum BakeQuality]. </member> - <member name="capture_cell_size" type="float" setter="set_capture_cell_size" getter="get_capture_cell_size"> + <member name="capture_cell_size" type="float" setter="set_capture_cell_size" getter="get_capture_cell_size" default="0.5"> Grid size used for real-time capture information on dynamic objects. Cannot be larger than [member bake_cell_size]. </member> - <member name="image_path" type="String" setter="set_image_path" getter="get_image_path"> - Location where lightmaps will be saved. + <member name="image_path" type="String" setter="set_image_path" getter="get_image_path" default="".""> + The location where lightmaps will be saved. </member> - <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data"> + <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data" default="null"> The calculated light data. </member> </members> <constants> <constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality"> - Lowest bake quality mode. Fastest to calculate. + The lowest bake quality mode. Fastest to calculate. </constant> <constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality"> - Default bake quality mode. + The default bake quality mode. </constant> <constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality"> - Highest bake quality mode. Takes longer to calculate. + The highest bake quality mode. Takes longer to calculate. </constant> <constant name="BAKE_MODE_CONE_TRACE" value="0" enum="BakeMode"> Less precise but faster bake mode. diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml index 75f3187434..68bbfb8f60 100644 --- a/doc/classes/BakedLightmapData.xml +++ b/doc/classes/BakedLightmapData.xml @@ -49,15 +49,15 @@ </method> </methods> <members> - <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds"> + <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 0, 0, 0 )"> </member> - <member name="cell_space_transform" type="Transform" setter="set_cell_space_transform" getter="get_cell_space_transform"> + <member name="cell_space_transform" type="Transform" setter="set_cell_space_transform" getter="get_cell_space_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> - <member name="cell_subdiv" type="int" setter="set_cell_subdiv" getter="get_cell_subdiv"> + <member name="cell_subdiv" type="int" setter="set_cell_subdiv" getter="get_cell_subdiv" default="1"> </member> - <member name="energy" type="float" setter="set_energy" getter="get_energy"> + <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> </member> - <member name="octree" type="PoolByteArray" setter="set_octree" getter="get_octree"> + <member name="octree" type="PoolByteArray" setter="set_octree" getter="get_octree" default="PoolByteArray( )"> </member> </members> <constants> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 6d1a7a8f87..f306adced2 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -29,7 +29,7 @@ <return type="int" enum="BaseButton.DrawMode"> </return> <description> - Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum. + Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [code]DRAW_*[/code] enum. </description> </method> <method name="is_hovered" qualifiers="const"> @@ -41,35 +41,35 @@ </method> </methods> <members> - <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode"> - Determines when the button is considered clicked, one of the ACTION_MODE_* constants. + <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1"> + Determines when the button is considered clicked, one of the [code]ACTION_MODE_*[/code] constants. </member> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask"> + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1"> Binary mask to choose which mouse buttons this button will respond to. To allow both left-click and right-click, use [code]BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT[/code]. </member> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], the button is in disabled state and can't be clicked or toggled. </member> - <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode"> + <member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode" default="2"> Focus access mode to use when switching between enabled/disabled (see [member Control.focus_mode] and [member disabled]). </member> - <member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group"> + <member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group" default="null"> [ButtonGroup] associated to the button. </member> - <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside"> - If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it. Default value: [code]false[/code]. + <member name="keep_pressed_outside" type="bool" setter="set_keep_pressed_outside" getter="is_keep_pressed_outside" default="false"> + If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it. </member> - <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> + <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). </member> - <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut"> + <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut" default="null"> [ShortCut] associated to the button. </member> - <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled"> + <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled" default="true"> If [code]true[/code], the button will add information about its shortcut in the tooltip. </member> - <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode"> + <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" default="false"> If [code]true[/code], the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked. </member> </members> @@ -86,14 +86,14 @@ </signal> <signal name="pressed"> <description> - This signal is emitted every time the button is toggled or pressed (i.e. activated, so on [code]button_down[/code] if "Click on press" is active and on [code]button_up[/code] otherwise). + Emitted when the button is toggled or pressed. This is on [signal button_down] if [member action_mode] is [constant ACTION_MODE_BUTTON_PRESS] and on [signal button_up] otherwise. </description> </signal> <signal name="toggled"> <argument index="0" name="button_pressed" type="bool"> </argument> <description> - This signal is emitted when the button was just toggled between pressed and normal states (only if toggle_mode is active). The new state is contained in the [i]button_pressed[/i] argument. + Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [code]button_pressed[/code] argument. </description> </signal> </signals> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index ae7a3ff323..4d5c76a75c 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Basis" category="Built-In Types" version="3.2"> <brief_description> - 3x3 matrix datatype. + 3×3 matrix datatype. </brief_description> <description> - 3x3 matrix used for 3D rotation and scale. Contains 3 vector fields x,y and z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized (due to scaling). Almost always used as orthogonal basis for a [Transform]. + 3×3 matrix used for 3D rotation and scale. Contains 3 vector fields X, Y and Z as its columns, which can be interpreted as the local basis vectors of a transformation. Can also be accessed as array of 3D vectors. These vectors are orthogonal to each other, but are not necessarily normalized (due to scaling). Almost always used as an orthogonal basis for a [Transform]. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S). </description> <tutorials> @@ -26,7 +26,7 @@ <argument index="0" name="from" type="Vector3"> </argument> <description> - Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X-angle, Y-angle, Z-angle). + Create a rotation matrix (in the YXZ convention: first Z, then X, and Y last) from the specified Euler angles, given in the vector format as (X angle, Y angle, Z angle). </description> </method> <method name="Basis"> @@ -64,7 +64,7 @@ <return type="Vector3"> </return> <description> - Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle). + Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). </description> </method> <method name="get_orthogonal_index"> @@ -148,7 +148,7 @@ <argument index="0" name="with" type="Vector3"> </argument> <description> - Transposed dot product with the x axis of the matrix. + Transposed dot product with the X axis of the matrix. </description> </method> <method name="tdoty"> @@ -157,7 +157,7 @@ <argument index="0" name="with" type="Vector3"> </argument> <description> - Transposed dot product with the y axis of the matrix. + Transposed dot product with the Y axis of the matrix. </description> </method> <method name="tdotz"> @@ -166,7 +166,7 @@ <argument index="0" name="with" type="Vector3"> </argument> <description> - Transposed dot product with the z axis of the matrix. + Transposed dot product with the Z axis of the matrix. </description> </method> <method name="transposed"> @@ -191,19 +191,20 @@ <argument index="0" name="v" type="Vector3"> </argument> <description> - Returns a vector transformed (multiplied) by the transposed matrix. Note that this results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection. + Returns a vector transformed (multiplied) by the transposed matrix. + [b]Note:[/b] This results in a multiplication by the inverse of the matrix only if it represents a rotation-reflection. </description> </method> </methods> <members> - <member name="x" type="Vector3" setter="" getter=""> - The basis matrix's x vector. + <member name="x" type="Vector3" setter="" getter="" default="Vector3( 1, 0, 0 )"> + The basis matrix's X vector. </member> - <member name="y" type="Vector3" setter="" getter=""> - The basis matrix's y vector. + <member name="y" type="Vector3" setter="" getter="" default="Vector3( 0, 1, 0 )"> + The basis matrix's Y vector. </member> - <member name="z" type="Vector3" setter="" getter=""> - The basis matrix's z vector. + <member name="z" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 1 )"> + The basis matrix's Z vector. </member> </members> <constants> diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml index 149d92e870..5ec4947f46 100644 --- a/doc/classes/BitmapFont.xml +++ b/doc/classes/BitmapFont.xml @@ -23,7 +23,7 @@ <argument index="4" name="advance" type="float" default="-1"> </argument> <description> - Adds a character to the font, where [code]character[/code] is the unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. + Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. </description> </method> <method name="add_kerning_pair"> @@ -104,16 +104,16 @@ </method> </methods> <members> - <member name="ascent" type="float" setter="set_ascent" getter="get_ascent"> + <member name="ascent" type="float" setter="set_ascent" getter="get_ascent" default="0.0"> Ascent (number of pixels above the baseline). </member> - <member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint"> + <member name="distance_field" type="bool" setter="set_distance_field_hint" getter="is_distance_field_hint" default="false"> If [code]true[/code], distance field hint is enabled. </member> - <member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback"> + <member name="fallback" type="BitmapFont" setter="set_fallback" getter="get_fallback" default="null"> The fallback font. </member> - <member name="height" type="float" setter="set_height" getter="get_height"> + <member name="height" type="float" setter="set_height" getter="get_height" default="1.0"> Total font height (ascent plus descent) in pixels. </member> </members> diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml index 757c6c6a34..21e08f13f9 100644 --- a/doc/classes/Bone2D.xml +++ b/doc/classes/Bone2D.xml @@ -35,10 +35,10 @@ </method> </methods> <members> - <member name="default_length" type="float" setter="set_default_length" getter="get_default_length"> + <member name="default_length" type="float" setter="set_default_length" getter="get_default_length" default="16.0"> Length of the bone's representation drawn in the editor's viewport in pixels. </member> - <member name="rest" type="Transform2D" setter="set_rest" getter="get_rest"> + <member name="rest" type="Transform2D" setter="set_rest" getter="get_rest" default="Transform2D( 0, 0, 0, 0, 0, 0 )"> Rest transform of the bone. You can reset the node's transforms to this value using [method apply_rest]. </member> </members> diff --git a/doc/classes/BoneAttachment.xml b/doc/classes/BoneAttachment.xml index 109cac4fa3..a6145b6a78 100644 --- a/doc/classes/BoneAttachment.xml +++ b/doc/classes/BoneAttachment.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name"> + <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default=""""> The name of the attached bone. </member> </members> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index 9aa69e4164..77db8b74db 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -15,13 +15,13 @@ <argument index="0" name="begin" type="bool"> </argument> <description> - Adds a control to the box as a spacer. If [code]true[/code], [i]begin[/i] will insert the spacer control in front of other children. + Adds a control to the box as a spacer. If [code]true[/code], [code]begin[/code] will insert the spacer control in front of other children. </description> </method> </methods> <members> - <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode"> - The alignment of the container's children (must be one of ALIGN_BEGIN, ALIGN_CENTER, or ALIGN_END). + <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="BoxContainer.AlignMode" default="0"> + The alignment of the container's children (must be one of [constant ALIGN_BEGIN], [constant ALIGN_CENTER] or [constant ALIGN_END]). </member> </members> <constants> diff --git a/doc/classes/BoxShape.xml b/doc/classes/BoxShape.xml index 3678c0e393..9e3977b342 100644 --- a/doc/classes/BoxShape.xml +++ b/doc/classes/BoxShape.xml @@ -11,8 +11,8 @@ <methods> </methods> <members> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents"> - The shape's half extents. + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> + The box's half extents. The width, height and depth of this shape is twice the half extents. </member> </members> <constants> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 5d3027e347..3d8730b588 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -11,19 +11,19 @@ <methods> </methods> <members> - <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign"> - Text alignment policy for the button's text, use one of the ALIGN_* constants. + <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1"> + Text alignment policy for the button's text, use one of the [code]ALIGN_*[/code] constants. </member> - <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text"> + <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false"> When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. This property is disabled by default. </member> - <member name="flat" type="bool" setter="set_flat" getter="is_flat"> + <member name="flat" type="bool" setter="set_flat" getter="is_flat" default="false"> Flat buttons don't display decoration. </member> - <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon"> + <member name="icon" type="Texture" setter="set_button_icon" getter="get_button_icon" default="null"> Button's icon, if text is present the icon will be placed before the text. </member> - <member name="text" type="String" setter="set_text" getter="get_text"> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> The button's text that will be displayed inside the button's area. </member> </members> @@ -45,17 +45,17 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> <theme_item name="hover" type="StyleBox"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="2"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> diff --git a/doc/classes/CPUParticles.xml b/doc/classes/CPUParticles.xml index c9c92102f3..bd59bdbf9f 100644 --- a/doc/classes/CPUParticles.xml +++ b/doc/classes/CPUParticles.xml @@ -28,140 +28,140 @@ </method> </methods> <members> - <member name="amount" type="int" setter="set_amount" getter="get_amount"> + <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="angle" type="float" setter="set_param" getter="get_param"> + <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> Initial rotation applied to each particle, in degrees. </member> - <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's rotation will be animated along this [Curve]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Rotation randomness ratio. Default value: [code]0[/code]. + <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Rotation randomness ratio. </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param"> + <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. </member> - <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's angular velocity will vary along this [Curve]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Angular velocity randomness ratio. Default value: [code]0[/code]. + <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Angular velocity randomness ratio. </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param"> + <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation offset. </member> - <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's animation offset will vary along this [Curve]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Animation offset randomness ratio. Default value: [code]0[/code]. + <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Animation offset randomness ratio. </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param"> + <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation speed. </member> - <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's animation speed will vary along this [Curve]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Animation speed randomness ratio. Default value: [code]0[/code]. + <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Animation speed randomness ratio. </member> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> Unused for 3D particles. </member> - <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> + <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp" default="null"> Unused for 3D particles. </member> - <member name="damping" type="float" setter="set_param" getter="get_param"> + <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> The rate at which particles lose velocity. </member> - <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Damping will vary along this [Curve]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Damping randomness ratio. Default value: [code]0[/code]. + <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Damping randomness ratio. </member> - <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles.DrawOrder"> - Particle draw order. Uses [enum DrawOrder] values. Default value: [constant DRAW_ORDER_INDEX]. + <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles.DrawOrder" default="0"> + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. </member> - <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> + <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors" default="PoolColorArray( )"> </member> <member name="emission_normals" type="PoolVector3Array" setter="set_emission_normals" getter="get_emission_normals"> </member> - <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points"> + <member name="emission_points" type="PoolVector3Array" setter="set_emission_points" getter="get_emission_points" default="PoolVector3Array( )"> </member> - <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape"> - Particles will be emitted inside this region. Use [enum EmissionShape] for values. Default value: [constant EMISSION_SHAPE_POINT]. + <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles.EmissionShape" default="0"> + Particles will be emitted inside this region. See [enum EmissionShape] for possible values. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> The sphere's radius if [enum EmissionShape] is set to [constant EMISSION_SHAPE_SPHERE]. </member> - <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. + <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> + If [code]true[/code], particles are being emitted. </member> - <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> - How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. + <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> + How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. </member> - <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the particle system itself. </member> - <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag"> - Align y-axis of particle with the direction of its velocity. + <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + Align Y axis of particle with the direction of its velocity. </member> - <member name="flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag"> - If [code]true[/code], particles will not move on the z axis. Default value: [code]false[/code]. + <member name="flag_disable_z" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + If [code]true[/code], particles will not move on the z axis. </member> - <member name="flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag"> - If [code]true[/code], particles rotate around y-axis by [member angle]. + <member name="flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + If [code]true[/code], particles rotate around Y axis by [member angle]. </member> - <member name="flatness" type="float" setter="set_flatness" getter="get_flatness"> - Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. Default [code]0[/code]. + <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> + Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. </member> - <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> - If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] + <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity"> - Gravity applied to every particle. Default value: [code](0, -9.8, 0)[/code]. + <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )"> + Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param"> + <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> Initial hue variation applied to each particle. </member> - <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's hue will vary along this [Curve]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Hue variation randomness ratio. Default value: [code]0[/code]. + <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Hue variation randomness ratio. </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> + <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Initial velocity randomness ratio. Default value: [code]0[/code]. + <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Initial velocity randomness ratio. </member> - <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> - Amount of time each particle will exist. Default value: [code]1[/code]. + <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> + Amount of time each particle will exist. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param"> + <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Linear acceleration applied to each particle in the direction of motion. </member> - <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's linear acceleration will vary along this [Curve]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Linear acceleration randomness ratio. Default value: [code]0[/code]. + <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Linear acceleration randomness ratio. </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. </member> - <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" default="null"> The [Mesh] used for each particle. If [code]null[/code], particles will be spheres. </member> - <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. + <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. </member> <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. @@ -171,46 +171,46 @@ Each particle's orbital velocity will vary along this [Curve]. </member> <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Orbital velocity randomness ratio. Default value: [code]0[/code]. + Orbital velocity randomness ratio. </member> - <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> + <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param"> + <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> - <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's radial acceleration will vary along this [Curve]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Radial acceleration randomness ratio. Default value: [code]0[/code]. + <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Radial acceleration randomness ratio. </member> - <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> - Emission lifetime randomness ratio. Default value: [code]0[/code]. + <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> + Emission lifetime randomness ratio. </member> - <member name="scale_amount" type="float" setter="set_param" getter="get_param"> + <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0"> Initial scale applied to each particle. </member> - <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's scale will vary along this [Curve]. </member> - <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Scale randomness ratio. Default value: [code]0[/code]. + <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Scale randomness ratio. </member> - <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> - Particle system's running speed scaling ratio. Default value: [code]1[/code]. A value of [code]0[/code] can be used to pause the particles. + <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> + Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> - <member name="spread" type="float" setter="set_spread" getter="get_spread"> - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. + <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param"> + <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. </member> - <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's tangential acceleration will vary along this [Curve]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Tangential acceleration randomness ratio. Default value: [code]0[/code]. + <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Tangential acceleration randomness ratio. </member> </members> <constants> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 7283d5084c..5ec460abb7 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -29,62 +29,62 @@ </method> </methods> <members> - <member name="amount" type="int" setter="set_amount" getter="get_amount"> + <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="angle" type="float" setter="set_param" getter="get_param"> + <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> Initial rotation applied to each particle, in degrees. </member> - <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's rotation will be animated along this [Curve]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Rotation randomness ratio. Default value: [code]0[/code]. + <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Rotation randomness ratio. </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param"> + <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. </member> - <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's angular velocity will vary along this [Curve]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Angular velocity randomness ratio. Default value: [code]0[/code]. + <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Angular velocity randomness ratio. </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param"> + <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation offset. </member> - <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's animation offset will vary along this [Curve]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Animation offset randomness ratio. Default value: [code]0[/code]. + <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Animation offset randomness ratio. </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param"> + <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation speed. </member> - <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's animation speed will vary along this [Curve]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Animation speed randomness ratio. Default value: [code]0[/code]. + <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Animation speed randomness ratio. </member> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. </member> - <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> + <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp" default="null"> Each particle's color will vary along this [Gradient]. </member> - <member name="damping" type="float" setter="set_param" getter="get_param"> + <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> The rate at which particles lose velocity. </member> - <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Damping will vary along this [Curve]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Damping randomness ratio. Default value: [code]0[/code]. + <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Damping randomness ratio. </member> - <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder"> - Particle draw order. Uses [enum DrawOrder] values. Default value: [constant DRAW_ORDER_INDEX]. + <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="CPUParticles2D.DrawOrder" default="0"> + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emission_colors" type="PoolColorArray" setter="set_emission_colors" getter="get_emission_colors"> </member> @@ -95,118 +95,118 @@ <member name="emission_rect_extents" type="Vector2" setter="set_emission_rect_extents" getter="get_emission_rect_extents"> The rectangle's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_RECTANGLE]. </member> - <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles2D.EmissionShape"> - Particles will be emitted inside this region. Use [enum EmissionShape] for values. Default value: [constant EMISSION_SHAPE_POINT]. + <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles2D.EmissionShape" default="0"> + Particles will be emitted inside this region. See [enum EmissionShape] for possible values. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE]. </member> - <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. + <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> + If [code]true[/code], particles are being emitted. </member> - <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> - How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. + <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> + How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. </member> - <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> - <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag"> - Align y-axis of particle with the direction of its velocity. + <member name="flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> + Align Y axis of particle with the direction of its velocity. </member> - <member name="flatness" type="float" setter="set_flatness" getter="get_flatness"> + <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> </member> - <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> - If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] + <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity"> - Gravity applied to every particle. Default value: [code](0, 98)[/code]. + <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2( 0, 98 )"> + Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param"> + <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> Initial hue variation applied to each particle. </member> - <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's hue will vary along this [Curve]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Hue variation randomness ratio. Default value: [code]0[/code]. + <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Hue variation randomness ratio. </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> + <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Initial velocity randomness ratio. Default value: [code]0[/code]. + <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Initial velocity randomness ratio. </member> - <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> - Amount of time each particle will exist. Default value: [code]1[/code]. + <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> + Amount of time each particle will exist. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param"> + <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Linear acceleration applied to each particle in the direction of motion. </member> - <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's linear acceleration will vary along this [Curve]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Linear acceleration randomness ratio. Default value: [code]0[/code]. + <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Linear acceleration randomness ratio. </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. </member> - <member name="normalmap" type="Texture" setter="set_normalmap" getter="get_normalmap"> + <member name="normalmap" type="Texture" setter="set_normalmap" getter="get_normalmap" default="null"> Normal map to be used for the [member texture] property. </member> - <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. + <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. </member> - <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> + <member name="orbit_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. </member> - <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's orbital velocity will vary along this [Curve]. </member> - <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Orbital velocity randomness ratio. Default value: [code]0[/code]. + <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Orbital velocity randomness ratio. </member> - <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> + <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param"> + <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> - <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's radial acceleration will vary along this [Curve]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Radial acceleration randomness ratio. Default value: [code]0[/code]. + <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Radial acceleration randomness ratio. </member> - <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> - Emission lifetime randomness ratio. Default value: [code]0[/code]. + <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> + Emission lifetime randomness ratio. </member> - <member name="scale_amount" type="float" setter="set_param" getter="get_param"> + <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0"> Initial scale applied to each particle. </member> - <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's scale will vary along this [Curve]. </member> - <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Scale randomness ratio. Default value: [code]0[/code]. + <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Scale randomness ratio. </member> - <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> - Particle system's running speed scaling ratio. Default value: [code]1[/code]. A value of [code]0[/code] can be used to pause the particles. + <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> + Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> - <member name="spread" type="float" setter="set_spread" getter="get_spread"> - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. + <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param"> + <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. </member> - <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> + <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve" default="null"> Each particle's tangential acceleration will vary along this [Curve]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Tangential acceleration randomness ratio. Default value: [code]0[/code]. + <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Tangential acceleration randomness ratio. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - Particle texture. If [code]null[/code] particles will be squares. + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> + Particle texture. If [code]null[/code], particles will be squares. </member> </members> <constants> diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index b7d983afa2..c22413ae7e 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -4,7 +4,7 @@ Camera node, displays from a point of view. </brief_description> <description> - Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the Camera will register in the global viewport. In other words, a Camera just provides [i]3D[/i] display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed. + Camera is a special node that displays what is visible from its current location. Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. In other words, a camera just provides 3D display capabilities to a [Viewport], and, without one, a scene registered in that [Viewport] (or higher viewports) can't be displayed. </description> <tutorials> </tutorials> @@ -15,7 +15,7 @@ <argument index="0" name="enable_next" type="bool" default="true"> </argument> <description> - If this is the current Camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next Camera current, if any. + If this is the current camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next camera current, if any. </description> </method> <method name="get_camera_rid" qualifiers="const"> @@ -29,7 +29,7 @@ <return type="Transform"> </return> <description> - Gets the camera transform. Subclassed cameras (such as CharacterCamera) may provide different transforms than the [Node] transform. + Gets the camera transform. Subclassed cameras such as [InterpolatedCamera] may provide different transforms than the [Node] transform. </description> </method> <method name="get_cull_mask_bit" qualifiers="const"> @@ -52,14 +52,15 @@ <argument index="0" name="world_point" type="Vector3"> </argument> <description> - Returns [code]true[/code] if the given position is behind the Camera. Note that a position which returns [code]false[/code] may still be outside the Camera's field of view. + Returns [code]true[/code] if the given position is behind the camera. + [b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view. </description> </method> <method name="make_current"> <return type="void"> </return> <description> - Makes this camera the current Camera for the [Viewport] (see class description). If the Camera Node is outside the scene tree, it will attempt to become current once it's added. + Makes this camera the current camera for the [Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added. </description> </method> <method name="project_local_ray_normal" qualifiers="const"> @@ -134,7 +135,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Sets the camera projection to orthogonal mode, by specifying a width and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) + Sets the camera projection to orthogonal mode, by specifying a width and the [code]near[/code] and [code]far[/code] clip planes in worldspace units. (As a hint, 2D games often use this projection, with values specified in pixels) </description> </method> <method name="set_perspective"> @@ -147,7 +148,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Sets the camera projection to perspective mode, by specifying a [i]FOV[/i] Y angle in degrees (FOV means Field of View), and the [i]near[/i] and [i]far[/i] clip planes in worldspace units. + Sets the camera projection to perspective mode, by specifying a [code]fov[/code] angle in degrees (FOV means Field of View), and the [code]near[/code] and [code]far[/code] clip planes in world-space units. </description> </method> <method name="unproject_position" qualifiers="const"> @@ -161,68 +162,69 @@ </method> </methods> <members> - <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask"> + <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575"> The culling mask that describes which 3D render layers are rendered by this camera. </member> - <member name="current" type="bool" setter="set_current" getter="is_current"> - If [code]true[/code], the ancestor [Viewport] is currently using this Camera. Default value: [code]false[/code]. + <member name="current" type="bool" setter="set_current" getter="is_current" default="false"> + If [code]true[/code], the ancestor [Viewport] is currently using this camera. </member> - <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking"> - If not [constant DOPPLER_TRACKING_DISABLED] this Camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. Default value: [constant DOPPLER_TRACKING_DISABLED]. + <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0"> + If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. </member> - <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> - The [Environment] to use for this Camera. + <member name="environment" type="Environment" setter="set_environment" getter="get_environment" default="null"> + The [Environment] to use for this camera. </member> - <member name="far" type="float" setter="set_zfar" getter="get_zfar"> - The distance to the far culling boundary for this Camera relative to its local z-axis. + <member name="far" type="float" setter="set_zfar" getter="get_zfar" default="100.0"> + The distance to the far culling boundary for this camera relative to its local Z axis. </member> - <member name="fov" type="float" setter="set_fov" getter="get_fov"> + <member name="fov" type="float" setter="set_fov" getter="get_fov" default="70.0"> The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle. </member> - <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset"> + <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )"> </member> - <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset"> - The horizontal (X) offset of the Camera viewport. + <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0"> + The horizontal (X) offset of the camera viewport. </member> - <member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect"> + <member name="keep_aspect" type="int" setter="set_keep_aspect_mode" getter="get_keep_aspect_mode" enum="Camera.KeepAspect" default="1"> The axis to lock during [member fov]/[member size] adjustments. Can be either [constant KEEP_WIDTH] or [constant KEEP_HEIGHT]. </member> - <member name="near" type="float" setter="set_znear" getter="get_znear"> - The distance to the near culling boundary for this Camera relative to its local z-axis. + <member name="near" type="float" setter="set_znear" getter="get_znear" default="0.05"> + The distance to the near culling boundary for this camera relative to its local Z axis. </member> - <member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera.Projection"> - The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' z-distance from the camera's local space scales their perceived size. + <member name="projection" type="int" setter="set_projection" getter="get_projection" enum="Camera.Projection" default="0"> + The camera's projection mode. In [constant PROJECTION_PERSPECTIVE] mode, objects' Z distance from the camera's local space scales their perceived size. </member> - <member name="size" type="float" setter="set_size" getter="get_size"> + <member name="size" type="float" setter="set_size" getter="get_size" default="1.0"> The camera's size measured as 1/2 the width or height. Only applicable in orthogonal mode. Since [member keep_aspect] locks on axis, [code]size[/code] sets the other axis' size length. </member> - <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset"> - The vertical (Y) offset of the Camera viewport. + <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0"> + The vertical (Y) offset of the camera viewport. </member> </members> <constants> <constant name="PROJECTION_PERSPECTIVE" value="0" enum="Projection"> - Perspective Projection (object's size on the screen becomes smaller when far away). + Perspective projection. Objects on the screen becomes smaller when they are far away. </constant> <constant name="PROJECTION_ORTHOGONAL" value="1" enum="Projection"> - Orthogonal Projection (objects remain the same size on the screen no matter how far away they are; also known as orthographic projection). + Orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. </constant> <constant name="PROJECTION_FRUSTUM" value="2" enum="Projection"> + Frustum projection. This mode allows adjusting [member frustum_offset] to create "tilted frustum" effects. </constant> <constant name="KEEP_WIDTH" value="0" enum="KeepAspect"> - Preserves the horizontal aspect ratio. + Preserves the horizontal aspect ratio; also known as Vert- scaling. This is usually the best option for projects running in portrait mode, as taller aspect ratios will benefit from a wider vertical FOV. </constant> <constant name="KEEP_HEIGHT" value="1" enum="KeepAspect"> - Preserves the vertical aspect ratio. + Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. </constant> <constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking"> - Disable Doppler effect simulation (default). + Disables Doppler effect simulation (default). </constant> <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking"> - Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> <constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking"> - Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this Camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> </constants> </class> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index fcc99123d2..e9a9f22e82 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -4,8 +4,8 @@ Camera node for 2D scenes. </brief_description> <description> - Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem] based nodes. - This node is intended to be a simple helper to get things going quickly and it may happen often that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport]. + Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes. + This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, simply inherit from [Node2D] and change the transform of the canvas by calling get_viewport().set_canvas_transform(m) in [Viewport]. </description> <tutorials> </tutorials> @@ -14,7 +14,7 @@ <return type="void"> </return> <description> - Align the camera to the tracked node + Aligns the camera to the tracked node. </description> </method> <method name="clear_current"> @@ -28,7 +28,7 @@ <return type="void"> </return> <description> - Force the camera to update scroll immediately. + Forces the camera to update scroll immediately. </description> </method> <method name="get_camera_position" qualifiers="const"> @@ -49,92 +49,92 @@ <return type="void"> </return> <description> - Make this the current 2D camera for the scene (viewport and layer), in case there's many cameras in the scene. + Make this the current 2D camera for the scene (viewport and layer), in case there are many cameras in the scene. </description> </method> <method name="reset_smoothing"> <return type="void"> </return> <description> - Set the camera's position immediately to its current smoothing destination. + Sets the camera's position immediately to its current smoothing destination. This has no effect if smoothing is disabled. </description> </method> </methods> <members> - <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode"> + <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1"> The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants. </member> - <member name="current" type="bool" setter="_set_current" getter="is_current"> + <member name="current" type="bool" setter="_set_current" getter="is_current" default="false"> If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. </member> <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> - The custom [Viewport] node attached to the [Camera2D]. If null or not a [Viewport], uses the default viewport instead. + The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] or not a [Viewport], uses the default viewport instead. </member> - <member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin"> + <member name="drag_margin_bottom" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2"> Bottom margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> - <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled"> - If [code]true[/code], the camera only moves when reaching the horizontal drag margins. If [code]false[/code], the camera moves horizontally regardless of margins. Default value: [code]true[/code]. + <member name="drag_margin_h_enabled" type="bool" setter="set_h_drag_enabled" getter="is_h_drag_enabled" default="true"> + If [code]true[/code], the camera only moves when reaching the horizontal drag margins. If [code]false[/code], the camera moves horizontally regardless of margins. </member> - <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin"> + <member name="drag_margin_left" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2"> Left margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> - <member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin"> + <member name="drag_margin_right" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2"> Right margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> - <member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin"> + <member name="drag_margin_top" type="float" setter="set_drag_margin" getter="get_drag_margin" default="0.2"> Top margin needed to drag the camera. A value of [code]1[/code] makes the camera move only when reaching the edge of the screen. </member> - <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled"> - If [code]true[/code], the camera only moves when reaching the vertical drag margins. If [code]false[/code], the camera moves vertically regardless of margins. Default value: [code]true[/code]. + <member name="drag_margin_v_enabled" type="bool" setter="set_v_drag_enabled" getter="is_v_drag_enabled" default="true"> + If [code]true[/code], the camera only moves when reaching the vertical drag margins. If [code]false[/code], the camera moves vertically regardless of margins. </member> - <member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled"> - If [code]true[/code], draws the camera's drag margin rectangle in the editor. Default value: [code]false[/code] + <member name="editor_draw_drag_margin" type="bool" setter="set_margin_drawing_enabled" getter="is_margin_drawing_enabled" default="false"> + If [code]true[/code], draws the camera's drag margin rectangle in the editor. </member> - <member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled"> - If [code]true[/code], draws the camera's limits rectangle in the editor. Default value: [code]true[/code] + <member name="editor_draw_limits" type="bool" setter="set_limit_drawing_enabled" getter="is_limit_drawing_enabled" default="false"> + If [code]true[/code], draws the camera's limits rectangle in the editor. </member> - <member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled"> - If [code]true[/code], draws the camera's screen rectangle in the editor. Default value: [code]false[/code] + <member name="editor_draw_screen" type="bool" setter="set_screen_drawing_enabled" getter="is_screen_drawing_enabled" default="true"> + If [code]true[/code], draws the camera's screen rectangle in the editor. </member> - <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit"> + <member name="limit_bottom" type="int" setter="set_limit" getter="get_limit" default="10000000"> Bottom scroll limit in pixels. The camera stops moving when reaching this value. </member> - <member name="limit_left" type="int" setter="set_limit" getter="get_limit"> + <member name="limit_left" type="int" setter="set_limit" getter="get_limit" default="-10000000"> Left scroll limit in pixels. The camera stops moving when reaching this value. </member> - <member name="limit_right" type="int" setter="set_limit" getter="get_limit"> + <member name="limit_right" type="int" setter="set_limit" getter="get_limit" default="10000000"> Right scroll limit in pixels. The camera stops moving when reaching this value. </member> - <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled"> - If [code]true[/code], the camera smoothly stops when reaches its limits. Default value: [code]false[/code] + <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false"> + If [code]true[/code], the camera smoothly stops when reaches its limits. </member> - <member name="limit_top" type="int" setter="set_limit" getter="get_limit"> + <member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000"> Top scroll limit in pixels. The camera stops moving when reaching this value. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The camera's offset, useful for looking around or camera shake animations. </member> - <member name="offset_h" type="float" setter="set_h_offset" getter="get_h_offset"> - The horizontal offset of the camera, relative to the drag margins. Default value: [code]0[/code] + <member name="offset_h" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0"> + The horizontal offset of the camera, relative to the drag margins. </member> - <member name="offset_v" type="float" setter="set_v_offset" getter="get_v_offset"> - The vertical offset of the camera, relative to the drag margins. Default value: [code]0[/code] + <member name="offset_v" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0"> + The vertical offset of the camera, relative to the drag margins. </member> - <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode"> + <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode" default="1"> </member> - <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating"> - If [code]true[/code], the camera rotates with the target. Default value: [code]false[/code] + <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false"> + If [code]true[/code], the camera rotates with the target. </member> - <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled"> - If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed]. Default value: [code]false[/code] + <member name="smoothing_enabled" type="bool" setter="set_enable_follow_smoothing" getter="is_follow_smoothing_enabled" default="false"> + If [code]true[/code], the camera smoothly moves towards the target at [member smoothing_speed]. </member> - <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing"> - Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code] + <member name="smoothing_speed" type="float" setter="set_follow_smoothing" getter="get_follow_smoothing" default="5.0"> + Speed in pixels per second of the camera's smoothing effect when [member smoothing_enabled] is [code]true[/code]. </member> - <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom"> - The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2x zoom in, and [code]Vector2(4, 4)[/code] for a 4x zoom out. + <member name="zoom" type="Vector2" setter="set_zoom" getter="get_zoom" default="Vector2( 1, 1 )"> + The camera's zoom relative to the viewport. Values larger than [code]Vector2(1, 1)[/code] zoom out and smaller values zoom in. For an example, use [code]Vector2(0.5, 0.5)[/code] for a 2× zoom-in, and [code]Vector2(4, 4)[/code] for a 4× zoom-out. </member> </members> <constants> diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml index 4611b9c507..6d7757f9f5 100644 --- a/doc/classes/CameraFeed.xml +++ b/doc/classes/CameraFeed.xml @@ -4,8 +4,8 @@ A camera feed gives you access to a single physical camera attached to your device. </brief_description> <description> - A camera feed gives you access to a single physical camera attached to your device. - When enabled Godot will start capturing frames from the camera which can then be used. Do note that many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. + A camera feed gives you access to a single physical camera attached to your device. When enabled, Godot will start capturing frames from the camera which can then be used. + [b]Note:[/b] Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. </description> <tutorials> </tutorials> @@ -14,14 +14,14 @@ <return type="int"> </return> <description> - Get unique id for this feed + Gets the unique ID for this feed. </description> </method> <method name="get_name" qualifiers="const"> <return type="String"> </return> <description> - Get name of the camera + Gets the camera's name. </description> </method> <method name="get_position" qualifiers="const"> @@ -33,9 +33,9 @@ </method> </methods> <members> - <member name="feed_is_active" type="bool" setter="set_active" getter="is_active"> + <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false"> </member> - <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform"> + <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, -1, 0, 1 )"> </member> </members> <constants> @@ -58,7 +58,7 @@ Camera is mounted at the front of the device. </constant> <constant name="FEED_BACK" value="2" enum="FeedPosition"> - Camera is moutned at the back of the device. + Camera is mounted at the back of the device. </constant> </constants> </class> diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml index ee41f08ec6..850794c1da 100644 --- a/doc/classes/CameraServer.xml +++ b/doc/classes/CameraServer.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CameraServer" inherits="Object" category="Core" version="3.2"> <brief_description> - Our camera server keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. + The CameraServer keeps track of different cameras accessible in Godot. These are external cameras such as webcams or the cameras on your phone. </brief_description> <description> </description> diff --git a/doc/classes/CameraTexture.xml b/doc/classes/CameraTexture.xml index 02f7f8bf58..15da46885f 100644 --- a/doc/classes/CameraTexture.xml +++ b/doc/classes/CameraTexture.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CameraTexture" inherits="Texture" category="Core" version="3.2"> <brief_description> - This texture gives access to the camera texture provided by a [CameraFeed]. Note that many cameras supply YCbCr images which need to be converted in a shader. + This texture gives access to the camera texture provided by a [CameraFeed]. + [b]Note:[/b] Many cameras supply YCbCr images which need to be converted in a shader. </brief_description> <description> </description> @@ -10,13 +11,13 @@ <methods> </methods> <members> - <member name="camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id"> - Id of the [CameraFeed] for which we want to display the image. + <member name="camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="0"> + The ID of the [CameraFeed] for which we want to display the image. </member> - <member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active"> + <member name="camera_is_active" type="bool" setter="set_camera_active" getter="get_camera_active" default="false"> Convenience property that gives access to the active property of the [CameraFeed]. </member> - <member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage"> + <member name="which_feed" type="int" setter="set_which_feed" getter="get_which_feed" enum="CameraServer.FeedImage" default="0"> Which image within the [CameraFeed] we want access to, important if the camera image is split in a Y and CbCr component. </member> </members> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 2426471a49..5ac825ddcd 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -356,63 +356,63 @@ <return type="Transform2D"> </return> <description> - Get the transform matrix of this item's canvas. + Gets the transform matrix of this item's canvas. </description> </method> <method name="get_global_mouse_position" qualifiers="const"> <return type="Vector2"> </return> <description> - Get the global position of the mouse. + Gets the global position of the mouse. </description> </method> <method name="get_global_transform" qualifiers="const"> <return type="Transform2D"> </return> <description> - Get the global transform matrix of this item. + Gets the global transform matrix of this item. </description> </method> <method name="get_global_transform_with_canvas" qualifiers="const"> <return type="Transform2D"> </return> <description> - Get the global transform matrix of this item in relation to the canvas. + Gets the global transform matrix of this item in relation to the canvas. </description> </method> <method name="get_local_mouse_position" qualifiers="const"> <return type="Vector2"> </return> <description> - Get the mouse position relative to this item's position. + Gets the mouse position relative to this item's position. </description> </method> <method name="get_transform" qualifiers="const"> <return type="Transform2D"> </return> <description> - Get the transform matrix of this item. + Gets the transform matrix of this item. </description> </method> <method name="get_viewport_rect" qualifiers="const"> <return type="Rect2"> </return> <description> - Get the viewport's boundaries as a [Rect2]. + Gets the viewport's boundaries as a [Rect2]. </description> </method> <method name="get_viewport_transform" qualifiers="const"> <return type="Transform2D"> </return> <description> - Get this item's transform in relation to the viewport. + Gets this item's transform in relation to the viewport. </description> </method> <method name="get_world_2d" qualifiers="const"> <return type="World2D"> </return> <description> - Get the [World2D] where this item is in. + Gets the [World2D] where this item is in. </description> </method> <method name="hide"> @@ -511,29 +511,29 @@ </method> </methods> <members> - <member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask"> - The rendering layers in which this [CanvasItem] responds to [Light2D] nodes. Default value: [code]1[/code]. + <member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1"> + The rendering layers in which this [CanvasItem] responds to [Light2D] nodes. </member> - <member name="material" type="Material" setter="set_material" getter="get_material"> - The material applied to textures on this [CanvasItem]. Default value: [code]null[/code]. + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> + The material applied to textures on this [CanvasItem]. </member> - <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate"> - The color applied to textures on this [CanvasItem]. Default value: [code]Color(1, 1, 1, 1)[/code] (opaque "white"). + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> + The color applied to textures on this [CanvasItem]. </member> - <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate"> - The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s. Default value: [code]Color(1, 1, 1, 1)[/code] (opaque "white").. + <member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color( 1, 1, 1, 1 )"> + The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s. </member> - <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled"> - If [code]true[/code], the object draws behind its parent. Default value: [code]false[/code]. + <member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false"> + If [code]true[/code], the object draws behind its parent. </member> <member name="show_on_top" type="bool" setter="_set_on_top" getter="_is_on_top"> - If [code]true[/code], the object draws on top of its parent. Default value: [code]true[/code]. + If [code]true[/code], the object draws on top of its parent. </member> - <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material"> - If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material. Default value: [code]false[/code]. + <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false"> + If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material. </member> - <member name="visible" type="bool" setter="set_visible" getter="is_visible"> - If [code]true[/code], this [CanvasItem] is drawn. Default value: [code]true[/code]. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. + <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> + If [code]true[/code], this [CanvasItem] is drawn. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. </member> </members> <signals> @@ -575,7 +575,7 @@ Mix blending mode. Colors are assumed to be premultiplied by the alpha (opacity) value. </constant> <constant name="BLEND_MODE_DISABLED" value="5" enum="BlendMode"> - Disable blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied. + Disables blending mode. Colors including alpha are written as-is. Only applicable for render targets with a transparent background. No lighting will be applied. </constant> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000"> The CanvasItem's transform has changed. This notification is only received if enabled by [method set_notify_transform] or [method set_notify_local_transform]. diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index f125c2be0d..5963e00d9e 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode"> + <member name="blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="CanvasItemMaterial.BlendMode" default="0"> The manner in which a material's rendering is applied to underlying textures. </member> - <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode"> + <member name="light_mode" type="int" setter="set_light_mode" getter="get_light_mode" enum="CanvasItemMaterial.LightMode" default="0"> The manner in which material reacts to lighting. </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> @@ -23,7 +23,7 @@ </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> </member> - <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation"> + <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false"> </member> </members> <constants> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index d152442b85..2e56009f50 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -21,28 +21,28 @@ </methods> <members> <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> - The custom [Viewport] node assigned to the [CanvasLayer]. If null, uses the default viewport instead. + The custom [Viewport] node assigned to the [CanvasLayer]. If [code]null[/code], uses the default viewport instead. </member> - <member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport"> + <member name="follow_viewport_enable" type="bool" setter="set_follow_viewport" getter="is_following_viewport" default="false"> </member> - <member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale"> + <member name="follow_viewport_scale" type="float" setter="set_follow_viewport_scale" getter="get_follow_viewport_scale" default="1.0"> </member> - <member name="layer" type="int" setter="set_layer" getter="get_layer"> - Layer index for draw order. Lower values are drawn first. Default value: [code]1[/code]. + <member name="layer" type="int" setter="set_layer" getter="get_layer" default="1"> + Layer index for draw order. Lower values are drawn first. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The layer's base offset. </member> - <member name="rotation" type="float" setter="set_rotation" getter="get_rotation"> + <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> The layer's rotation in radians. </member> - <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> + <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> The layer's rotation in degrees. </member> - <member name="scale" type="Vector2" setter="set_scale" getter="get_scale"> + <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> The layer's scale. </member> - <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform"> + <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> The layer's transform. </member> </members> diff --git a/doc/classes/CanvasModulate.xml b/doc/classes/CanvasModulate.xml index c409b690e7..95214b8c6a 100644 --- a/doc/classes/CanvasModulate.xml +++ b/doc/classes/CanvasModulate.xml @@ -4,14 +4,14 @@ Tint the entire canvas. </brief_description> <description> - [CanvasModulate] tints the canvas elements using its assigned [code]color[/code]. + [CanvasModulate] tints the canvas elements using its assigned [member color]. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> The tint color to apply. </member> </members> diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml index eba440a84e..3cdb9b3e22 100644 --- a/doc/classes/CapsuleMesh.xml +++ b/doc/classes/CapsuleMesh.xml @@ -11,17 +11,17 @@ <methods> </methods> <members> - <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height"> - Height of the capsule mesh from the center point. Defaults to 1.0. + <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height" default="1.0"> + Height of the capsule mesh from the center point. </member> - <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments"> - Number of radial segments on the capsule mesh. Defaults to 64. + <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> + Number of radial segments on the capsule mesh. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> - Radius of the capsule mesh. Defaults to 1.0. + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + Radius of the capsule mesh. </member> - <member name="rings" type="int" setter="set_rings" getter="get_rings"> - Number of rings along the height of the capsule. Defaults to 8. + <member name="rings" type="int" setter="set_rings" getter="get_rings" default="8"> + Number of rings along the height of the capsule. </member> </members> <constants> diff --git a/doc/classes/CapsuleShape.xml b/doc/classes/CapsuleShape.xml index c867dcf326..0b55ca3472 100644 --- a/doc/classes/CapsuleShape.xml +++ b/doc/classes/CapsuleShape.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height"> + <member name="height" type="float" setter="set_height" getter="get_height" default="1.0"> The capsule's height. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> The capsule's radius. </member> </members> diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml index c7724314d6..a13abadf36 100644 --- a/doc/classes/CapsuleShape2D.xml +++ b/doc/classes/CapsuleShape2D.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height"> + <member name="height" type="float" setter="set_height" getter="get_height" default="20.0"> The capsule's height. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> The capsule's radius. </member> </members> diff --git a/doc/classes/CenterContainer.xml b/doc/classes/CenterContainer.xml index 5460831ce3..d792b1b180 100644 --- a/doc/classes/CenterContainer.xml +++ b/doc/classes/CenterContainer.xml @@ -4,15 +4,15 @@ Keeps children controls centered. </brief_description> <description> - CenterContainer Keeps children controls centered. This container keeps all children to their minimum size, in the center. + CenterContainer keeps children controls centered. This container keeps all children to their minimum size, in the center. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left"> - If [code]true[/code], centers children relative to the [CenterContainer]'s top left corner. Default value: [code]false[/code]. + <member name="use_top_left" type="bool" setter="set_use_top_left" getter="is_using_top_left" default="false"> + If [code]true[/code], centers children relative to the [CenterContainer]'s top left corner. </member> </members> <constants> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index d486b5fad2..5583775f95 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -4,7 +4,7 @@ Binary choice user interface widget. </brief_description> <description> - A checkbox allows the user to make a binary choice (choosing only one of two possible options), for example Answer 'yes' or 'no'. + A checkbox allows the user to make a binary choice (choosing only one of two possible options). </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="check_vadjust" type="int"> + <theme_item name="check_vadjust" type="int" default="0"> </theme_item> <theme_item name="checked" type="Texture"> </theme_item> @@ -23,21 +23,21 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_hover_pressed" type="Color"> + <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> <theme_item name="hover" type="StyleBox"> </theme_item> <theme_item name="hover_pressed" type="StyleBox"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 04344c1834..daed9128a9 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="check_vadjust" type="int"> + <theme_item name="check_vadjust" type="int" default="0"> </theme_item> <theme_item name="disabled" type="StyleBox"> </theme_item> @@ -21,21 +21,21 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_hover_pressed" type="Color"> + <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> <theme_item name="hover" type="StyleBox"> </theme_item> <theme_item name="hover_pressed" type="StyleBox"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> diff --git a/doc/classes/CircleShape2D.xml b/doc/classes/CircleShape2D.xml index 7c8bf923f4..4cff7b5cd4 100644 --- a/doc/classes/CircleShape2D.xml +++ b/doc/classes/CircleShape2D.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> The circle's radius. </member> </members> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index ddbe66380a..b7b77bc02a 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -15,7 +15,7 @@ <argument index="0" name="class" type="String"> </argument> <description> - Returns [code]true[/code] if you can instance objects from the specified 'class', [code]false[/code] in other case. + Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case. </description> </method> <method name="class_exists" qualifiers="const"> @@ -24,7 +24,7 @@ <argument index="0" name="class" type="String"> </argument> <description> - Returns whether the specified 'class' is available or not. + Returns whether the specified [code]class[/code] is available or not. </description> </method> <method name="class_get_category" qualifiers="const"> @@ -44,7 +44,7 @@ <argument index="1" name="name" type="String"> </argument> <description> - Returns the value of the integer constant 'name' of 'class' or its ancestry. Always returns 0 when the constant could not be found. + Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found. </description> </method> <method name="class_get_integer_constant_list" qualifiers="const"> @@ -55,7 +55,7 @@ <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> <description> - Returns an array with the names all the integer constants of 'class' or its ancestry. + Returns an array with the names all the integer constants of [code]class[/code] or its ancestry. </description> </method> <method name="class_get_method_list" qualifiers="const"> @@ -66,7 +66,7 @@ <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> <description> - Returns an array with all the methods of 'class' or its ancestry if 'no_inheritance' is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage). + Returns an array with all the methods of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. </description> </method> <method name="class_get_property" qualifiers="const"> @@ -77,7 +77,7 @@ <argument index="1" name="property" type="String"> </argument> <description> - Returns the value of 'property' of 'class' or its ancestry. + Returns the value of [code]property[/code] of [code]class[/code] or its ancestry. </description> </method> <method name="class_get_property_list" qualifiers="const"> @@ -88,7 +88,7 @@ <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> <description> - Returns an array with all the properties of 'class' or its ancestry if 'no_inheritance' is [code]false[/code]. + Returns an array with all the properties of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. </description> </method> <method name="class_get_signal" qualifiers="const"> @@ -99,7 +99,7 @@ <argument index="1" name="signal" type="String"> </argument> <description> - Returns the 'signal' data of 'class' or its ancestry. The returned value is a [Dictionary] with the following keys: args, default_args, flags, id, name, return: (class_name, hint, hint_string, name, type, usage). + Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. </description> </method> <method name="class_get_signal_list" qualifiers="const"> @@ -110,7 +110,7 @@ <argument index="1" name="no_inheritance" type="bool" default="false"> </argument> <description> - Returns an array with all the signals of 'class' or its ancestry if 'no_inheritance' is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal]. + Returns an array with all the signals of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal]. </description> </method> <method name="class_has_integer_constant" qualifiers="const"> @@ -121,7 +121,7 @@ <argument index="1" name="name" type="String"> </argument> <description> - Returns whether 'class' or its ancestry has an integer constant called 'name' or not. + Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not. </description> </method> <method name="class_has_method" qualifiers="const"> @@ -134,7 +134,7 @@ <argument index="2" name="no_inheritance" type="bool" default="false"> </argument> <description> - Returns whether 'class' (or its ancestry if 'no_inheritance' is false) has a method called 'method' or not. + Returns whether [code]class[/code] (or its ancestry if [code]no_inheritance[/code] is false) has a method called [code]method[/code] or not. </description> </method> <method name="class_has_signal" qualifiers="const"> @@ -145,7 +145,7 @@ <argument index="1" name="signal" type="String"> </argument> <description> - Returns whether 'class' or its ancestry has a signal called 'signal' or not. + Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not. </description> </method> <method name="class_set_property" qualifiers="const"> @@ -158,7 +158,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets 'property' value of 'class' to 'value'. + Sets [code]property[/code] value of [code]class[/code] to [code]value[/code]. </description> </method> <method name="get_class_list" qualifiers="const"> @@ -174,7 +174,7 @@ <argument index="0" name="class" type="String"> </argument> <description> - Returns the names of all the classes that directly or indirectly inherit from 'class'. + Returns the names of all the classes that directly or indirectly inherit from [code]class[/code]. </description> </method> <method name="get_parent_class" qualifiers="const"> @@ -183,7 +183,7 @@ <argument index="0" name="class" type="String"> </argument> <description> - Returns the parent class of 'class'. + Returns the parent class of [code]class[/code]. </description> </method> <method name="instance" qualifiers="const"> @@ -192,7 +192,7 @@ <argument index="0" name="class" type="String"> </argument> <description> - Creates an instance of 'class'. + Creates an instance of [code]class[/code]. </description> </method> <method name="is_class_enabled" qualifiers="const"> @@ -212,7 +212,7 @@ <argument index="1" name="inherits" type="String"> </argument> <description> - Returns whether 'inherits' is an ancestor of 'class' or not. + Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not. </description> </method> </methods> diff --git a/doc/classes/ClippedCamera.xml b/doc/classes/ClippedCamera.xml index c6dcd6cd96..f6a2a3bc11 100644 --- a/doc/classes/ClippedCamera.xml +++ b/doc/classes/ClippedCamera.xml @@ -71,15 +71,15 @@ </method> </methods> <members> - <member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled"> + <member name="clip_to_areas" type="bool" setter="set_clip_to_areas" getter="is_clip_to_areas_enabled" default="false"> </member> - <member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled"> + <member name="clip_to_bodies" type="bool" setter="set_clip_to_bodies" getter="is_clip_to_bodies_enabled" default="true"> </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> </member> - <member name="margin" type="float" setter="set_margin" getter="get_margin"> + <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> </member> - <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode"> + <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera.ProcessMode" default="0"> </member> </members> <constants> diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml index cb10530006..c30aeafcf3 100644 --- a/doc/classes/CollisionObject.xml +++ b/doc/classes/CollisionObject.xml @@ -180,11 +180,11 @@ </method> </methods> <members> - <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag"> - If [code]true[/code], the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes. Default value: [code]false[/code]. + <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag" default="false"> + If [code]true[/code], the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes. </member> - <member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable"> - If [code]true[/code], the [CollisionObject]'s shapes will respond to [RayCast]s. Default value: [code]true[/code]. + <member name="input_ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true"> + If [code]true[/code], the [CollisionObject]'s shapes will respond to [RayCast]s. </member> </members> <signals> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index f847893a39..eb69a4aed4 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -214,7 +214,7 @@ </method> </methods> <members> - <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable"> + <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true"> If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set. </member> </members> diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml index 85eb17cae7..994f589190 100644 --- a/doc/classes/CollisionPolygon.xml +++ b/doc/classes/CollisionPolygon.xml @@ -4,21 +4,22 @@ Editor-only class for defining a collision polygon in 3D space. </brief_description> <description> - Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at runtime. Creates a [Shape] for gameplay. Properties modified during gameplay will have no effect. + Allows editing a collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates a [Shape] for gameplay. Properties modified during gameplay will have no effect. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="depth" type="float" setter="set_depth" getter="get_depth"> + <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0"> Length that the resulting collision extends in either direction perpendicular to its polygon. </member> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collision will be produced. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - Array of vertices which define the polygon. Note that the returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. + <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + Array of vertices which define the polygon. + [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index b0c514affc..fe46d45f71 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -11,18 +11,18 @@ <methods> </methods> <members> - <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode"> - Collision build mode. Use one of the [code]BUILD_*[/code] constants. Default value: [constant BUILD_SOLIDS]. + <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0"> + Collision build mode. Use one of the [code]BUILD_*[/code] constants. </member> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collisions will be detected. </member> - <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> + <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. </member> - <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin"> + <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> + <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference. </member> </members> diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml index 3f2e550e83..bbbc07e6d3 100644 --- a/doc/classes/CollisionShape.xml +++ b/doc/classes/CollisionShape.xml @@ -28,10 +28,10 @@ </method> </methods> <members> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> A disabled collision shape has no effect in the world. </member> - <member name="shape" type="Shape" setter="set_shape" getter="get_shape"> + <member name="shape" type="Shape" setter="set_shape" getter="get_shape" default="null"> The actual shape owned by this collision shape. </member> </members> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 97dc230f22..fa002bc881 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -12,15 +12,15 @@ <methods> </methods> <members> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled"> + <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> A disabled collision shape has no effect in the world. </member> - <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled"> + <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). </member> - <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin"> + <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> </member> - <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> + <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" default="null"> The actual shape owned by this collision shape. </member> </members> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 30e80fa512..46499ed349 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -4,7 +4,7 @@ Color in RGBA format with some support for ARGB format. </brief_description> <description> - A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values > 1. + A color is represented by red, green, and blue [code](r, g, b)[/code] components. Additionally, [code]a[/code] represents the alpha component, often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as [member CanvasItem.modulate]) may accept values greater than 1. You can also create a color from standardized color names by using [method @GDScript.ColorN]. </description> <tutorials> @@ -19,9 +19,9 @@ Constructs a color from an HTML hexadecimal color string in ARGB or RGB format. See also [method @GDScript.ColorN]. [codeblock] # Each of the following creates the same color RGBA(178, 217, 10, 255) - var c1 = Color("#ffb2d90a") # ARGB format with '#' + var c1 = Color("#ffb2d90a") # ARGB format with "#" var c2 = Color("ffb2d90a") # ARGB format - var c3 = Color("#b2d90a") # RGB format with '#' + var c3 = Color("#b2d90a") # RGB format with "#" var c4 = Color("b2d90a") # RGB format [/codeblock] </description> @@ -136,7 +136,7 @@ The gray value is calculated as [code](r + g + b) / 3[/code]. [codeblock] var c = Color(0.2, 0.45, 0.82) - var gray = c.gray() # a value of 0.466667 + var gray = c.gray() # A value of 0.466667 [/codeblock] </description> </method> @@ -147,7 +147,7 @@ Returns the inverted color [code](1 - r, 1 - g, 1 - b, a)[/code]. [codeblock] var c = Color(0.3, 0.4, 0.9) - var inverted_color = c.inverted() # a color of an RGBA(178, 153, 26, 255) + var inverted_color = c.inverted() # A color of an RGBA(178, 153, 26, 255) [/codeblock] </description> </method> @@ -176,7 +176,7 @@ [codeblock] var c1 = Color(1.0, 0.0, 0.0) var c2 = Color(0.0, 1.0, 0.0) - var li_c = c1.linear_interpolate(c2, 0.5) # a color of an RGBA(128, 128, 0, 255) + var li_c = c1.linear_interpolate(c2, 0.5) # A color of an RGBA(128, 128, 0, 255) [/codeblock] </description> </method> @@ -234,8 +234,8 @@ Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string. [codeblock] var c = Color(1, 1, 1, 0.5) - var s1 = c.to_html() # Results "7fffffff" - var s2 = c.to_html(false) # Results 'ffffff' + var s1 = c.to_html() # Returns "7fffffff" + var s2 = c.to_html(false) # Returns "ffffff" [/codeblock] </description> </method> @@ -263,37 +263,37 @@ </method> </methods> <members> - <member name="a" type="float" setter="" getter=""> + <member name="a" type="float" setter="" getter="" default="1.0"> Alpha value (range 0 to 1). </member> - <member name="a8" type="int" setter="" getter=""> + <member name="a8" type="int" setter="" getter="" default="255"> Alpha value (range 0 to 255). </member> - <member name="b" type="float" setter="" getter=""> + <member name="b" type="float" setter="" getter="" default="0.0"> Blue value (range 0 to 1). </member> - <member name="b8" type="int" setter="" getter=""> + <member name="b8" type="int" setter="" getter="" default="0"> Blue value (range 0 to 255). </member> - <member name="g" type="float" setter="" getter=""> + <member name="g" type="float" setter="" getter="" default="0.0"> Green value (range 0 to 1). </member> - <member name="g8" type="int" setter="" getter=""> + <member name="g8" type="int" setter="" getter="" default="0"> Green value (range 0 to 255). </member> - <member name="h" type="float" setter="" getter=""> + <member name="h" type="float" setter="" getter="" default="0.0"> HSV hue value (range 0 to 1). </member> - <member name="r" type="float" setter="" getter=""> + <member name="r" type="float" setter="" getter="" default="0.0"> Red value (range 0 to 1). </member> - <member name="r8" type="int" setter="" getter=""> + <member name="r8" type="int" setter="" getter="" default="0"> Red value (range 0 to 255). </member> - <member name="s" type="float" setter="" getter=""> + <member name="s" type="float" setter="" getter="" default="0.0"> HSV saturation value (range 0 to 1). </member> - <member name="v" type="float" setter="" getter=""> + <member name="v" type="float" setter="" getter="" default="0.0"> HSV value (range 0 to 1). </member> </members> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 0ab91e9621..b62eb443d9 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -15,7 +15,8 @@ <argument index="0" name="color" type="Color"> </argument> <description> - Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. Note: the presets list is only for [i]this[/i] color picker. + Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. + [b]Note:[/b] the presets list is only for [i]this[/i] color picker. </description> </method> <method name="erase_preset"> @@ -24,7 +25,7 @@ <argument index="0" name="color" type="Color"> </argument> <description> - Remove the given color from the list of color presets of this color picker. + Removes the given color from the list of color presets of this color picker. </description> </method> <method name="get_presets" qualifiers="const"> @@ -36,26 +37,26 @@ </method> </methods> <members> - <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color"> + <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 1, 1, 1, 1 )"> The currently selected color. </member> - <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode"> + <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false"> If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). </member> - <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha"> + <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true"> If [code]true[/code], shows an alpha channel slider (transparency). </member> - <member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode"> - If [code]true[/code], allows to edit color with Hue/Saturation/Value sliders. + <member name="hsv_mode" type="bool" setter="set_hsv_mode" getter="is_hsv_mode" default="false"> + If [code]true[/code], allows editing the color with Hue/Saturation/Value sliders. [b]Note:[/b] Cannot be enabled if raw mode is on. </member> - <member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled"> + <member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled" default="true"> </member> - <member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible"> + <member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true"> </member> - <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode"> + <member name="raw_mode" type="bool" setter="set_raw_mode" getter="is_raw_mode" default="false"> If [code]true[/code], allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). - [b]Note:[/b] Cannot be enabled if hsv mode is on. + [b]Note:[/b] Cannot be enabled if HSV mode is on. </member> </members> <signals> @@ -90,19 +91,19 @@ </theme_item> <theme_item name="color_sample" type="Texture"> </theme_item> - <theme_item name="h_width" type="int"> + <theme_item name="h_width" type="int" default="30"> </theme_item> - <theme_item name="label_width" type="int"> + <theme_item name="label_width" type="int" default="10"> </theme_item> - <theme_item name="margin" type="int"> + <theme_item name="margin" type="int" default="4"> </theme_item> <theme_item name="preset_bg" type="Texture"> </theme_item> <theme_item name="screen_picker" type="Texture"> </theme_item> - <theme_item name="sv_height" type="int"> + <theme_item name="sv_height" type="int" default="256"> </theme_item> - <theme_item name="sv_width" type="int"> + <theme_item name="sv_width" type="int" default="256"> </theme_item> </theme_items> </class> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 3e4911cac3..7aeae61ebf 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -25,11 +25,11 @@ </method> </methods> <members> - <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color"> + <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color( 0, 0, 0, 1 )"> The currently selected color. </member> - <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha"> - If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible. Default value: [code]true[/code]. + <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true"> + If [code]true[/code], the alpha channel in the displayed [ColorPicker] will be visible. </member> </members> <signals> @@ -56,17 +56,17 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )"> </theme_item> <theme_item name="hover" type="StyleBox"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="2"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> diff --git a/doc/classes/ColorRect.xml b/doc/classes/ColorRect.xml index d659ebdfcd..2ff0a7eee3 100644 --- a/doc/classes/ColorRect.xml +++ b/doc/classes/ColorRect.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="color" type="Color" setter="set_frame_color" getter="get_frame_color"> + <member name="color" type="Color" setter="set_frame_color" getter="get_frame_color" default="Color( 1, 1, 1, 1 )"> The fill color. [codeblock] $ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red. diff --git a/doc/classes/ConcavePolygonShape.xml b/doc/classes/ConcavePolygonShape.xml index 62d42f4eb4..a09b5005b9 100644 --- a/doc/classes/ConcavePolygonShape.xml +++ b/doc/classes/ConcavePolygonShape.xml @@ -22,7 +22,7 @@ <argument index="0" name="faces" type="PoolVector3Array"> </argument> <description> - Set the faces (an array of triangles). + Sets the faces (an array of triangles). </description> </method> </methods> diff --git a/doc/classes/ConcavePolygonShape2D.xml b/doc/classes/ConcavePolygonShape2D.xml index 5414fe42c5..a6fe2486ea 100644 --- a/doc/classes/ConcavePolygonShape2D.xml +++ b/doc/classes/ConcavePolygonShape2D.xml @@ -4,7 +4,7 @@ Concave polygon 2D shape resource for physics. </brief_description> <description> - Concave polygon 2D shape resource for physics. It is made out of segments and is very optimal for complex polygonal concave collisions. It is really not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. + Concave polygon 2D shape resource for physics. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions. The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. </description> <tutorials> @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments"> + <member name="segments" type="PoolVector2Array" setter="set_segments" getter="get_segments" default="PoolVector2Array( )"> The array of points that make up the [ConcavePolygonShape2D]'s line segments. </member> </members> diff --git a/doc/classes/ConeTwistJoint.xml b/doc/classes/ConeTwistJoint.xml index 28dee22b7f..ad9c2b3a35 100644 --- a/doc/classes/ConeTwistJoint.xml +++ b/doc/classes/ConeTwistJoint.xml @@ -5,7 +5,7 @@ </brief_description> <description> The joint can rotate the bodies across an axis defined by the local x-axes of the [Joint]. - The twist axis is initiated as the x-axis of the [Joint]. + The twist axis is initiated as the X axis of the [Joint]. Once the Bodies swing, the twist axis is calculated as the middle of the x-axes of the Joint in the local space of the two Bodies. </description> <tutorials> @@ -13,23 +13,23 @@ <methods> </methods> <members> - <member name="bias" type="float" setter="set_param" getter="get_param"> + <member name="bias" type="float" setter="set_param" getter="get_param" default="0.3"> The speed with which the swing or twist will take place. The higher, the faster. </member> - <member name="relaxation" type="float" setter="set_param" getter="get_param"> + <member name="relaxation" type="float" setter="set_param" getter="get_param" default="1.0"> Defines, how fast the swing- and twist-speed-difference on both sides gets synced. </member> - <member name="softness" type="float" setter="set_param" getter="get_param"> + <member name="softness" type="float" setter="set_param" getter="get_param" default="0.8"> The ease with which the joint starts to twist. If it's too low, it takes more force to start twisting the joint. </member> - <member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span"> + <member name="swing_span" type="float" setter="_set_swing_span" getter="_get_swing_span" default="45.0"> Swing is rotation from side to side, around the axis perpendicular to the twist axis. The swing span defines, how much rotation will not get corrected along the swing axis. Could be defined as looseness in the [ConeTwistJoint]. - If below 0.05, this behavior is locked. Default value: [code]PI/4[/code]. + If below 0.05, this behavior is locked. </member> - <member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span"> + <member name="twist_span" type="float" setter="_set_twist_span" getter="_get_twist_span" default="180.0"> Twist is the rotation around the twist axis, this value defined how far the joint can twist. Twist is locked if below 0.05. </member> @@ -39,7 +39,7 @@ Swing is rotation from side to side, around the axis perpendicular to the twist axis. The swing span defines, how much rotation will not get corrected along the swing axis. Could be defined as looseness in the [ConeTwistJoint]. - If below 0.05, this behavior is locked. Default value: [code]PI/4[/code]. + If below 0.05, this behavior is locked. </constant> <constant name="PARAM_TWIST_SPAN" value="1" enum="Param"> Twist is the rotation around the twist axis, this value defined how far the joint can twist. diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index b65f3c5609..775ad4c922 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -16,7 +16,7 @@ [codeblock] var config = ConfigFile.new() var err = config.load("user://settings.cfg") - if err == OK: # if not, something went wrong with the file loading + if err == OK: # If not, something went wrong with the file loading # Look for the display/width pair, and default to 1024 if missing var screen_width = config.get_value("display", "width", 1024) # Store a variable if and only if it hasn't been defined yet @@ -97,6 +97,26 @@ Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. </description> </method> + <method name="load_encrypted"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="key" type="PoolByteArray"> + </argument> + <description> + </description> + </method> + <method name="load_encrypted_pass"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="pass" type="String"> + </argument> + <description> + </description> + </method> <method name="save"> <return type="int" enum="Error"> </return> @@ -106,6 +126,26 @@ Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. </description> </method> + <method name="save_encrypted"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="key" type="PoolByteArray"> + </argument> + <description> + </description> + </method> + <method name="save_encrypted_pass"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="pass" type="String"> + </argument> + <description> + </description> + </method> <method name="set_value"> <return type="void"> </return> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index d2c6b02e6e..d25c2b31ee 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -4,12 +4,12 @@ All User Interface nodes inherit from Control. A control's anchors and margins adapt its position and size relative to its parent. </brief_description> <description> - Base class for all User Interface or [i]UI[/i] related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. + Base class for all UI-related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes. [b]User Interface nodes and input[/b] Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it. Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus. - Set [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. + Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_*_override[/code] methods, like [method add_font_override]. You can override the theme with the inspector. </description> <tutorials> @@ -135,9 +135,9 @@ extends Control func can_drop_data(position, data): - # check position if it is relevant to you - # otherwise just check data - return typeof(data) == TYPE_DICTIONARY and data.has('expected') + # Check position if it is relevant to you + # Otherwise, just check data + return typeof(data) == TYPE_DICTIONARY and data.has("expected") [/codeblock] </description> </method> @@ -154,10 +154,10 @@ extends ColorRect func can_drop_data(position, data): - return typeof(data) == TYPE_DICTIONARY and data.has('color') + return typeof(data) == TYPE_DICTIONARY and data.has("color") func drop_data(position, data): - color = data['color'] + color = data["color"] [/codeblock] </description> </method> @@ -221,7 +221,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns null if there is no data to drag. Controls that want to receive drop data should implement [method can_drop_data] and [method drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag]. + Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method can_drop_data] and [method drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag]. A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. [codeblock] extends Control @@ -644,107 +644,107 @@ </method> </methods> <members> - <member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. Default value: [constant ANCHOR_BEGIN]. + <member name="anchor_bottom" type="float" setter="_set_anchor" getter="get_anchor" default="0.0"> + Anchors the bottom edge of the node to the origin, the center, or the end of its parent control. It changes how the bottom margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. </member> - <member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience.Default value: [constant ANCHOR_BEGIN]. + <member name="anchor_left" type="float" setter="_set_anchor" getter="get_anchor" default="0.0"> + Anchors the left edge of the node to the origin, the center or the end of its parent control. It changes how the left margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. </member> - <member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. Default value: [constant ANCHOR_BEGIN]. + <member name="anchor_right" type="float" setter="_set_anchor" getter="get_anchor" default="0.0"> + Anchors the right edge of the node to the origin, the center or the end of its parent control. It changes how the right margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. </member> - <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor"> - Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. Default value: [constant ANCHOR_BEGIN]. + <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0"> + Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top margin updates when the node moves or changes size. You can use one of the [code]ANCHOR_*[/code] constants for convenience. </member> - <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0"> The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals. </member> - <member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + <member name="focus_neighbour_bottom" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath("")"> Tells Godot which node it should give keyboard focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [code]ui_down[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. </member> - <member name="focus_neighbour_left" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + <member name="focus_neighbour_left" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath("")"> Tells Godot which node it should give keyboard focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one. </member> - <member name="focus_neighbour_right" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + <member name="focus_neighbour_right" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath("")"> Tells Godot which node it should give keyboard focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. </member> - <member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour"> + <member name="focus_neighbour_top" type="NodePath" setter="set_focus_neighbour" getter="get_focus_neighbour" default="NodePath("")"> Tells Godot which node it should give keyboard focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. </member> - <member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next"> + <member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath("")"> Tells Godot which node it should give keyboard focus to if the user presses Tab on a keyboard by default. You can change the key by editing the [code]ui_focus_next[/code] input action. If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. </member> - <member name="focus_previous" type="NodePath" setter="set_focus_previous" getter="get_focus_previous"> + <member name="focus_previous" type="NodePath" setter="set_focus_previous" getter="get_focus_previous" default="NodePath("")"> Tells Godot which node it should give keyboard focus to if the user presses Shift+Tab on a keyboard by default. You can change the key by editing the [code]ui_focus_prev[/code] input action. If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. </member> - <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection"> + <member name="grow_horizontal" type="int" setter="set_h_grow_direction" getter="get_h_grow_direction" enum="Control.GrowDirection" default="1"> Controls the direction on the horizontal axis in which the control should grow if its horizontal minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. </member> - <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" enum="Control.GrowDirection"> + <member name="grow_vertical" type="int" setter="set_v_grow_direction" getter="get_v_grow_direction" enum="Control.GrowDirection" default="1"> Controls the direction on the vertical axis in which the control should grow if its vertical minimum size is changed to be greater than its current size, as the control always has to be at least the minimum size. </member> - <member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip"> + <member name="hint_tooltip" type="String" setter="set_tooltip" getter="_get_tooltip" default=""""> Changes the tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. </member> - <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin"> + <member name="margin_bottom" type="float" setter="set_margin" getter="get_margin" default="0.0"> Distance between the node's bottom edge and its parent control, based on [member anchor_bottom]. Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> - <member name="margin_left" type="float" setter="set_margin" getter="get_margin"> + <member name="margin_left" type="float" setter="set_margin" getter="get_margin" default="0.0"> Distance between the node's left edge and its parent control, based on [member anchor_left]. Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> - <member name="margin_right" type="float" setter="set_margin" getter="get_margin"> + <member name="margin_right" type="float" setter="set_margin" getter="get_margin" default="0.0"> Distance between the node's right edge and its parent control, based on [member anchor_right]. Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> - <member name="margin_top" type="float" setter="set_margin" getter="get_margin"> + <member name="margin_top" type="float" setter="set_margin" getter="get_margin" default="0.0"> Distance between the node's top edge and its parent control, based on [member anchor_top]. Margins are often controlled by one or multiple parent [Container] nodes, so you should not modify them manually if your node is a direct child of a [Container]. Margins update automatically when you move or resize the node. </member> - <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape"> + <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" enum="Control.CursorShape" default="0"> The default cursor shape for this control. Useful for Godot plugins and applications or games that use the system's mouse cursors. [b]Note:[/b] On Linux, shapes may vary depending on the cursor theme of the system. </member> - <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter"> + <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" enum="Control.MouseFilter" default="0"> Controls whether the control will be able to receive mouse button input events through [method _gui_input] and how these events should be handled. Also controls whether the control can receive the [signal mouse_entered], and [signal mouse_exited] signals. See the constants to learn what each does. </member> - <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents"> + <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" default="false"> Enables whether rendering of children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered. </member> <member name="rect_global_position" type="Vector2" setter="_set_global_position" getter="get_global_position"> The node's global position, relative to the world (usually to the top-left corner of the window). </member> - <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size"> + <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size" default="Vector2( 0, 0 )"> The minimum size of the node's bounding rectangle. If you set it to a value greater than (0, 0), the node's bounding rectangle will always have at least this size, even if its content is smaller. If it's set to (0, 0), the node sizes automatically to fit its content, be it a texture or child nodes. </member> - <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset"> + <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset" default="Vector2( 0, 0 )"> By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle. </member> - <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position"> + <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position" default="Vector2( 0, 0 )"> The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset]. </member> - <member name="rect_rotation" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> + <member name="rect_rotation" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. </member> - <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale"> + <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. </member> - <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size"> + <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2( 0, 0 )"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. </member> - <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags"> + <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" default="1"> Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [code]SIZE_*[/code] constants to change the flags. See the constants to learn what each does. </member> - <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio"> + <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio" default="1.0"> If the node and at least one of its neighbours uses the [constant SIZE_EXPAND] size flag, the parent [Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbour a ratio of 1, this node will take two thirds of the available space. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags"> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" default="1"> Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [code]SIZE_*[/code] constants to change the flags. See the constants to learn what each does. </member> - <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> + <member name="theme" type="Theme" setter="set_theme" getter="get_theme" default="null"> Changing this property replaces the current [Theme] resource this node and all its [Control] children use. </member> </members> @@ -862,16 +862,16 @@ Show the system's forbidden mouse cursor when the user hovers the node. Often a crossed circle. </constant> <constant name="CURSOR_VSIZE" value="9" enum="CursorShape"> - Show the system's vertical resize mouse cursor when the user hovers the node. A double headed vertical arrow. It tells the user they can resize the window or the panel vertically. + Show the system's vertical resize mouse cursor when the user hovers the node. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. </constant> <constant name="CURSOR_HSIZE" value="10" enum="CursorShape"> - Show the system's horizontal resize mouse cursor when the user hovers the node. A double headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + Show the system's horizontal resize mouse cursor when the user hovers the node. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. </constant> <constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape"> - Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. </constant> <constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape"> - Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. + Show the system's window resize mouse cursor when the user hovers the node. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. </constant> <constant name="CURSOR_MOVE" value="13" enum="CursorShape"> Show the system's move mouse cursor when the user hovers the node. It shows 2 double-headed arrows at a 90 degree angle. It tells the user they can move a UI element freely. @@ -931,7 +931,7 @@ Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_WIDE" value="15" enum="LayoutPreset"> - Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset]. + Snap all 4 anchors to the respective corners of the parent control. Set all 4 margins to 0 after you applied this preset and the [Control] will fit its parent control. This is equivalent to the "Full Rect" layout option in the editor. Use with [method set_anchors_preset]. </constant> <constant name="PRESET_MODE_MINSIZE" value="0" enum="LayoutPresetMode"> </constant> @@ -957,13 +957,13 @@ Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It doesn't work with the fill or expand size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled and they will not propagate further to other controls. This also results in blocking signals in other controls. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. </constant> <constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter"> The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. Even if no control handled it at all, the event will still be handled automatically, so unhandled input will not be fired. </constant> <constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter"> - The control will not receive mouse button input events through [method _gui_input]. Also the control will not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. + The control will not receive mouse button input events through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. </constant> <constant name="GROW_DIRECTION_BEGIN" value="0" enum="GrowDirection"> The control will grow to the left or top to make up if its minimum size is changed to be greater than its current size on the respective axis. diff --git a/doc/classes/ConvexPolygonShape.xml b/doc/classes/ConvexPolygonShape.xml index 31b4d08213..d15a0a7336 100644 --- a/doc/classes/ConvexPolygonShape.xml +++ b/doc/classes/ConvexPolygonShape.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points"> + <member name="points" type="PoolVector3Array" setter="set_points" getter="get_points" default="PoolVector3Array( )"> The list of 3D points forming the convex polygon shape. </member> </members> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index 7add252481..050ca23e05 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ConvexPolygonShape2D" inherits="Shape2D" category="Core" version="3.2"> <brief_description> - Convex Polygon Shape for 2D physics. + Convex polygon shape for 2D physics. </brief_description> <description> - Convex Polygon Shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). + Convex polygon shape for 2D physics. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex in order to speed up collision detection. </description> <tutorials> @@ -21,7 +21,7 @@ </method> </methods> <members> - <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points"> + <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )"> The polygon's list of vertices. Can be in either clockwise or counterclockwise order. </member> </members> diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml index f5d2823115..2cedc78499 100644 --- a/doc/classes/CubeMap.xml +++ b/doc/classes/CubeMap.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CubeMap" inherits="Resource" category="Core" version="3.2"> <brief_description> - A CubeMap is a 6 sided 3D texture. + A CubeMap is a 6-sided 3D texture. </brief_description> <description> A 6-sided 3D texture typically used for faking reflections. It can be used to make an object look as if it's reflecting its surroundings. This usually delivers much better performance than other reflection methods. @@ -45,13 +45,13 @@ </method> </methods> <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags"> + <member name="flags" type="int" setter="set_flags" getter="get_flags" default="7"> The render flags for the [CubeMap]. See the [code]FLAG_*[/code] constants for details. </member> - <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality"> + <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7"> The lossy storage quality of the [CubeMap] if the storage mode is set to STORAGE_COMPRESS_LOSSY. </member> - <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage"> + <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0"> The [CubeMap]'s storage mode. See [code]STORAGE_*[/code] constants. </member> </members> diff --git a/doc/classes/CubeMesh.xml b/doc/classes/CubeMesh.xml index 6162474ed1..67e559ab07 100644 --- a/doc/classes/CubeMesh.xml +++ b/doc/classes/CubeMesh.xml @@ -12,17 +12,17 @@ <methods> </methods> <members> - <member name="size" type="Vector3" setter="set_size" getter="get_size"> - Size of the cuboid mesh. Defaults to (2, 2, 2). + <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )"> + Size of the cuboid mesh. </member> - <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth"> - Number of extra edge loops inserted along the z-axis. Defaults to 0. + <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> + Number of extra edge loops inserted along the Z axis. </member> - <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height"> - Number of extra edge loops inserted along the y-axis. Defaults to 0. + <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" default="0"> + Number of extra edge loops inserted along the Y axis. </member> - <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width"> - Number of extra edge loops inserted along the x-axis. Defaults to 0. + <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" default="0"> + Number of extra edge loops inserted along the X axis. </member> </members> <constants> diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index f7af2c159f..0fb559296e 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -4,7 +4,7 @@ A mathematic curve. </brief_description> <description> - A curve that can be saved and re-used for other objects. By default it ranges between [code]0[/code] and [code]1[/code] on the y-axis and positions points relative to the [code]0.5[/code] y-position. + A curve that can be saved and re-used for other objects. By default, it ranges between [code]0[/code] and [code]1[/code] on the Y axis and positions points relative to the [code]0.5[/code] Y position. </description> <tutorials> </tutorials> @@ -60,7 +60,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Returns the left [code]TangentMode[/code] for the point at [code]index[/code]. + Returns the left [enum TangentMode] for the point at [code]index[/code]. </description> </method> <method name="get_point_left_tangent" qualifiers="const"> @@ -87,7 +87,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Returns the right [code]TangentMode[/code] for the point at [code]index[/code]. + Returns the right [enum TangentMode] for the point at [code]index[/code]. </description> </method> <method name="get_point_right_tangent" qualifiers="const"> @@ -105,7 +105,7 @@ <argument index="0" name="offset" type="float"> </argument> <description> - Returns the y value for the point that would exist at x-position [code]offset[/code] along the curve. + Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve. </description> </method> <method name="interpolate_baked"> @@ -114,7 +114,7 @@ <argument index="0" name="offset" type="float"> </argument> <description> - Returns the y value for the point that would exist at x-position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked. + Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked. </description> </method> <method name="remove_point"> @@ -134,7 +134,7 @@ <argument index="1" name="mode" type="int" enum="Curve.TangentMode"> </argument> <description> - Sets the left [code]TangentMode[/code] for the point at [code]index[/code] to [code]mode[/code]. + Sets the left [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code]. </description> </method> <method name="set_point_left_tangent"> @@ -156,7 +156,7 @@ <argument index="1" name="offset" type="float"> </argument> <description> - Sets the offset from [code]0.5[/code] + Sets the offset from [code]0.5[/code]. </description> </method> <method name="set_point_right_mode"> @@ -167,7 +167,7 @@ <argument index="1" name="mode" type="int" enum="Curve.TangentMode"> </argument> <description> - Sets the right [code]TangentMode[/code] for the point at [code]index[/code] to [code]mode[/code]. + Sets the right [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code]. </description> </method> <method name="set_point_right_tangent"> @@ -194,14 +194,14 @@ </method> </methods> <members> - <member name="bake_resolution" type="int" setter="set_bake_resolution" getter="get_bake_resolution"> + <member name="bake_resolution" type="int" setter="set_bake_resolution" getter="get_bake_resolution" default="100"> The number of points to include in the baked (i.e. cached) curve data. </member> - <member name="max_value" type="float" setter="set_max_value" getter="get_max_value"> - The maximum value the curve can reach. Default value: [code]1[/code]. + <member name="max_value" type="float" setter="set_max_value" getter="get_max_value" default="1.0"> + The maximum value the curve can reach. </member> - <member name="min_value" type="float" setter="set_min_value" getter="get_min_value"> - The minimum value the curve can reach. Default value: [code]0[/code]. + <member name="min_value" type="float" setter="set_min_value" getter="get_min_value" default="0.0"> + The minimum value the curve can reach. </member> </members> <signals> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 3631711a8f..4e449a2032 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Curve2D" inherits="Resource" category="Core" version="3.2"> <brief_description> - Describes a Bezier curve in 2D space. + Describes a Bézier curve in 2D space. </brief_description> <description> - This class describes a Bezier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes. - It keeps a cache of precalculated points along the curve, to speed further calculations up. + This class describes a Bézier curve in 2D space. It is mainly used to give a shape to a [Path2D], but can be manually sampled for other purposes. + It keeps a cache of precalculated points along the curve, to speed up further calculations. </description> <tutorials> </tutorials> @@ -22,7 +22,7 @@ <argument index="3" name="at_position" type="int" default="-1"> </argument> <description> - Adds a point to a curve, at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. + Adds a point to a curve at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> @@ -193,7 +193,7 @@ </method> </methods> <members> - <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval"> + <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="5.0"> The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> </members> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index 2966e2f8c0..4a0873a986 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Curve3D" inherits="Resource" category="Core" version="3.2"> <brief_description> - Describes a Bezier curve in 3D space. + Describes a Bézier curve in 3D space. </brief_description> <description> - This class describes a Bezier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes. - It keeps a cache of precalculated points along the curve, to speed further calculations up. + This class describes a Bézier curve in 3D space. It is mainly used to give a shape to a [Path], but can be manually sampled for other purposes. + It keeps a cache of precalculated points along the curve, to speed up further calculations. </description> <tutorials> </tutorials> @@ -22,7 +22,7 @@ <argument index="3" name="at_position" type="int" default="-1"> </argument> <description> - Adds a point to a curve, at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. + Adds a point to a curve at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> @@ -242,10 +242,10 @@ </method> </methods> <members> - <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval"> + <member name="bake_interval" type="float" setter="set_bake_interval" getter="get_bake_interval" default="0.2"> The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the [method get_baked_points] or [method get_baked_length] function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. </member> - <member name="up_vector_enabled" type="bool" setter="set_up_vector_enabled" getter="is_up_vector_enabled"> + <member name="up_vector_enabled" type="bool" setter="set_up_vector_enabled" getter="is_up_vector_enabled" default="true"> If [code]true[/code], the curve will bake up vectors used for orientation. This is used when [member PathFollow.rotation_mode] is set to [constant PathFollow.ROTATION_ORIENTED]. Changing it forces the cache to be recomputed. </member> </members> diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml index 0184e1e6b6..666284138b 100644 --- a/doc/classes/CurveTexture.xml +++ b/doc/classes/CurveTexture.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> + <member name="curve" type="Curve" setter="set_curve" getter="get_curve" default="null"> The [code]curve[/code] rendered onto the texture. </member> - <member name="width" type="int" setter="set_width" getter="get_width"> + <member name="width" type="int" setter="set_width" getter="get_width" default="2048"> The width of the texture. </member> </members> diff --git a/doc/classes/CylinderMesh.xml b/doc/classes/CylinderMesh.xml index dbdc7aeb92..8e9397791a 100644 --- a/doc/classes/CylinderMesh.xml +++ b/doc/classes/CylinderMesh.xml @@ -11,20 +11,20 @@ <methods> </methods> <members> - <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius"> - Bottom radius of the cylinder. Defaults to 1.0. + <member name="bottom_radius" type="float" setter="set_bottom_radius" getter="get_bottom_radius" default="1.0"> + Bottom radius of the cylinder. </member> - <member name="height" type="float" setter="set_height" getter="get_height"> - Full height of the cylinder. Defaults to 2.0. + <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> + Full height of the cylinder. </member> - <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments"> - Number of radial segments on the cylinder. Defaults to 64. + <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> + Number of radial segments on the cylinder. </member> - <member name="rings" type="int" setter="set_rings" getter="get_rings"> - Number of edge rings along the height of the cylinder. Defaults to 4. + <member name="rings" type="int" setter="set_rings" getter="get_rings" default="4"> + Number of edge rings along the height of the cylinder. </member> - <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius"> - Top radius of the cylinder. Defaults to 1.0. + <member name="top_radius" type="float" setter="set_top_radius" getter="get_top_radius" default="1.0"> + Top radius of the cylinder. </member> </members> <constants> diff --git a/doc/classes/CylinderShape.xml b/doc/classes/CylinderShape.xml index 847265ef25..5dff156775 100644 --- a/doc/classes/CylinderShape.xml +++ b/doc/classes/CylinderShape.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height"> + <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> The cylinder's height. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> The cylinder's radius. </member> </members> diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml index d6973848e2..270d948f5e 100644 --- a/doc/classes/DampedSpringJoint2D.xml +++ b/doc/classes/DampedSpringJoint2D.xml @@ -11,17 +11,17 @@ <methods> </methods> <members> - <member name="damping" type="float" setter="set_damping" getter="get_damping"> - The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [code]damping[/code] value forces the attached bodies to align faster. Default value: [code]1[/code] + <member name="damping" type="float" setter="set_damping" getter="get_damping" default="1.0"> + The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [code]damping[/code] value forces the attached bodies to align faster. </member> - <member name="length" type="float" setter="set_length" getter="get_length"> - The spring joint's maximum length. The two attached bodies cannot stretch it past this value. Default value: [code]50[/code] + <member name="length" type="float" setter="set_length" getter="get_length" default="50.0"> + The spring joint's maximum length. The two attached bodies cannot stretch it past this value. </member> - <member name="rest_length" type="float" setter="set_rest_length" getter="get_rest_length"> - When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. Default value: [code]0[/code] + <member name="rest_length" type="float" setter="set_rest_length" getter="get_rest_length" default="0.0"> + When the bodies attached to the spring joint move they stretch or squash it. The joint always tries to resize towards this length. </member> - <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness"> - The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. Default value: [code]20[/code] + <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="20.0"> + The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. </member> </members> <constants> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index ec70fd311b..831a0bb02f 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -47,7 +47,7 @@ <argument index="0" name="key" type="Variant"> </argument> <description> - Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise. Do not erase elements while iterating over the dictionary. + Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise. Does not erase elements while iterating over the dictionary. </description> </method> <method name="get"> @@ -58,7 +58,7 @@ <argument index="1" name="default" type="Variant" default="Null"> </argument> <description> - Returns the current value for the specified key in the [Dictionary]. If the key does not exist, the method returns the value of the optional default argument, or Null if it is omitted. + Returns the current value for the specified key in the [Dictionary]. If the key does not exist, the method returns the value of the optional default argument, or [code]null[/code] if it is omitted. </description> </method> <method name="has"> diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index c6650a1641..4d0ff7f13b 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -4,7 +4,7 @@ Directional light from a distance, as from the Sun. </brief_description> <description> - A directional light is a type of [Light] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used do determine light direction. + A directional light is a type of [Light] node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight transform (origin) is ignored. Only the basis is used to determine light direction. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> @@ -12,31 +12,31 @@ <methods> </methods> <members> - <member name="directional_shadow_bias_split_scale" type="float" setter="set_param" getter="get_param"> - Amount of extra bias for shadow splits that are far away. If self shadowing occurs only on the splits far away, this value can fix them. + <member name="directional_shadow_bias_split_scale" type="float" setter="set_param" getter="get_param" default="0.25"> + Amount of extra bias for shadow splits that are far away. If self-shadowing occurs only on the splits far away, increasing this value can fix them. </member> - <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled"> - If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. Default value:[code]false[/code]. + <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false"> + If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. </member> - <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange"> + <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight.ShadowDepthRange" default="0"> Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. </member> - <member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param"> + <member name="directional_shadow_max_distance" type="float" setter="set_param" getter="get_param" default="200.0"> The maximum distance for shadow splits. </member> - <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight.ShadowMode"> + <member name="directional_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="DirectionalLight.ShadowMode" default="2"> The light's shadow rendering algorithm. See [enum ShadowMode]. </member> - <member name="directional_shadow_normal_bias" type="float" setter="set_param" getter="get_param"> + <member name="directional_shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="0.8"> Can be used to fix special cases of self shadowing when objects are perpendicular to the light. </member> - <member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param"> - The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is one of the [code]SHADOW_PARALLEL_*_SPLITS[/code] constants. + <member name="directional_shadow_split_1" type="float" setter="set_param" getter="get_param" default="0.1"> + The distance from camera to shadow split 1. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. </member> - <member name="directional_shadow_split_2" type="float" setter="set_param" getter="get_param"> - The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_3_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. + <member name="directional_shadow_split_2" type="float" setter="set_param" getter="get_param" default="0.2"> + The distance from shadow split 1 to split 2. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_2_SPLITS[/code] or [code]SHADOW_PARALLEL_4_SPLITS[/code]. </member> - <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param"> + <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 [code]SHADOW_PARALLEL_4_SPLITS[/code]. </member> </members> @@ -51,7 +51,7 @@ Splits the view frustum in 4 areas, each with its own shadow map. </constant> <constant name="SHADOW_DEPTH_RANGE_STABLE" value="0" enum="ShadowDepthRange"> - Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution. Default value. + Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution. </constant> <constant name="SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="ShadowDepthRange"> Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 9c33b4fc0e..9294a515d2 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -32,8 +32,8 @@ <argument index="0" name="todir" type="String"> </argument> <description> - Change the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). - The method returns one of the error code constants defined in [@GlobalScope] (OK or ERR_*). + Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). + The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). </description> </method> <method name="copy"> @@ -44,8 +44,8 @@ <argument index="1" name="to" type="String"> </argument> <description> - Copy the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Returns one of the error code constants defined in [@GlobalScope] (OK, FAILED or ERR_*). + Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). </description> </method> <method name="current_is_dir" qualifiers="const"> @@ -93,14 +93,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> - On Windows, return the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String. + On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not existed, the method returns an empty String. </description> </method> <method name="get_drive_count"> <return type="int"> </return> <description> - On Windows, return the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. + On Windows, returns the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. </description> </method> <method name="get_next"> @@ -115,7 +115,7 @@ <return type="int"> </return> <description> - On Unix desktop systems, return the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. + On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. </description> </method> <method name="list_dir_begin"> @@ -126,7 +126,7 @@ <argument index="1" name="skip_hidden" type="bool" default="false"> </argument> <description> - Initialize the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. + Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. If you pass [code]skip_navigational[/code], then [code].[/code] and [code]..[/code] would be filtered out. If you pass [code]skip_hidden[/code], then hidden files would be filtered out. </description> @@ -135,7 +135,7 @@ <return type="void"> </return> <description> - Close the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter). + Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] or not does not matter). </description> </method> <method name="make_dir"> @@ -144,8 +144,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Create a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). - The method returns one of the error code constants defined in [@GlobalScope] (OK, FAILED or ERR_*). + Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). + The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). </description> </method> <method name="make_dir_recursive"> @@ -154,8 +154,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Create a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. - Returns one of the error code constants defined in [@GlobalScope] (OK, FAILED or ERR_*). + Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. + Returns one of the error code constants defined in [@GlobalScope] ([code]0K[/code], [code]FAILED[/code] or [code]ERR_*[/code]). </description> </method> <method name="open"> @@ -164,8 +164,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Open an existing directory of the filesystem. The [i]path[/i] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). - The method returns one of the error code constants defined in [@GlobalScope] (OK or ERR_*). + Opens an existing directory of the filesystem. The [code]path[/code] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). + The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). </description> </method> <method name="remove"> @@ -174,8 +174,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Delete 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. - Returns one of the error code constants defined in [@GlobalScope] (OK or FAILED). + 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. + Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). </description> </method> <method name="rename"> @@ -186,8 +186,8 @@ <argument index="1" name="to" type="String"> </argument> <description> - Rename (move) the [i]from[/i] file to the [i]to[/i] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Returns one of the error code constants defined in [@GlobalScope] (OK or FAILED). + Renames (move) the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). </description> </method> </methods> diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 5fdc1ebb75..b7710068a6 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -62,32 +62,32 @@ </method> </methods> <members> - <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing"> + <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra spacing at the bottom in pixels. </member> - <member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing"> + <member name="extra_spacing_char" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra character spacing in pixels. </member> - <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing"> + <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra space spacing in pixels. </member> - <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing"> + <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra spacing at the top in pixels. </member> - <member name="font_data" type="DynamicFontData" setter="set_font_data" getter="get_font_data"> + <member name="font_data" type="DynamicFontData" setter="set_font_data" getter="get_font_data" default="null"> The font data. </member> - <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color"> + <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color( 1, 1, 1, 1 )"> </member> - <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size"> + <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0"> </member> - <member name="size" type="int" setter="set_size" getter="get_size"> + <member name="size" type="int" setter="set_size" getter="get_size" default="16"> The font size. </member> - <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter"> + <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" default="false"> If [code]true[/code], filtering is used. </member> - <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps"> + <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" default="false"> If [code]true[/code], mipmapping is used. </member> </members> diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml index 8eff5fb993..ecdab32e80 100644 --- a/doc/classes/DynamicFontData.xml +++ b/doc/classes/DynamicFontData.xml @@ -11,19 +11,19 @@ <methods> </methods> <members> - <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased"> + <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true"> Controls whether the font should be rendered with anti-aliasing. </member> - <member name="font_path" type="String" setter="set_font_path" getter="get_font_path"> + <member name="font_path" type="String" setter="set_font_path" getter="get_font_path" default=""""> The path to the vector font file. </member> - <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="DynamicFontData.Hinting"> + <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="DynamicFontData.Hinting" default="2"> The font hinting mode used by FreeType. </member> </members> <constants> <constant name="HINTING_NONE" value="0" enum="Hinting"> - Disable font hinting (smoother but less crisp). + Disables font hinting (smoother but less crisp). </constant> <constant name="HINTING_LIGHT" value="1" enum="Hinting"> Use the light font hinting mode. diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 15271b8050..c9f55afbaf 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -14,7 +14,7 @@ </argument> <description> Adds a comma-delimited file extension filter option to the [EditorFileDialog] with an optional semi-colon-delimited label. - Example: "*.tscn, *.scn; Scenes", results in filter text "Scenes (*.tscn, *.scn)". + For example, [code]"*.tscn, *.scn; Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)". </description> </method> <method name="clear_filters"> @@ -40,28 +40,28 @@ </method> </methods> <members> - <member name="access" type="int" setter="set_access" getter="get_access" enum="EditorFileDialog.Access"> + <member name="access" type="int" setter="set_access" getter="get_access" enum="EditorFileDialog.Access" default="0"> The location from which the user may select a file, including [code]res://[/code], [code]user://[/code], and the local file system. </member> - <member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir"> + <member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir" default=""res://""> The currently occupied directory. </member> - <member name="current_file" type="String" setter="set_current_file" getter="get_current_file"> + <member name="current_file" type="String" setter="set_current_file" getter="get_current_file" default=""""> The currently selected file. </member> - <member name="current_path" type="String" setter="set_current_path" getter="get_current_path"> + <member name="current_path" type="String" setter="set_current_path" getter="get_current_path" default=""res://""> The file system path in the address bar. </member> - <member name="disable_overwrite_warning" type="bool" setter="set_disable_overwrite_warning" getter="is_overwrite_warning_disabled"> + <member name="disable_overwrite_warning" type="bool" setter="set_disable_overwrite_warning" getter="is_overwrite_warning_disabled" default="false"> If [code]true[/code], the [EditorFileDialog] will not warn the user before overwriting files. </member> - <member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode"> + <member name="display_mode" type="int" setter="set_display_mode" getter="get_display_mode" enum="EditorFileDialog.DisplayMode" default="0"> The view format in which the [EditorFileDialog] displays resources to the user. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="EditorFileDialog.Mode"> - The purpose of the [EditorFileDialog]. Changes allowed behaviors. + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="EditorFileDialog.Mode" default="4"> + The purpose of the [EditorFileDialog], which defines the allowed behaviors. </member> - <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files"> + <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false"> If [code]true[/code], hidden files and directories will be visible in the [EditorFileDialog]. </member> </members> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 1c7a68fc0b..798658c8d0 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -15,14 +15,14 @@ <argument index="0" name="path" type="String"> </argument> <description> - Get the type of the file, given the full path. + Gets the type of the file, given the full path. </description> </method> <method name="get_filesystem"> <return type="EditorFileSystemDirectory"> </return> <description> - Get the root directory object. + Gets the root directory object. </description> </method> <method name="get_filesystem_path"> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index c7920c6ed6..cb2ed28b38 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -97,7 +97,7 @@ <return type="EditorFileSystemDirectory"> </return> <description> - Returns the parent directory for this directory or null if called on a directory at [code]res://[/code] or [code]user://[/code]. + Returns the parent directory for this directory or [code]null[/code] if called on a directory at [code]res://[/code] or [code]user://[/code]. </description> </method> <method name="get_path" qualifiers="const"> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index e66596412b..0da87a9371 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -5,7 +5,7 @@ </brief_description> <description> EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin]. - EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory. + EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory. Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec": [codeblock] tool @@ -41,7 +41,7 @@ return FAILED var mesh = Mesh.new() - # Fill the Mesh with data read in 'file', left as exercise to the reader + # Fill the Mesh with data read in "file", left as an exercise to the reader var filename = save_path + "." + get_save_extension() ResourceSaver.save(filename, mesh) @@ -58,21 +58,21 @@ <argument index="0" name="preset" type="int"> </argument> <description> - Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional). + Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional). </description> </method> <method name="get_import_order" qualifiers="virtual"> <return type="int"> </return> <description> - Get the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. + Gets the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. </description> </method> <method name="get_importer_name" qualifiers="virtual"> <return type="String"> </return> <description> - Get the unique name of the importer. + Gets the unique name of the importer. </description> </method> <method name="get_option_visibility" qualifiers="virtual"> @@ -89,7 +89,7 @@ <return type="int"> </return> <description> - Get the number of initial presets defined by the plugin. Use [method get_import_options] to get the default options for the preset and [method get_preset_name] to get the name of the preset. + Gets the number of initial presets defined by the plugin. Use [method get_import_options] to get the default options for the preset and [method get_preset_name] to get the name of the preset. </description> </method> <method name="get_preset_name" qualifiers="virtual"> @@ -98,42 +98,42 @@ <argument index="0" name="preset" type="int"> </argument> <description> - Get the name of the options preset at this index. + Gets the name of the options preset at this index. </description> </method> <method name="get_priority" qualifiers="virtual"> <return type="float"> </return> <description> - Get the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. Default value is 1.0. + Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is [code]1.0[/code]. </description> </method> <method name="get_recognized_extensions" qualifiers="virtual"> <return type="Array"> </return> <description> - Get the list of file extensions to associate with this loader (case insensitive). e.g. [code]["obj"][/code]. + Gets the list of file extensions to associate with this loader (case-insensitive). e.g. [code]["obj"][/code]. </description> </method> <method name="get_resource_type" qualifiers="virtual"> <return type="String"> </return> <description> - Get the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code]. + Gets the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code]. </description> </method> <method name="get_save_extension" qualifiers="virtual"> <return type="String"> </return> <description> - Get the extension used to save this resource in the [code].import[/code] directory. + Gets the extension used to save this resource in the [code].import[/code] directory. </description> </method> <method name="get_visible_name" qualifiers="virtual"> <return type="String"> </return> <description> - Get the name to display in the import window. + Gets the name to display in the import window. </description> </method> <method name="import" qualifiers="virtual"> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index c2b13ff89e..cab5af3985 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -21,7 +21,7 @@ <argument index="0" name="control" type="Control"> </argument> <description> - Add a custom control, not necessarily a property editor. + Adds a custom control, not necessarily a property editor. </description> </method> <method name="add_property_editor"> @@ -32,7 +32,7 @@ <argument index="1" name="editor" type="Control"> </argument> <description> - Add a property editor, this must inherit [EditorProperty]. + Adds a property editor, this must inherit [EditorProperty]. </description> </method> <method name="add_property_editor_for_multiple_properties"> @@ -45,7 +45,7 @@ <argument index="2" name="editor" type="Control"> </argument> <description> - Add am editor that allows modifying multiple properties, this must inherit [EditorProperty]. + Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty]. </description> </method> <method name="can_handle" qualifiers="virtual"> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index ecbb5da10c..6f07682b04 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -146,7 +146,7 @@ <return type="int" enum="Error"> </return> <description> - Saves the scene. Returns either OK or ERR_CANT_CREATE. See [@GlobalScope] constants. + Saves the scene. Returns either [code]OK[/code] or [code]ERR_CANT_CREATE[/code] (see [@GlobalScope] constants). </description> </method> <method name="save_scene_as"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 36d6e38be9..bd9a100267 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -4,7 +4,7 @@ Used by the editor to extend its functionality. </brief_description> <description> - Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. Also see [EditorScript] to add functions to the editor. + Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also [EditorScript] to add functions to the editor. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link> @@ -18,7 +18,7 @@ <argument index="1" name="path" type="String"> </argument> <description> - Add a script at [code]path[/code] to the Autoload list as [code]name[/code]. + Adds a script at [code]path[/code] to the Autoload list as [code]name[/code]. </description> </method> <method name="add_control_to_bottom_panel"> @@ -29,7 +29,7 @@ <argument index="1" name="title" type="String"> </argument> <description> - Add a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [code]queue_free()[/code]. + Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [code]queue_free()[/code]. </description> </method> <method name="add_control_to_container"> @@ -40,7 +40,7 @@ <argument index="1" name="control" type="Control"> </argument> <description> - Add a custom control to a container (see CONTAINER_* enum). There are many locations where custom controls can be added in the editor UI. + Adds a custom control to a container (see [code]CONTAINER_*[/code] enum). There are many locations where custom controls can be added in the editor UI. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [code]queue_free()[/code]. </description> @@ -53,7 +53,7 @@ <argument index="1" name="control" type="Control"> </argument> <description> - Add the control to a specific dock slot (see DOCK_* enum for options). + Adds the control to a specific dock slot (see [code]DOCK_*[/code] enum for options). If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [code]queue_free()[/code]. </description> @@ -70,9 +70,9 @@ <argument index="3" name="icon" type="Texture"> </argument> <description> - Add a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. + Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. When given node or resource is selected, the base type will be instanced (ie, "Spatial", "Control", "Resource"), then the script will be loaded and set to this object. - You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using 'is' keyword. + You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. </description> </method> @@ -128,7 +128,7 @@ <argument index="3" name="ud" type="Variant" default="null"> </argument> <description> - Add a custom menu to 'Project > Tools' as [code]name[/code] that calls [code]callback[/code] on an instance of [code]handler[/code] with a parameter [code]ud[/code] when user activates it. + Adds a custom menu to [b]Project > Tools[/b] as [code]name[/code] that calls [code]callback[/code] on an instance of [code]handler[/code] with a parameter [code]ud[/code] when user activates it. </description> </method> <method name="add_tool_submenu_item"> @@ -234,7 +234,7 @@ <return type="PoolStringArray"> </return> <description> - This is for editors that edit script based objects. You can return a list of breakpoints in the format (script:line), for example: res://path_to_script.gd:25 + This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code]. </description> </method> <method name="get_editor_interface"> @@ -260,21 +260,22 @@ <return type="ScriptCreateDialog"> </return> <description> - Gets the Editor's dialogue used for making scripts. Note that users can configure it before use. + Gets the Editor's dialogue used for making scripts. + [b]Note:[/b] Users can configure it before use. </description> </method> <method name="get_state" qualifiers="virtual"> <return type="Dictionary"> </return> <description> - Get the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). + Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). </description> </method> <method name="get_undo_redo"> <return type="UndoRedo"> </return> <description> - Get the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. + Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. </description> </method> <method name="get_window_layout" qualifiers="virtual"> @@ -283,7 +284,7 @@ <argument index="0" name="layout" type="ConfigFile"> </argument> <description> - Get the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). + Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). </description> </method> <method name="handles" qualifiers="virtual"> @@ -299,7 +300,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspaces selector together with '2D', '3D', and 'Script'). + Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]). </description> </method> <method name="hide_bottom_panel"> @@ -339,7 +340,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Remove an Autoload [code]name[/code] from the list. + Removes an Autoload [code]name[/code] from the list. </description> </method> <method name="remove_control_from_bottom_panel"> @@ -348,7 +349,7 @@ <argument index="0" name="control" type="Control"> </argument> <description> - Remove the control from the bottom panel. You have to manually [code]queue_free()[/code] the control. + Removes the control from the bottom panel. You have to manually [code]queue_free()[/code] the control. </description> </method> <method name="remove_control_from_container"> @@ -359,7 +360,7 @@ <argument index="1" name="control" type="Control"> </argument> <description> - Remove the control from the specified container. You have to manually [code]queue_free()[/code] the control. + Removes the control from the specified container. You have to manually [code]queue_free()[/code] the control. </description> </method> <method name="remove_control_from_docks"> @@ -368,7 +369,7 @@ <argument index="0" name="control" type="Control"> </argument> <description> - Remove the control from the dock. You have to manually [code]queue_free()[/code] the control. + Removes the control from the dock. You have to manually [code]queue_free()[/code] the control. </description> </method> <method name="remove_custom_type"> @@ -377,7 +378,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Remove a custom type added by [method add_custom_type] + Removes a custom type added by [method add_custom_type]. </description> </method> <method name="remove_export_plugin"> @@ -426,7 +427,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Removes a menu [code]name[/code] from 'Project > Tools'. + Removes a menu [code]name[/code] from [b]Project > Tools[/b]. </description> </method> <method name="save_external_data" qualifiers="virtual"> @@ -480,7 +481,7 @@ <argument index="0" name="screen_name" type="String"> </argument> <description> - Emitted when user changes the workspace (2D, 3D, Script, AssetLib). Also works with custom screens defined by plugins. + Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins. </description> </signal> <signal name="resource_saved"> @@ -493,7 +494,7 @@ <argument index="0" name="scene_root" type="Node"> </argument> <description> - Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be null. + Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be [code]null[/code]. </description> </signal> <signal name="scene_closed"> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 735c270279..5c24f0bebc 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorProperty" inherits="Container" category="Core" version="3.2"> <brief_description> - Custom control to edit properties for adding into the inspector + Custom control to edit properties for adding into the inspector. </brief_description> <description> This control allows property editing for one or multiple properties into [EditorInspector]. It is added via [EditorInspectorPlugin]. @@ -30,21 +30,21 @@ <argument index="3" name="changing" type="bool" default="false"> </argument> <description> - If one (or many properties) changed, this must be called. "Field" is used in case your editor can modify fields separately (as an example, Vector3.x). The "changing" argument avoids the editor requesting this property to be refreshed (leave as false if unsure). + If one or several properties have changed, this must be called. [code]field[/code] is used in case your editor can modify fields separately (as an example, Vector3.x). The [code]changing[/code] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure). </description> </method> <method name="get_edited_object"> <return type="Object"> </return> <description> - Get the edited object. + Gets the edited object. </description> </method> <method name="get_edited_property"> <return type="String"> </return> <description> - Get the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return it.. + Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property. </description> </method> <method name="get_tooltip_text" qualifiers="const"> @@ -60,7 +60,7 @@ <argument index="0" name="editor" type="Control"> </argument> <description> - Add controls with this function if you want them on the bottom (below the label). + Adds controls with this function if you want them on the bottom (below the label). </description> </method> <method name="update_property" qualifiers="virtual"> @@ -72,22 +72,22 @@ </method> </methods> <members> - <member name="checkable" type="bool" setter="set_checkable" getter="is_checkable"> + <member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false"> Used by the inspector, set when property is checkable. </member> - <member name="checked" type="bool" setter="set_checked" getter="is_checked"> + <member name="checked" type="bool" setter="set_checked" getter="is_checked" default="false"> Used by the inspector, when the property is checked. </member> - <member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red"> + <member name="draw_red" type="bool" setter="set_draw_red" getter="is_draw_red" default="false"> Used by the inspector, when the property must draw with error color. </member> - <member name="keying" type="bool" setter="set_keying" getter="is_keying"> - Used by the inspector, when the property can add keys for animation/ + <member name="keying" type="bool" setter="set_keying" getter="is_keying" default="false"> + Used by the inspector, when the property can add keys for animation. </member> - <member name="label" type="String" setter="set_label" getter="get_label"> - Set this property to change the label (if you want to show one) + <member name="label" type="String" setter="set_label" getter="get_label" default=""""> + Sets this property to change the label (if you want to show one). </member> - <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only"> + <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> Used by the inspector, when the property is read-only. </member> </members> @@ -98,7 +98,7 @@ <argument index="1" name="value" type="Array"> </argument> <description> - Emit yourself if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin.parse_property] + Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin.parse_property]. </description> </signal> <signal name="object_id_selected"> @@ -107,7 +107,7 @@ <argument index="1" name="id" type="int"> </argument> <description> - Used by sub-inspectors. Emit if what was selected was an Object ID. + Used by sub-inspectors. Emit it if what was selected was an Object ID. </description> </signal> <signal name="property_changed"> @@ -125,14 +125,14 @@ <argument index="1" name="bool" type="String"> </argument> <description> - Used internally, when a property was checked. + Emitted when a property was checked. Used internally. </description> </signal> <signal name="property_keyed"> <argument index="0" name="property" type="String"> </argument> <description> - Emit if you want to add this value as an animation key (check keying being enabled first). + Emit it if you want to add this value as an animation key (check for keying being enabled first). </description> </signal> <signal name="property_keyed_with_value"> @@ -141,7 +141,7 @@ <argument index="1" name="value" type="Nil"> </argument> <description> - Emit if you want to key a property with a single value. + Emit it if you want to key a property with a single value. </description> </signal> <signal name="resource_selected"> @@ -159,7 +159,7 @@ <argument index="1" name="focusable_idx" type="int"> </argument> <description> - Internal, used when selected. + Emitted when selected. Used internally. </description> </signal> </signals> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 8de905e710..9d3f4b0b12 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -24,7 +24,7 @@ <argument index="0" name="path" type="String"> </argument> <description> - Check if the resource changed, if so it will be invalidated and the corresponding signal emitted. + Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. </description> </method> <method name="queue_edited_resource_preview"> @@ -63,7 +63,7 @@ <argument index="0" name="generator" type="EditorResourcePreviewGenerator"> </argument> <description> - Remove a custom preview generator. + Removes a custom preview generator. </description> </method> </methods> @@ -72,7 +72,7 @@ <argument index="0" name="path" type="String"> </argument> <description> - If a preview was invalidated (changed) this signal will emit (using the path of the preview) + Emitted if a preview was invalidated (changed). [code]path[/code] corresponds to the path of the preview. </description> </signal> </signals> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index 156cc62941..4e61943c8f 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -4,7 +4,7 @@ Custom generator of previews. </brief_description> <description> - Custom code to generate previews. Please check "file_dialog/thumbnail_size" in EditorSettings to find out the right size to do previews at. + Custom code to generate previews. Please check [code]file_dialog/thumbnail_size[/code] in [EditorSettings] to find out the right size to do previews at. </description> <tutorials> </tutorials> @@ -13,8 +13,8 @@ <return type="bool"> </return> <description> - If this function returns true the generator will call [method generate] or [method generate_from_path] for small previews too. - By default it returns false. + If this function returns [code]true[/code], the generator will call [method generate] or [method generate_from_path] for small previews as well. + By default, it returns [code]false[/code]. </description> </method> <method name="generate" qualifiers="virtual"> @@ -47,8 +47,8 @@ <return type="bool"> </return> <description> - If this function returns true the generator will automatically generate the small previews from the normal preview texture generated by the methods [method generate] or [method generate_from_path]. - By default it returns false. + If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method generate] or [method generate_from_path]. + By default, it returns [code]false[/code]. </description> </method> <method name="handles" qualifiers="virtual"> @@ -57,7 +57,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns if your generator supports this resource type. + Returns [code]true[/code] if your generator supports the resource of type [code]type[/code]. </description> </method> </methods> diff --git a/doc/classes/EditorSceneImporterAssimp.xml b/doc/classes/EditorSceneImporterAssimp.xml index b1f397e2b9..e2d73be870 100644 --- a/doc/classes/EditorSceneImporterAssimp.xml +++ b/doc/classes/EditorSceneImporterAssimp.xml @@ -1,30 +1,30 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSceneImporterAssimp" inherits="EditorSceneImporter" category="Core" version="3.2"> <brief_description> - This is a multi-format 3d asset importer. + Multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. </brief_description> <description> - This is a multi-format 3d asset importer. - Use these FBX export settings from Autodesk Maya. + This is a multi-format 3D asset importer based on [url=http://assimp.org/]Assimp[/url]. See [url=https://assimp-docs.readthedocs.io/en/latest/about/intoduction.html#installation]this page[/url] for a full list of supported formats. + If exporting a FBX scene from Autodesk Maya, use these FBX export settings: [codeblock] - * Smoothing Groups - * Smooth Mesh - * Triangluate (For mesh with blendshapes) - * Bake Animation - * Resample All - * Deformed Models - * Skins - * Blend Shapes - * Curve Filters - * Constant Key Reducer - * Auto Tangents Only - * DO NOT CHECK Constraints (Will Break File) - * Can check Embed Media (Embeds textures into FBX file to import) - -- Note: When importing embed media, texture and mesh will be a un-alterable file. - -- Reimport of fbx with updated texture is need if texture is updated. - * Units: Centimeters - * Up Axis: Y - * Binary format in FBX 2017 + - Smoothing Groups + - Smooth Mesh + - Triangluate (for meshes with blend shapes) + - Bake Animation + - Resample All + - Deformed Models + - Skins + - Blend Shapes + - Curve Filters + - Constant Key Reducer + - Auto Tangents Only + - *Do not check* Constraints (as it will break the file) + - Can check Embed Media (embeds textures into the exported FBX file) + - Note that when importing embedded media, the texture and mesh will be a single immutable file. + - You will have to re-export then re-import the FBX if the texture has changed. + - Units: Centimeters + - Up Axis: Y + - Binary format in FBX 2017 [/codeblock] </description> <tutorials> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 3b0590f78c..df6cdd4b35 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorScenePostImport" inherits="Reference" category="Core" version="3.2"> <brief_description> - Post process scenes after import + Post-processes scenes after import. </brief_description> <description> - Imported scenes can be automatically modified right after import by setting their [i]Custom Script[/i] Import property to a [code]tool[/code] script that inherits from this class. + Imported scenes can be automatically modified right after import by setting their [b]Custom Script[/b] Import property to a [code]tool[/code] script that inherits from this class. The [method post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example: [codeblock] - tool # needed so it runs in editor + tool # Needed so it runs in editor extends EditorScenePostImport # This sample changes all node names # Called right after the scene is imported and gets the root node func post_import(scene): - # change all node names to "modified_[oldnodename]" + # Change all node names to "modified_[oldnodename]" iterate(scene) - return scene # remember to return the imported scene + return scene # Remember to return the imported scene func iterate(node): if node != null: @@ -49,7 +49,7 @@ <argument index="0" name="scene" type="Object"> </argument> <description> - Gets called after the scene got imported and has to return the modified version of the scene. + Called after the scene was imported. This method must return the modified version of the scene. </description> </method> </methods> diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml index 52d7ce3f17..5c49e227be 100644 --- a/doc/classes/EditorScript.xml +++ b/doc/classes/EditorScript.xml @@ -4,8 +4,9 @@ Base script that can be used to add extension functions to the editor. </brief_description> <description> - Scripts extending this class and implementing its [code]_run()[/code] method can be executed from the Script Editor's [code]File -> Run[/code] menu option (or by pressing [code]CTRL+Shift+X[/code]) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using [EditorPlugin]s instead. Note that extending scripts need to have [code]tool mode[/code] enabled. - Example script: + Scripts extending this class and implementing its [method _run] method can be executed from the Script Editor's [b]File > Run[/b] menu option (or by pressing [code]Ctrl+Shift+X[/code]) while the editor is running. This is useful for adding custom in-editor functionality to Godot. For more complex additions, consider using [EditorPlugin]s instead. + [b]Note:[/b] Extending scripts need to have [code]tool mode[/code] enabled. + [b]Example script:[/b] [codeblock] tool extends EditorScript @@ -13,7 +14,7 @@ func _run(): print("Hello from the Godot Editor!") [/codeblock] - Note that the script is run in the Editor context, which means the output is visible in the console window started with the Editor (STDOUT) instead of the usual Godot [i]Output[/i] dock. + [b]Note:[/b] The script is run in the Editor context, which means the output is visible in the console window started with the Editor (stdout) instead of the usual Godot [b]Output[/b] dock. </description> <tutorials> </tutorials> @@ -22,7 +23,7 @@ <return type="void"> </return> <description> - This method is executed by the Editor when [code]File -> Run[/code] is used. + This method is executed by the Editor when [b]File > Run[/b] is used. </description> </method> <method name="add_root_node"> @@ -32,7 +33,7 @@ </argument> <description> Adds [code]node[/code] as a child of the root node in the editor context. - WARNING: The implementation of this method is currently disabled. + [b]Warning:[/b] The implementation of this method is currently disabled. </description> </method> <method name="get_editor_interface"> diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index 336390b2b1..57df71ab01 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -15,7 +15,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> - Add a node to the selection. + Adds a node to the selection. </description> </method> <method name="clear"> @@ -29,14 +29,14 @@ <return type="Array"> </return> <description> - Get the list of selected nodes. + Gets the list of selected nodes. </description> </method> <method name="get_transformable_selected_nodes"> <return type="Array"> </return> <description> - Get the list of selected nodes, optimized for transform operations (ie, moving them, rotating, etc). This list avoids situations where a node is selected and also chid/grandchild. + Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild. </description> </method> <method name="remove_node"> @@ -45,7 +45,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> - Remove a node from the selection. + Removes a node from the selection. </description> </method> </methods> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 7d38031a4c..3719ad67de 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -4,7 +4,7 @@ Object that holds the project-independent editor settings. </brief_description> <description> - Object that holds the project-independent editor settings. These settings are generally visible in the Editor Settings menu. + Object that holds the project-independent editor settings. These settings are generally visible in the [b]Editor > Editor Settings[/b] menu. Accessing the settings is done by using the regular [Object] API, such as: [codeblock] settings.set(prop,value) @@ -21,8 +21,8 @@ <argument index="0" name="info" type="Dictionary"> </argument> <description> - Add a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see TYPE_* in [@GlobalScope]), and optionally hint:[int](see PROPERTY_HINT_* in [@GlobalScope]), hint_string:[String]. - Example: + Adds a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + [b]Example:[/b] [codeblock] editor_settings.set("category/property_name", 0) @@ -50,7 +50,7 @@ <return type="PoolStringArray"> </return> <description> - Get the list of favorite files and directories for this project. + Gets the list of favorite files and directories for this project. </description> </method> <method name="get_project_metadata" qualifiers="const"> @@ -69,14 +69,14 @@ <return type="String"> </return> <description> - Get the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. + Gets the specific project settings path. Projects all have a unique sub-directory inside the settings path where project specific settings are saved. </description> </method> <method name="get_recent_dirs" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Get the list of recently visited folders in the file dialog for this project. + Gets the list of recently visited folders in the file dialog for this project. </description> </method> <method name="get_setting" qualifiers="const"> @@ -91,9 +91,9 @@ <return type="String"> </return> <description> - Get the global settings path for the engine. Inside this path you can find some standard paths such as: - settings/tmp - used for temporary storage of files - settings/templates - where export templates are located + Gets the global settings path for the engine. Inside this path, you can find some standard paths such as: + [code]settings/tmp[/code] - Used for temporary storage of files + [code]settings/templates[/code] - Where export templates are located </description> </method> <method name="has_setting" qualifiers="const"> @@ -126,7 +126,7 @@ <argument index="0" name="dirs" type="PoolStringArray"> </argument> <description> - Set the list of favorite files and directories for this project. + Sets the list of favorite files and directories for this project. </description> </method> <method name="set_initial_value"> @@ -159,7 +159,7 @@ <argument index="0" name="dirs" type="PoolStringArray"> </argument> <description> - Set the list of recently visited folders in the file dialog for this project. + Sets the list of recently visited folders in the file dialog for this project. </description> </method> <method name="set_setting"> diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index 5d5c37b212..03a274e23e 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -23,7 +23,7 @@ <argument index="0" name="triangles" type="TriangleMesh"> </argument> <description> - Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]. + Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw]. </description> </method> <method name="add_handles"> @@ -38,7 +38,7 @@ <argument index="3" name="secondary" type="bool" default="false"> </argument> <description> - Add a list of handles (points) which can be used to deform the object being edited. + Adds a list of handles (points) which can be used to deform the object being edited. There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw]. </description> </method> @@ -52,7 +52,7 @@ <argument index="2" name="billboard" type="bool" default="false"> </argument> <description> - Add lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw]. + Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw]. </description> </method> <method name="add_mesh"> @@ -77,7 +77,7 @@ <argument index="1" name="default_scale" type="float" default="1"> </argument> <description> - Add an unscaled billboard for visualization. Call this function during [method redraw]. + Adds an unscaled billboard for visualization. Call this function during [method redraw]. </description> </method> <method name="clear"> @@ -97,7 +97,7 @@ </argument> <description> Commit a handle being edited (handles must have been previously added by [method add_handles]). - If the cancel parameter is [code]true[/code], an option to restore the edited value to the original is provided. + If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided. </description> </method> <method name="get_handle_name" qualifiers="virtual"> @@ -106,7 +106,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Get the name of an edited handle (handles must have been previously added by [method add_handles]). + Gets the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing. </description> </method> @@ -116,7 +116,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Get actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]. + Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle]. </description> </method> <method name="get_plugin" qualifiers="const"> @@ -139,7 +139,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Get whether a handle is highlighted or not. + Gets whether a handle is highlighted or not. </description> </method> <method name="redraw" qualifiers="virtual"> diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml index 40d6376ca3..777d558a8e 100644 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -25,7 +25,7 @@ <return type="bool"> </return> <description> - Override this method to define whether the gizmo can be hidden or not. Defaults to [code]true[/code]. + Override this method to define whether the gizmo can be hidden or not. Returns [code]true[/code] if not overridden. </description> </method> <method name="commit_handle" qualifiers="virtual"> @@ -114,7 +114,7 @@ <argument index="1" name="index" type="int"> </argument> <description> - Get actual value of a handle from gizmo. Called for this plugin's active gizmos. + Gets actual value of a handle from gizmo. Called for this plugin's active gizmos. </description> </method> <method name="get_material"> @@ -125,7 +125,7 @@ <argument index="1" name="gizmo" type="EditorSpatialGizmo"> </argument> <description> - Get material from the internal list of materials. If an [EditorSpatialGizmo] is provided it will try to get the corresponding variant (selected and/or editable). + Gets material from the internal list of materials. If an [EditorSpatialGizmo] is provided, it will try to get the corresponding variant (selected and/or editable). </description> </method> <method name="get_name" qualifiers="virtual"> @@ -158,7 +158,7 @@ <argument index="1" name="index" type="int"> </argument> <description> - Get whether a handle is highlighted or not. Called for this plugin's active gizmos. + Gets whether a handle is highlighted or not. Called for this plugin's active gizmos. </description> </method> <method name="is_selectable_when_hidden" qualifiers="virtual"> diff --git a/doc/classes/EncodedObjectAsID.xml b/doc/classes/EncodedObjectAsID.xml index 6efdda48ef..7221aa845b 100644 --- a/doc/classes/EncodedObjectAsID.xml +++ b/doc/classes/EncodedObjectAsID.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="object_id" type="int" setter="set_object_id" getter="get_object_id"> + <member name="object_id" type="int" setter="set_object_id" getter="get_object_id" default="0"> The [Object] identifier stored in this [EncodedObjectAsID] instance. The object instance can be retrieved with [method @GDScript.instance_from_id]. </member> </members> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index d446363a83..60a807c304 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -4,7 +4,7 @@ Access to basic engine properties. </brief_description> <description> - The [Engine] class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others. + The [Engine] class allows you to query and modify the project's run-time parameters, such as frames per second, time scale, and others. </description> <tutorials> </tutorials> @@ -14,10 +14,10 @@ </return> <description> Returns engine author information in a Dictionary. - "lead_developers" - Array of Strings, lead developer names - "founders" - Array of Strings, founder names - "project_managers" - Array of Strings, project manager names - "developers" - Array of Strings, developer names + [code]lead_developers[/code] - Array of Strings, lead developer names + [code]founders[/code] - Array of Strings, founder names + [code]project_managers[/code] - Array of Strings, project manager names + [code]developers[/code] - Array of Strings, developer names </description> </method> <method name="get_copyright_info" qualifiers="const"> @@ -25,8 +25,8 @@ </return> <description> Returns an Array of copyright information Dictionaries. - "name" - String, component name - "parts" - Array of Dictionaries {"files", "copyright", "license"} describing subsections of the component + [code]name[/code] - String, component name + [code]parts[/code] - Array of Dictionaries {[code]files[/code], [code]copyright[/code], [code]license[/code]} describing subsections of the component </description> </method> <method name="get_donor_info" qualifiers="const"> @@ -34,7 +34,7 @@ </return> <description> Returns a Dictionary of Arrays of donor names. - {"platinum_sponsors", "gold_sponsors", "mini_sponsors", "gold_donors", "silver_donors", "bronze_donors"} + {[code]platinum_sponsors[/code], [code]gold_sponsors[/code], [code]mini_sponsors[/code], [code]gold_donors[/code], [code]silver_donors[/code], [code]bronze_donors[/code]} </description> </method> <method name="get_frames_drawn"> @@ -88,18 +88,18 @@ [code]major[/code] - Holds the major version number as an int [code]minor[/code] - Holds the minor version number as an int [code]patch[/code] - Holds the patch version number as an int - [code]hex[/code] - Holds the full version number encoded as an hexadecimal int with one byte (2 places) per number (see example below) + [code]hex[/code] - Holds the full version number encoded as a hexadecimal int with one byte (2 places) per number (see example below) [code]status[/code] - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String [code]build[/code] - Holds the build name (e.g. "custom_build") as a String [code]hash[/code] - Holds the full Git commit hash as a String [code]year[/code] - Holds the year the version was released in as an int [code]string[/code] - [code]major[/code] + [code]minor[/code] + [code]patch[/code] + [code]status[/code] + [code]build[/code] in a single String - The [code]hex[/code] value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. Note that it's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code: + The [code]hex[/code] value is encoded as follows, from left to right: one byte for the major, one byte for the minor, one byte for the patch version. For example, "3.1.12" would be [code]0x03010C[/code]. [b]Note:[/b] It's still an int internally, and printing it will give you its decimal representation, which is not particularly meaningful. Use hexadecimal literals for easy version comparisons from code: [codeblock] if Engine.get_version_info().hex >= 0x030200: - # do things specific to version 3.2 or later + # Do things specific to version 3.2 or later else: - # do things specific to versions before 3.2 + # Do things specific to versions before 3.2 [/codeblock] </description> </method> @@ -120,18 +120,18 @@ </method> </methods> <members> - <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint"> + <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint" default="true"> If [code]true[/code], it is running inside the editor. Useful for tool scripts. </member> - <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second"> + <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60"> The number of fixed iterations per second (for fixed process and physics). </member> - <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix"> + <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> </member> - <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps"> - The desired frames per second. If the hardware cannot keep up, this setting may not be respected. Defaults to 0, which indicates no limit. + <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> + The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. </member> - <member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale"> + <member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0"> Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. </member> </members> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 72993103e8..9df8ae1aa5 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -5,10 +5,9 @@ </brief_description> <description> Resource for environment nodes (like [WorldEnvironment]) that define multiple environment operations (such as background [Sky] or [Color], ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is: - - DOF Blur - - Motion Blur - - Bloom - - Tonemap (auto exposure) + - Depth of Field Blur + - Glow + - Tonemap (Auto Exposure) - Adjustments </description> <tutorials> @@ -18,235 +17,235 @@ <methods> </methods> <members> - <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness"> + <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0"> Global brightness value of the rendered scene (default value is 1). </member> - <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> + <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction" default="null"> Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. </member> - <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast"> + <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0"> Global contrast value of the rendered scene (default value is 1). </member> - <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled"> + <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false"> Enables the adjustment_* options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene. </member> - <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation"> + <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> Global color saturation value of the rendered scene (default value is 1). </member> - <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color"> + <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color( 0, 0, 0, 1 )"> [Color] of the ambient light. </member> - <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy"> + <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> Energy of the ambient light. The higher the value, the stronger the light. </member> - <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution"> + <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 0 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 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. </member> - <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure"> + <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" default="false"> Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. </member> - <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max"> + <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0"> Maximum luminance value for the auto exposure. </member> - <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min"> + <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05"> Minimum luminance value for the auto exposure. </member> - <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey"> + <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4"> Scale of the auto exposure effect. Affects the intensity of auto exposure. </member> - <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed"> + <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5"> Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. </member> - <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id"> + <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1"> The id of the camera feed to show in the background. </member> - <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer"> + <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0"> Maximum layer id (if using Layer background mode). </member> - <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color"> + <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )"> Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). </member> - <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy"> + <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> Power of light emitted by the background. </member> - <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode"> + <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0"> Defines the mode of background. </member> - <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky"> + <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky" default="null"> [Sky] resource defined as background. </member> - <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov"> + <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> [Sky] resource's custom field of view. </member> - <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation"> + <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> [Sky] resource's rotation expressed as a [Basis] </member> - <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation"> + <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> [Sky] resource's rotation expressed as euler angles in radians </member> - <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees"> + <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )"> [Sky] resource's rotation expressed as euler angles in degrees </member> - <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount"> + <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1"> Amount of far blur. </member> - <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance"> + <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> Distance from the camera where the far blur effect affects the rendering. </member> - <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled"> + <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> Enables the far blur effect. </member> - <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality"> + <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality" default="1"> Quality of the far blur quality. </member> - <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition"> + <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> Transition between no-blur area and far blur. </member> - <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount"> + <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" default="0.1"> Amount of near blur. </member> - <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance"> + <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> Distance from the camera where the near blur effect affects the rendering. </member> - <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled"> + <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> Enables the near blur effect. </member> - <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality"> + <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality" default="1"> Quality of the near blur quality. </member> - <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition"> + <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> Transition between near blur and no-blur area. </member> - <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color"> + <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" default="Color( 0.5, 0.6, 0.7, 1 )"> Fog's [Color]. </member> - <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin"> + <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" default="10.0"> Fog's depth starting distance from the camera. </member> - <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve"> + <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" default="1.0"> Value defining the fog depth intensity. </member> - <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled"> + <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" default="true"> Enables the fog depth. </member> - <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end"> + <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end" default="0.0"> </member> - <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled"> + <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> Enables the fog. Needs fog_height_enabled and/or for_depth_enabled to actually display fog. </member> - <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve"> + <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" default="1.0"> Value defining the fog height intensity. </member> - <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled"> + <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" default="false"> Enables the fog height. </member> - <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max"> + <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" default="100.0"> Maximum height of fog. </member> - <member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min"> + <member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min" default="0.0"> Minimum height of fog. </member> - <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount"> + <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" default="0.0"> Amount of sun that affects the fog rendering. </member> - <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color"> + <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" default="Color( 1, 0.9, 0.7, 1 )"> Sun [Color]. </member> - <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve"> + <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" default="1.0"> Amount of light that the fog transmits. </member> - <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled"> + <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false"> Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. </member> - <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled"> + <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false"> </member> - <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode"> + <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> Glow blending mode. </member> - <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom"> + <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" default="0.0"> Bloom value (global glow). </member> - <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled"> + <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" default="false"> Enables glow rendering. </member> - <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap"> + <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap" default="12.0"> </member> - <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale"> + <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale" default="2.0"> Bleed scale of the HDR glow. </member> - <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold"> + <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0"> Bleed threshold of the HDR glow. </member> - <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity"> + <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> Glow intensity. </member> - <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> First level of glow (most local). </member> - <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> Second level of glow. </member> - <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> Third level of glow. </member> - <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> Fourth level of glow. </member> - <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> Fifth level of glow. </member> - <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> Sixth level of glow. </member> - <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled"> + <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> Seventh level of glow (most global). </member> - <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength"> + <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> Glow strength. </member> - <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance"> + <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2"> </member> - <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled"> + <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false"> </member> - <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in"> + <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15"> </member> - <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out"> + <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0"> </member> - <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps"> + <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" default="64"> </member> - <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough"> + <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough" default="true"> </member> - <member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect"> + <member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0"> </member> - <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias"> + <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" default="0.01"> </member> - <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur"> + <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3"> </member> - <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color"> + <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" default="Color( 0, 0, 0, 1 )"> </member> - <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness"> + <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0"> </member> - <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled"> + <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" default="false"> </member> - <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity"> + <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0"> </member> - <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2"> + <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" default="1.0"> </member> - <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect"> + <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0"> </member> - <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality"> + <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality" default="1"> </member> - <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius"> + <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0"> </member> - <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2"> + <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" default="0.0"> </member> - <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure"> + <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> Default exposure for tonemap. </member> - <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper"> + <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0"> Tonemapping mode. </member> - <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white"> + <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0"> White reference value for tonemap. </member> </members> @@ -282,7 +281,7 @@ Screen glow blending mode. Increases brightness, used frequently with bloom. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="GlowBlendMode"> - Softlight glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. + Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="GlowBlendMode"> Replace glow blending mode. Replaces all pixels' color by the glow value. @@ -291,7 +290,7 @@ Linear tonemapper operator. Reads the linear data and performs an exposure adjustment. </constant> <constant name="TONE_MAPPER_REINHARDT" value="1" enum="ToneMapper"> - Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: color = color / (1 + color). + Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: [code]color = color / (1 + color)[/code]. </constant> <constant name="TONE_MAPPER_FILMIC" value="2" enum="ToneMapper"> Filmic tonemapper operator. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 42fee8df17..9eff0a4d27 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -36,7 +36,8 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the file cursor has read past the end of the file. Note that this function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic. + Returns [code]true[/code] if the file cursor has read past the end of the file. + [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_len] and [method get_position] to implement a custom logic. </description> </method> <method name="file_exists" qualifiers="const"> @@ -46,7 +47,7 @@ </argument> <description> Returns [code]true[/code] if the file exists in the given path. - Note that many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the [code]res://.import[/code] folder). To check for the existence of such resources while taking into account the remapping to their imported location, use [method ResourceLoader.exists]. Typically, using [code]File.file_exists[/code] on an imported resource would work while you are developing in the editor (the source asset is present in [code]res://[/code], but fail when exported). + [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and that their source asset will not be included in the exported game, as only the imported version is used (in the [code]res://.import[/code] folder). To check for the existence of such resources while taking into account the remapping to their imported location, use [method ResourceLoader.exists]. Typically, using [code]File.file_exists[/code] on an imported resource would work while you are developing in the editor (the source asset is present in [code]res://[/code], but fail when exported). </description> </method> <method name="get_16" qualifiers="const"> @@ -100,7 +101,7 @@ <argument index="0" name="delim" type="String" default="",""> </argument> <description> - Returns the next value of the file in CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long. + Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. Text is interpreted as being UTF-8 encoded. </description> </method> @@ -108,7 +109,7 @@ <return type="float"> </return> <description> - Returns the next 64 bits from the file as a floating point number. + Returns the next 64 bits from the file as a floating-point number. </description> </method> <method name="get_error" qualifiers="const"> @@ -122,7 +123,7 @@ <return type="float"> </return> <description> - Returns the next 32 bits from the file as a floating point number. + Returns the next 32 bits from the file as a floating-point number. </description> </method> <method name="get_len" qualifiers="const"> @@ -191,7 +192,7 @@ <return type="float"> </return> <description> - Returns the next bits from the file as a floating point number. + Returns the next bits from the file as a floating-point number. </description> </method> <method name="get_sha256" qualifiers="const"> @@ -209,8 +210,8 @@ <argument index="0" name="allow_objects" type="bool" default="false"> </argument> <description> - Returns the next [Variant] value from the file. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). + Returns the next [Variant] value from the file. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. + [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="is_open" qualifiers="const"> @@ -241,7 +242,7 @@ <argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0"> </argument> <description> - Opens a compressed file for reading or writing. Use [enum CompressionMode] constants to set [code]compression_mode[/code]. + Opens a compressed file for reading or writing. </description> </method> <method name="open_encrypted"> @@ -276,7 +277,7 @@ <argument index="0" name="position" type="int"> </argument> <description> - Change the file reading/writing cursor to the specified position (in bytes from the beginning of the file). + Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). </description> </method> <method name="seek_end"> @@ -285,7 +286,8 @@ <argument index="0" name="position" type="int" default="0"> </argument> <description> - Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). Note that this is an offset, so you should use negative numbers or the cursor will be at the end of the file. + Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). + [b]Note:[/b] This is an offset, so you should use negative numbers or the cursor will be at the end of the file. </description> </method> <method name="store_16"> @@ -341,7 +343,7 @@ <argument index="1" name="delim" type="String" default="",""> </argument> <description> - Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma Separated Values) format. You can pass a different delimiter to use other than the default "," (comma), it should be one character long. + Store the given [PoolStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. </description> </method> @@ -351,7 +353,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Stores a floating point number as 64 bits in the file. + Stores a floating-point number as 64 bits in the file. </description> </method> <method name="store_float"> @@ -360,7 +362,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Stores a floating point number as 32 bits in the file. + Stores a floating-point number as 32 bits in the file. </description> </method> <method name="store_line"> @@ -389,7 +391,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Stores a floating point number in the file. + Stores a floating-point number in the file. </description> </method> <method name="store_string"> @@ -410,14 +412,14 @@ <argument index="1" name="full_objects" type="bool" default="false"> </argument> <description> - Stores any Variant value in the file. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code). + Stores any Variant value in the file. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). </description> </method> </methods> <members> - <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap"> - If [code]true[/code], the file's endianness is swapped. Use this if you're dealing with files written in big endian machines. - Note that this is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file. + <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap" default="false"> + If [code]true[/code], the file's endianness is swapped. Use this if you're dealing with files written on big-endian machines. + [b]Note:[/b] This is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file. </member> </members> <constants> @@ -434,16 +436,16 @@ Opens the file for read and write operations. Create it if the file does not exist and truncate if it exists. </constant> <constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode"> - Uses the FastLZ compression method. + Uses the [url=http://fastlz.org/]FastLZ[/url] compression method. </constant> <constant name="COMPRESSION_DEFLATE" value="1" enum="CompressionMode"> - Uses the Deflate compression method. + Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method. </constant> <constant name="COMPRESSION_ZSTD" value="2" enum="CompressionMode"> - Uses the Zstd compression method. + Uses the [url=https://facebook.github.io/zstd/]Zstandard[/url] compression method. </constant> <constant name="COMPRESSION_GZIP" value="3" enum="CompressionMode"> - Uses the gzip compression method. + Uses the [url=https://www.gzip.org/]gzip[/url] compression method. </constant> </constants> </class> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index f8df356da2..e78f21b274 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -15,7 +15,7 @@ <argument index="0" name="filter" type="String"> </argument> <description> - Add a custom filter. Example: [code]add_filter("*.png ; PNG Images")[/code] + Adds [code]filter[/code] as a custom filter; [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/code]. For example, [code]"*.png ; PNG Images"[/code]. </description> </method> <method name="clear_filters"> @@ -55,28 +55,28 @@ </method> </methods> <members> - <member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access"> + <member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access" default="0"> The file system access scope. See enum [code]Access[/code] constants. </member> - <member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir"> + <member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir" default=""res://""> The current working directory of the file dialog. </member> - <member name="current_file" type="String" setter="set_current_file" getter="get_current_file"> + <member name="current_file" type="String" setter="set_current_file" getter="get_current_file" default=""""> The currently selected file of the file dialog. </member> - <member name="current_path" type="String" setter="set_current_path" getter="get_current_path"> + <member name="current_path" type="String" setter="set_current_path" getter="get_current_path" default=""res://""> The currently selected file path of the file dialog. </member> - <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters"> - Set file type filters. This example shows only .png and .gd files [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GD Script"]))[/code]. + <member name="filters" type="PoolStringArray" setter="set_filters" getter="get_filters" default="PoolStringArray( )"> + The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PoolStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode"> - Set dialog to open or save mode, changes selection behavior. See enum [code]Mode[/code] constants. + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="FileDialog.Mode" default="4"> + The dialog's open or save mode, which affects the selection behavior. See enum [code]Mode[/code] constants. </member> - <member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title"> + <member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true"> If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant MODE_OPEN_FILE] will change the window title to "Open a File"). </member> - <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files"> + <member name="show_hidden_files" type="bool" setter="set_show_hidden_files" getter="is_showing_hidden_files" default="false"> If [code]true[/code], the dialog will show hidden files. </member> </members> @@ -85,52 +85,52 @@ <argument index="0" name="dir" type="String"> </argument> <description> - Event emitted when the user selects a directory. + Emitted when the user selects a directory. </description> </signal> <signal name="file_selected"> <argument index="0" name="path" type="String"> </argument> <description> - Event emitted when the user selects a file (double clicks it or presses the OK button). + Emitted when the user selects a file by double-clicking it or pressing the [b]OK[/b] button. </description> </signal> <signal name="files_selected"> <argument index="0" name="paths" type="PoolStringArray"> </argument> <description> - Event emitted when the user selects multiple files. + Emitted when the user selects multiple files. </description> </signal> </signals> <constants> <constant name="MODE_OPEN_FILE" value="0" enum="Mode"> - The dialog allows the selection of one, and only one file. + The dialog allows selecting one, and only one file. </constant> <constant name="MODE_OPEN_FILES" value="1" enum="Mode"> - The dialog allows the selection of multiple files. + The dialog allows selecting multiple files. </constant> <constant name="MODE_OPEN_DIR" value="2" enum="Mode"> - The dialog functions as a folder selector, disallowing the selection of any file. + The dialog only allows selecting a directory, disallowing the selection of any file. </constant> <constant name="MODE_OPEN_ANY" value="3" enum="Mode"> - The dialog allows the selection of a file or a directory. + The dialog allows selecting one file or directory. </constant> <constant name="MODE_SAVE_FILE" value="4" enum="Mode"> The dialog will warn when a file exists. </constant> <constant name="ACCESS_RESOURCES" value="0" enum="Access"> - The dialog allows the selection of file and directory. + The dialog only allows accessing files under the [Resource] path ([code]res://[/code]). </constant> <constant name="ACCESS_USERDATA" value="1" enum="Access"> - The dialog allows access files under [Resource] path(res://) . + The dialog only allows accessing files under user data path ([code]user://[/code]). </constant> <constant name="ACCESS_FILESYSTEM" value="2" enum="Access"> - The dialog allows access files in whole file system. + The dialog allows accessing files on the whole file system. </constant> </constants> <theme_items> - <theme_item name="files_disabled" type="Color"> + <theme_item name="files_disabled" type="Color" default="Color( 0, 0, 0, 0.7 )"> </theme_item> <theme_item name="folder" type="Texture"> </theme_item> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index d65dad9fe1..6ec1545bc7 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -4,7 +4,7 @@ Internationalized font and text drawing support. </brief_description> <description> - Font contains a unicode compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. + Font contains a Unicode-compatible character set, as well as the ability to draw it with variable width, ascent, descent and kerning. For creating fonts from TTF files (or other font formats), see the editor support for fonts. </description> <tutorials> </tutorials> @@ -25,7 +25,7 @@ <argument index="5" name="outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> </argument> <description> - Draw "string" into a canvas item using the font at a given position, with "modulate" color, and optionally clipping the width. "position" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. + Draw [code]string[/code] into a canvas item using the font at a given position, with [code]modulate[/code] color, and optionally clipping the width. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. </description> </method> <method name="draw_char" qualifiers="const"> @@ -44,7 +44,7 @@ <argument index="5" name="outline" type="bool" default="false"> </argument> <description> - Draw character "char" into a canvas item using the font at a given position, with "modulate" color, and optionally kerning if "next" is passed. clipping the width. "position" specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. + Draw character [code]char[/code] into a canvas item using the font at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. clipping the width. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. The width used by the character is returned, making this function useful for drawing strings character by character. </description> </method> <method name="get_ascent" qualifiers="const"> diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 84cd446ea2..6f672bd01a 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -26,25 +26,25 @@ </method> </methods> <members> - <member name="bias" type="float" setter="set_bias" getter="get_bias"> + <member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5"> </member> - <member name="compress" type="bool" setter="set_compress" getter="is_compressed"> + <member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false"> </member> - <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data"> + <member name="data" type="GIProbeData" setter="set_probe_data" getter="get_probe_data" default="null"> </member> - <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range"> + <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="4"> </member> - <member name="energy" type="float" setter="set_energy" getter="get_energy"> + <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> </member> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 10, 10, 10 )"> </member> - <member name="interior" type="bool" setter="set_interior" getter="is_interior"> + <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false"> </member> - <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias"> + <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0"> </member> - <member name="propagation" type="float" setter="set_propagation" getter="get_propagation"> + <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.7"> </member> - <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv"> + <member name="subdiv" type="int" setter="set_subdiv" getter="get_subdiv" enum="GIProbe.Subdiv" default="1"> </member> </members> <constants> diff --git a/doc/classes/GIProbeData.xml b/doc/classes/GIProbeData.xml index 94b86dee74..84bd695f43 100644 --- a/doc/classes/GIProbeData.xml +++ b/doc/classes/GIProbeData.xml @@ -9,27 +9,27 @@ <methods> </methods> <members> - <member name="bias" type="float" setter="set_bias" getter="get_bias"> + <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.4"> </member> - <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds"> + <member name="bounds" type="AABB" setter="set_bounds" getter="get_bounds" default="AABB( 0, 0, 0, 1, 1, 1 )"> </member> - <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size"> + <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size" default="1.0"> </member> - <member name="compress" type="bool" setter="set_compress" getter="is_compressed"> + <member name="compress" type="bool" setter="set_compress" getter="is_compressed" default="false"> </member> - <member name="dynamic_data" type="PoolIntArray" setter="set_dynamic_data" getter="get_dynamic_data"> + <member name="dynamic_data" type="PoolIntArray" setter="set_dynamic_data" getter="get_dynamic_data" default="PoolIntArray( )"> </member> - <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range"> + <member name="dynamic_range" type="int" setter="set_dynamic_range" getter="get_dynamic_range" default="1"> </member> - <member name="energy" type="float" setter="set_energy" getter="get_energy"> + <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> </member> - <member name="interior" type="bool" setter="set_interior" getter="is_interior"> + <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false"> </member> - <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias"> + <member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.4"> </member> - <member name="propagation" type="float" setter="set_propagation" getter="get_propagation"> + <member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="1.0"> </member> - <member name="to_cell_xform" type="Transform" setter="set_to_cell_xform" getter="get_to_cell_xform"> + <member name="to_cell_xform" type="Transform" setter="set_to_cell_xform" getter="get_to_cell_xform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/Generic6DOFJoint.xml b/doc/classes/Generic6DOFJoint.xml index 52888e9587..91a1cb1cd4 100644 --- a/doc/classes/Generic6DOFJoint.xml +++ b/doc/classes/Generic6DOFJoint.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Generic6DOFJoint" inherits="Joint" category="Core" version="3.2"> <brief_description> - The generic 6 degrees of freedom joint can implement a variety of joint-types by locking certain axes' rotation or translation. + The generic 6-degrees-of-freedom joint can implement a variety of joint types by locking certain axes' rotation or translation. </brief_description> <description> The first 3 DOF axes are linear axes, which represent translation of Bodies, and the latter 3 DOF axes represent the angular motion. Each axis can be either locked, or limited. @@ -11,236 +11,236 @@ <methods> </methods> <members> - <member name="angular_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x"> - The amount of rotational damping across the x-axis. + <member name="angular_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="1.0"> + The amount of rotational damping across the X axis. The lower, the longer an impulse from one side takes to travel to the other side. </member> - <member name="angular_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code], rotation across the x-axis is limited. + <member name="angular_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="true"> + If [code]true[/code], rotation across the X axis is limited. </member> - <member name="angular_limit_x/erp" type="float" setter="set_param_x" getter="get_param_x"> - When rotating across x-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + <member name="angular_limit_x/erp" type="float" setter="set_param_x" getter="get_param_x" default="0.5"> + When rotating across the X axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. </member> - <member name="angular_limit_x/force_limit" type="float" setter="set_param_x" getter="get_param_x"> - The maximum amount of force that can occur, when rotating around x-axis. + <member name="angular_limit_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> + The maximum amount of force that can occur, when rotating around the X axis. </member> - <member name="angular_limit_x/lower_angle" type="float" setter="_set_angular_lo_limit_x" getter="_get_angular_lo_limit_x"> - The minimum rotation in negative direction to break loose and rotate around the x-axis. + <member name="angular_limit_x/lower_angle" type="float" setter="_set_angular_lo_limit_x" getter="_get_angular_lo_limit_x" default="0.0"> + The minimum rotation in negative direction to break loose and rotate around the X axis. </member> - <member name="angular_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x"> - The amount of rotational restitution across the x-axis. The lower, the more restitution occurs. + <member name="angular_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> + The amount of rotational restitution across the X axis. The lower, the more restitution occurs. </member> - <member name="angular_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x"> - The speed of all rotations across the x-axis. + <member name="angular_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" default="0.5"> + The speed of all rotations across the X axis. </member> - <member name="angular_limit_x/upper_angle" type="float" setter="_set_angular_hi_limit_x" getter="_get_angular_hi_limit_x"> - The minimum rotation in positive direction to break loose and rotate around the x-axis. + <member name="angular_limit_x/upper_angle" type="float" setter="_set_angular_hi_limit_x" getter="_get_angular_hi_limit_x" default="0.0"> + The minimum rotation in positive direction to break loose and rotate around the X axis. </member> - <member name="angular_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y"> - The amount of rotational damping across the y-axis. The lower, the more dampening occurs. + <member name="angular_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="1.0"> + The amount of rotational damping across the Y axis. The lower, the more dampening occurs. </member> - <member name="angular_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code], rotation across the y-axis is limited. + <member name="angular_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="true"> + If [code]true[/code], rotation across the Y axis is limited. </member> - <member name="angular_limit_y/erp" type="float" setter="set_param_y" getter="get_param_y"> - When rotating across y-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + <member name="angular_limit_y/erp" type="float" setter="set_param_y" getter="get_param_y" default="0.5"> + When rotating across the Y axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. </member> - <member name="angular_limit_y/force_limit" type="float" setter="set_param_y" getter="get_param_y"> - The maximum amount of force that can occur, when rotating around y-axis. + <member name="angular_limit_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> + The maximum amount of force that can occur, when rotating around the Y axis. </member> - <member name="angular_limit_y/lower_angle" type="float" setter="_set_angular_lo_limit_y" getter="_get_angular_lo_limit_y"> - The minimum rotation in negative direction to break loose and rotate around the y-axis. + <member name="angular_limit_y/lower_angle" type="float" setter="_set_angular_lo_limit_y" getter="_get_angular_lo_limit_y" default="0.0"> + The minimum rotation in negative direction to break loose and rotate around the Y axis. </member> - <member name="angular_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y"> - The amount of rotational restitution across the y-axis. The lower, the more restitution occurs. + <member name="angular_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> + The amount of rotational restitution across the Y axis. The lower, the more restitution occurs. </member> - <member name="angular_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y"> - The speed of all rotations across the y-axis. + <member name="angular_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" default="0.5"> + The speed of all rotations across the Y axis. </member> - <member name="angular_limit_y/upper_angle" type="float" setter="_set_angular_hi_limit_y" getter="_get_angular_hi_limit_y"> - The minimum rotation in positive direction to break loose and rotate around the y-axis. + <member name="angular_limit_y/upper_angle" type="float" setter="_set_angular_hi_limit_y" getter="_get_angular_hi_limit_y" default="0.0"> + The minimum rotation in positive direction to break loose and rotate around the Y axis. </member> - <member name="angular_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z"> - The amount of rotational damping across the z-axis. The lower, the more dampening occurs. + <member name="angular_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="1.0"> + The amount of rotational damping across the Z axis. The lower, the more dampening occurs. </member> - <member name="angular_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code], rotation across the z-axis is limited. + <member name="angular_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="true"> + If [code]true[/code], rotation across the Z axis is limited. </member> - <member name="angular_limit_z/erp" type="float" setter="set_param_z" getter="get_param_z"> - When rotating across z-axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. + <member name="angular_limit_z/erp" type="float" setter="set_param_z" getter="get_param_z" default="0.5"> + When rotating across the Z axis, this error tolerance factor defines how much the correction gets slowed down. The lower, the slower. </member> - <member name="angular_limit_z/force_limit" type="float" setter="set_param_z" getter="get_param_z"> - The maximum amount of force that can occur, when rotating around z-axis. + <member name="angular_limit_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> + The maximum amount of force that can occur, when rotating around the Z axis. </member> - <member name="angular_limit_z/lower_angle" type="float" setter="_set_angular_lo_limit_z" getter="_get_angular_lo_limit_z"> - The minimum rotation in negative direction to break loose and rotate around the z-axis. + <member name="angular_limit_z/lower_angle" type="float" setter="_set_angular_lo_limit_z" getter="_get_angular_lo_limit_z" default="0.0"> + The minimum rotation in negative direction to break loose and rotate around the Z axis. </member> - <member name="angular_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z"> - The amount of rotational restitution across the z-axis. The lower, the more restitution occurs. + <member name="angular_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> + The amount of rotational restitution across the Z axis. The lower, the more restitution occurs. </member> - <member name="angular_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z"> - The speed of all rotations across the z-axis. + <member name="angular_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" default="0.5"> + The speed of all rotations across the Z axis. </member> - <member name="angular_limit_z/upper_angle" type="float" setter="_set_angular_hi_limit_z" getter="_get_angular_hi_limit_z"> - The minimum rotation in positive direction to break loose and rotate around the z-axis. + <member name="angular_limit_z/upper_angle" type="float" setter="_set_angular_hi_limit_z" getter="_get_angular_hi_limit_z" default="0.0"> + The minimum rotation in positive direction to break loose and rotate around the Z axis. </member> - <member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code], a rotating motor at the x-axis is enabled. + <member name="angular_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false"> + If [code]true[/code], a rotating motor at the X axis is enabled. </member> - <member name="angular_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x"> - Maximum acceleration for the motor at the x-axis. + <member name="angular_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="300.0"> + Maximum acceleration for the motor at the X axis. </member> - <member name="angular_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x"> - Target speed for the motor at the x-axis. + <member name="angular_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> + Target speed for the motor at the X axis. </member> - <member name="angular_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code], a rotating motor at the y-axis is enabled. + <member name="angular_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false"> + If [code]true[/code], a rotating motor at the Y axis is enabled. </member> - <member name="angular_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y"> - Maximum acceleration for the motor at the y-axis. + <member name="angular_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="300.0"> + Maximum acceleration for the motor at the Y axis. </member> - <member name="angular_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y"> - Target speed for the motor at the y-axis. + <member name="angular_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> + Target speed for the motor at the Y axis. </member> - <member name="angular_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code], a rotating motor at the z-axis is enabled. + <member name="angular_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false"> + If [code]true[/code], a rotating motor at the Z axis is enabled. </member> - <member name="angular_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z"> - Maximum acceleration for the motor at the z-axis. + <member name="angular_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="300.0"> + Maximum acceleration for the motor at the Z axis. </member> - <member name="angular_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z"> - Target speed for the motor at the z-axis. + <member name="angular_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> + Target speed for the motor at the Z axis. </member> - <member name="angular_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x"> + <member name="angular_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> </member> - <member name="angular_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> + <member name="angular_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false"> </member> - <member name="angular_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x"> + <member name="angular_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> </member> - <member name="angular_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x"> + <member name="angular_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> </member> - <member name="angular_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y"> + <member name="angular_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> </member> - <member name="angular_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> + <member name="angular_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false"> </member> - <member name="angular_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y"> + <member name="angular_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> </member> - <member name="angular_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y"> + <member name="angular_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> </member> - <member name="angular_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z"> + <member name="angular_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> </member> - <member name="angular_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> + <member name="angular_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false"> </member> - <member name="angular_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z"> + <member name="angular_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> </member> - <member name="angular_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z"> + <member name="angular_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> </member> - <member name="linear_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x"> - The amount of damping that happens at the x-motion. + <member name="linear_limit_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="1.0"> + The amount of damping that happens at the X motion. </member> - <member name="linear_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code], the linear motion across the x-axis is limited. + <member name="linear_limit_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="true"> + If [code]true[/code], the linear motion across the X axis is limited. </member> - <member name="linear_limit_x/lower_distance" type="float" setter="set_param_x" getter="get_param_x"> - The minimum difference between the pivot points' x-axis. + <member name="linear_limit_x/lower_distance" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> + The minimum difference between the pivot points' X axis. </member> - <member name="linear_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x"> - The amount of restitution on the x-axis movement The lower, the more momentum gets lost. + <member name="linear_limit_x/restitution" type="float" setter="set_param_x" getter="get_param_x" default="0.5"> + The amount of restitution on the X axis movement. The lower, the more momentum gets lost. </member> - <member name="linear_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x"> - A factor applied to the movement across the x-axis The lower, the slower the movement. + <member name="linear_limit_x/softness" type="float" setter="set_param_x" getter="get_param_x" default="0.7"> + A factor applied to the movement across the X axis. The lower, the slower the movement. </member> - <member name="linear_limit_x/upper_distance" type="float" setter="set_param_x" getter="get_param_x"> - The maximum difference between the pivot points' x-axis. + <member name="linear_limit_x/upper_distance" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> + The maximum difference between the pivot points' X axis. </member> - <member name="linear_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y"> - The amount of damping that happens at the y-motion. + <member name="linear_limit_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="1.0"> + The amount of damping that happens at the Y motion. </member> - <member name="linear_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code], the linear motion across the y-axis is limited. + <member name="linear_limit_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="true"> + If [code]true[/code], the linear motion across the Y axis is limited. </member> - <member name="linear_limit_y/lower_distance" type="float" setter="set_param_y" getter="get_param_y"> - The minimum difference between the pivot points' y-axis. + <member name="linear_limit_y/lower_distance" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> + The minimum difference between the pivot points' Y axis. </member> - <member name="linear_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y"> - The amount of restitution on the y-axis movement The lower, the more momentum gets lost. + <member name="linear_limit_y/restitution" type="float" setter="set_param_y" getter="get_param_y" default="0.5"> + The amount of restitution on the Y axis movement. The lower, the more momentum gets lost. </member> - <member name="linear_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y"> - A factor applied to the movement across the y-axis The lower, the slower the movement. + <member name="linear_limit_y/softness" type="float" setter="set_param_y" getter="get_param_y" default="0.7"> + A factor applied to the movement across the Y axis. The lower, the slower the movement. </member> - <member name="linear_limit_y/upper_distance" type="float" setter="set_param_y" getter="get_param_y"> - The maximum difference between the pivot points' y-axis. + <member name="linear_limit_y/upper_distance" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> + The maximum difference between the pivot points' Y axis. </member> - <member name="linear_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z"> - The amount of damping that happens at the z-motion. + <member name="linear_limit_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="1.0"> + The amount of damping that happens at the Z motion. </member> - <member name="linear_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code], the linear motion across the z-axis is limited. + <member name="linear_limit_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="true"> + If [code]true[/code], the linear motion across the Z axis is limited. </member> - <member name="linear_limit_z/lower_distance" type="float" setter="set_param_z" getter="get_param_z"> - The minimum difference between the pivot points' z-axis. + <member name="linear_limit_z/lower_distance" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> + The minimum difference between the pivot points' Z axis. </member> - <member name="linear_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z"> - The amount of restitution on the z-axis movement The lower, the more momentum gets lost. + <member name="linear_limit_z/restitution" type="float" setter="set_param_z" getter="get_param_z" default="0.5"> + The amount of restitution on the Z axis movement. The lower, the more momentum gets lost. </member> - <member name="linear_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z"> - A factor applied to the movement across the z-axis The lower, the slower the movement. + <member name="linear_limit_z/softness" type="float" setter="set_param_z" getter="get_param_z" default="0.7"> + A factor applied to the movement across the Z axis. The lower, the slower the movement. </member> - <member name="linear_limit_z/upper_distance" type="float" setter="set_param_z" getter="get_param_z"> - The maximum difference between the pivot points' z-axis. + <member name="linear_limit_z/upper_distance" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> + The maximum difference between the pivot points' Z axis. </member> - <member name="linear_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> - If [code]true[/code], then there is a linear motor on the x-axis. It will attempt to reach the target velocity while staying within the force limits. + <member name="linear_motor_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false"> + If [code]true[/code], then there is a linear motor on the X axis. It will attempt to reach the target velocity while staying within the force limits. </member> - <member name="linear_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x"> - The maximum force the linear motor can apply on the x-axis while trying to reach the target velocity. + <member name="linear_motor_x/force_limit" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> + The maximum force the linear motor can apply on the X axis while trying to reach the target velocity. </member> - <member name="linear_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x"> - The speed that the linear motor will attempt to reach on the x-axis. + <member name="linear_motor_x/target_velocity" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> + The speed that the linear motor will attempt to reach on the X axis. </member> - <member name="linear_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> - If [code]true[/code], then there is a linear motor on the y-axis. It will attempt to reach the target velocity while staying within the force limits. + <member name="linear_motor_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false"> + If [code]true[/code], then there is a linear motor on the Y axis. It will attempt to reach the target velocity while staying within the force limits. </member> - <member name="linear_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y"> - The maximum force the linear motor can apply on the y-axis while trying to reach the target velocity. + <member name="linear_motor_y/force_limit" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> + The maximum force the linear motor can apply on the Y axis while trying to reach the target velocity. </member> - <member name="linear_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y"> - The speed that the linear motor will attempt to reach on the y-axis. + <member name="linear_motor_y/target_velocity" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> + The speed that the linear motor will attempt to reach on the Y axis. </member> - <member name="linear_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> - If [code]true[/code], then there is a linear motor on the z-axis. It will attempt to reach the target velocity while staying within the force limits. + <member name="linear_motor_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false"> + If [code]true[/code], then there is a linear motor on the Z axis. It will attempt to reach the target velocity while staying within the force limits. </member> - <member name="linear_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z"> - The maximum force the linear motor can apply on the z-axis while trying to reach the target velocity. + <member name="linear_motor_z/force_limit" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> + The maximum force the linear motor can apply on the Z axis while trying to reach the target velocity. </member> - <member name="linear_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z"> - The speed that the linear motor will attempt to reach on the z-axis. + <member name="linear_motor_z/target_velocity" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> + The speed that the linear motor will attempt to reach on the Z axis. </member> - <member name="linear_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x"> + <member name="linear_spring_x/damping" type="float" setter="set_param_x" getter="get_param_x" default="0.01"> </member> - <member name="linear_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x"> + <member name="linear_spring_x/enabled" type="bool" setter="set_flag_x" getter="get_flag_x" default="false"> </member> - <member name="linear_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x"> + <member name="linear_spring_x/equilibrium_point" type="float" setter="set_param_x" getter="get_param_x" default="0.0"> </member> - <member name="linear_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x"> + <member name="linear_spring_x/stiffness" type="float" setter="set_param_x" getter="get_param_x" default="0.01"> </member> - <member name="linear_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y"> + <member name="linear_spring_y/damping" type="float" setter="set_param_y" getter="get_param_y" default="0.01"> </member> - <member name="linear_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y"> + <member name="linear_spring_y/enabled" type="bool" setter="set_flag_y" getter="get_flag_y" default="false"> </member> - <member name="linear_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y"> + <member name="linear_spring_y/equilibrium_point" type="float" setter="set_param_y" getter="get_param_y" default="0.0"> </member> - <member name="linear_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y"> + <member name="linear_spring_y/stiffness" type="float" setter="set_param_y" getter="get_param_y" default="0.01"> </member> - <member name="linear_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z"> + <member name="linear_spring_z/damping" type="float" setter="set_param_z" getter="get_param_z" default="0.01"> </member> - <member name="linear_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z"> + <member name="linear_spring_z/enabled" type="bool" setter="set_flag_z" getter="get_flag_z" default="false"> </member> - <member name="linear_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z"> + <member name="linear_spring_z/equilibrium_point" type="float" setter="set_param_z" getter="get_param_z" default="0.0"> </member> - <member name="linear_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z"> + <member name="linear_spring_z/stiffness" type="float" setter="set_param_z" getter="get_param_z" default="0.01"> </member> - <member name="precision" type="int" setter="set_precision" getter="get_precision"> + <member name="precision" type="int" setter="set_precision" getter="get_precision" default="1"> </member> </members> <constants> @@ -251,10 +251,10 @@ The maximum difference between the pivot points' axes. </constant> <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2" enum="Param"> - A factor applied to the movement across the axes The lower, the slower the movement. + A factor applied to the movement across the axes. The lower, the slower the movement. </constant> <constant name="PARAM_LINEAR_RESTITUTION" value="3" enum="Param"> - The amount of restitution on the axes movement The lower, the more momentum gets lost. + The amount of restitution on the axes' movement. The lower, the more momentum gets lost. </constant> <constant name="PARAM_LINEAR_DAMPING" value="4" enum="Param"> The amount of damping that happens at the linear motion across the axes. @@ -296,19 +296,20 @@ Represents the size of the [enum Param] enum. </constant> <constant name="FLAG_ENABLE_LINEAR_LIMIT" value="0" enum="Flag"> - If [code]set[/code] there is linear motion possible within the given limits. + If enabled, linear motion is possible within the given limits. </constant> <constant name="FLAG_ENABLE_ANGULAR_LIMIT" value="1" enum="Flag"> - If [code]set[/code] there is rotational motion possible. + If enabled, rotational motion is possible within the given limits. </constant> <constant name="FLAG_ENABLE_LINEAR_SPRING" value="3" enum="Flag"> </constant> <constant name="FLAG_ENABLE_ANGULAR_SPRING" value="2" enum="Flag"> </constant> <constant name="FLAG_ENABLE_MOTOR" value="4" enum="Flag"> - If [code]set[/code] there is a rotational motor across these axes. + If enabled, there is a rotational motor across these axes. </constant> <constant name="FLAG_ENABLE_LINEAR_MOTOR" value="5" enum="Flag"> + If enabled, there is a linear motor across these axes. </constant> <constant name="FLAG_MAX" value="6" enum="Flag"> Represents the size of the [enum Flag] enum. diff --git a/doc/classes/Geometry.xml b/doc/classes/Geometry.xml index 002b224d6f..3cbbe6da56 100644 --- a/doc/classes/Geometry.xml +++ b/doc/classes/Geometry.xml @@ -68,7 +68,7 @@ </argument> <description> Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code]. - If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise]. + If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distiguished by calling [method is_polygon_clockwise]. </description> </method> <method name="clip_polyline_with_polygon_2d"> @@ -88,7 +88,7 @@ <argument index="0" name="points" type="PoolVector2Array"> </argument> <description> - Given an array of [Vector2]s, returns the convex hull as a list of points in counter-clockwise order. The last point is the same as the first one. + Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. </description> </method> <method name="exclude_polygons_2d"> @@ -99,8 +99,8 @@ <argument index="1" name="polygon_b" type="PoolVector2Array"> </argument> <description> - Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. - The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. + Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons_2d]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. + The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distiguished by calling [method is_polygon_clockwise]. </description> </method> <method name="get_closest_point_to_segment"> @@ -248,7 +248,8 @@ <argument index="3" name="dir_b" type="Vector2"> </argument> <description> - Checks if the two lines ([code]from_a[/code], [code]dir_a[/code]) and ([code]from_b[/code], [code]dir_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant]. Note that the lines are specified using direction vectors, not end points. + Checks if the two lines ([code]from_a[/code], [code]dir_a[/code]) and ([code]from_b[/code], [code]dir_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant]. + [b]Note:[/b] The lines are specified using direction vectors, not end points. </description> </method> <method name="make_atlas"> @@ -435,8 +436,8 @@ <argument index="1" name="transform" type="Transform2D"> </argument> <description> - Transforms an array of points by [code]transform[/code] and returns the result. - Can be useful in conjuction with performing polygon boolean operations in CSG manner, see [method merge_polygons_2d], [method clip_polygons_2d], [method intersect_polygons_2d], [method exclude_polygons_2d]. + Transforms an array of points by [code]transform[/code] and returns the result. + Can be useful in conjunction with performing polygon boolean operations in a CSG-like manner, see [method merge_polygons_2d], [method clip_polygons_2d], [method intersect_polygons_2d], [method exclude_polygons_2d]. </description> </method> <method name="triangulate_delaunay_2d"> @@ -478,7 +479,7 @@ While flattened paths can never perfectly trace an arc, they are approximated by a series of arc chords. </constant> <constant name="JOIN_MITER" value="2" enum="PolyJoinType"> - There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow 'spikes'. For any given edge join, when miter offsetting would exceed that maximum distance, 'square' joining is applied. + There's a necessary limit to mitered joins since offsetting edges that join at very acute angles will produce excessively long and narrow "spikes". For any given edge join, when miter offsetting would exceed that maximum distance, "square" joining is applied. </constant> <constant name="END_POLYGON" value="0" enum="PolyEndType"> Endpoints are joined using the [enum PolyJoinType] value and the path filled as a polygon. diff --git a/doc/classes/GeometryInstance.xml b/doc/classes/GeometryInstance.xml index 22135a048e..eb1847a055 100644 --- a/doc/classes/GeometryInstance.xml +++ b/doc/classes/GeometryInstance.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GeometryInstance" inherits="VisualInstance" category="Core" version="3.2"> <brief_description> - Base node for geometry based visual instances. + Base node for geometry-based visual instances. </brief_description> <description> - Base node for geometry based visual instances. Shares some common functionality like visibility and custom materials. + Base node for geometry-based visual instances. Shares some common functionality like visibility and custom materials. </description> <tutorials> </tutorials> @@ -20,29 +20,29 @@ </method> </methods> <members> - <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance.ShadowCastingSetting"> + <member name="cast_shadow" type="int" setter="set_cast_shadows_setting" getter="get_cast_shadows_setting" enum="GeometryInstance.ShadowCastingSetting" default="1"> The selected shadow casting flag. See [enum ShadowCastingSetting] for possible values. </member> - <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin"> + <member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0"> The extra distance added to the GeometryInstance's bounding box ([AABB]) to increase its cull box. </member> - <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance"> + <member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0"> The GeometryInstance's max LOD distance. </member> - <member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis"> + <member name="lod_max_hysteresis" type="float" setter="set_lod_max_hysteresis" getter="get_lod_max_hysteresis" default="0.0"> The GeometryInstance's max LOD margin. </member> - <member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance"> + <member name="lod_min_distance" type="float" setter="set_lod_min_distance" getter="get_lod_min_distance" default="0.0"> The GeometryInstance's min LOD distance. </member> - <member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis"> + <member name="lod_min_hysteresis" type="float" setter="set_lod_min_hysteresis" getter="get_lod_min_hysteresis" default="0.0"> The GeometryInstance's min LOD margin. </member> - <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override"> + <member name="material_override" type="Material" setter="set_material_override" getter="get_material_override" default="null"> The material override for the whole geometry. If there is a material in [code]material_override[/code], it will be used instead of any material set in any material slot of the mesh. </member> - <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag"> + <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], this GeometryInstance will be used when baking lights using a [GIProbe] and/or any other form of baked lighting. </member> </members> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index d80fed204e..247a7afe85 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Gradient" inherits="Resource" category="Core" version="3.2"> <brief_description> - Color interpolator node. + A color interpolator resource which can be used to generate colors between user-defined color points. </brief_description> <description> - Given a set of colors, this node will interpolate them in order, meaning, that if you have color 1, color 2 and color 3, the ramp will interpolate (generate the colors between two colors) from color 1 to color 2 and from color 2 to color 3. Initially the ramp will have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. + Given a set of colors, this resource will interpolate them in order. This means that if you have color 1, color 2 and color 3, the ramp will interpolate from color 1 to color 2 and from color 2 to color 3. The ramp will initially have 2 colors (black and white), one (black) at ramp lower offset 0 and the other (white) at the ramp higher offset 1. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Adds the specified color to the end of the ramp, with the specified offset + Adds the specified color to the end of the ramp, with the specified offset. </description> </method> <method name="get_color" qualifiers="const"> @@ -26,7 +26,7 @@ <argument index="0" name="point" type="int"> </argument> <description> - Returns the color of the ramp color at index [i]point[/i] + Returns the color of the ramp color at index [code]point[/code]. </description> </method> <method name="get_offset" qualifiers="const"> @@ -35,14 +35,14 @@ <argument index="0" name="point" type="int"> </argument> <description> - Returns the offset of the ramp color at index [i]point[/i] + Returns the offset of the ramp color at index [code]point[/code]. </description> </method> <method name="get_point_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the number of colors in the ramp + Returns the number of colors in the ramp. </description> </method> <method name="interpolate"> @@ -51,7 +51,7 @@ <argument index="0" name="offset" type="float"> </argument> <description> - Returns the interpolated color specified by [i]offset[/i] + Returns the interpolated color specified by [code]offset[/code]. </description> </method> <method name="remove_point"> @@ -60,7 +60,7 @@ <argument index="0" name="offset" type="int"> </argument> <description> - Removes the color at the index [i]offset[/i] + Removes the color at the index [code]offset[/code]. </description> </method> <method name="set_color"> @@ -71,7 +71,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Sets the color of the ramp color at index [i]point[/i] + Sets the color of the ramp color at index [code]point[/code]. </description> </method> <method name="set_offset"> @@ -82,15 +82,15 @@ <argument index="1" name="offset" type="float"> </argument> <description> - Sets the offset for the ramp color at index [i]point[/i] + Sets the offset for the ramp color at index [code]point[/code]. </description> </method> </methods> <members> - <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors"> + <member name="colors" type="PoolColorArray" setter="set_colors" getter="get_colors" default="PoolColorArray( 0, 0, 0, 1, 1, 1, 1, 1 )"> Gradient's colors returned as a [PoolColorArray]. </member> - <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets"> + <member name="offsets" type="PoolRealArray" setter="set_offsets" getter="get_offsets" default="PoolRealArray( 0, 1 )"> Gradient's offsets returned as a [PoolRealArray]. </member> </members> diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml index fc952346ad..ef46491e02 100644 --- a/doc/classes/GradientTexture.xml +++ b/doc/classes/GradientTexture.xml @@ -1,20 +1,20 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="GradientTexture" inherits="Texture" category="Core" version="3.2"> <brief_description> - Gradient filled texture. + Gradient-filled texture. </brief_description> <description> - Uses a [Gradient] to fill the texture data, the gradient will be filled from left to right using colors obtained from the gradient, this means that the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]). + GradientTexture uses a [Gradient] to fill the texture data. The gradient will be filled from left to right using colors obtained from the gradient. This means the texture does not necessarily represent an exact copy of the gradient, but instead an interpolation of samples obtained from the gradient at fixed steps (see [member width]). </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> + <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" default="null"> The [Gradient] that will be used to fill the texture. </member> - <member name="width" type="int" setter="set_width" getter="get_width"> + <member name="width" type="int" setter="set_width" getter="get_width" default="2048"> The number of color samples that will be obtained from the [Gradient]. </member> </members> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 034a64a3fa..111bf2109e 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -4,8 +4,8 @@ GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them. </brief_description> <description> - GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. - It is greatly advised to enable low processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits. + GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNode slots is disabled by default. + It is greatly advised to enable low-processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits. </description> <tutorials> </tutorials> @@ -43,7 +43,7 @@ <return type="void"> </return> <description> - Remove all connections between nodes. + Removes all connections between nodes. </description> </method> <method name="connect_node"> @@ -58,7 +58,7 @@ <argument index="3" name="to_port" type="int"> </argument> <description> - Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created. + Create a connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection already exists, no connection is created. </description> </method> <method name="disconnect_node"> @@ -73,14 +73,14 @@ <argument index="3" name="to_port" type="int"> </argument> <description> - Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists. + Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed. </description> </method> <method name="get_connection_list" qualifiers="const"> <return type="Array"> </return> <description> - Returns an Array containing the list of connections. A connection consists in a structure of the form {from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" } + Returns an Array containing the list of connections. A connection consists in a structure of the form [code]{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }[/code]. </description> </method> <method name="get_zoom_hbox"> @@ -101,7 +101,7 @@ <argument index="3" name="to_port" type="int"> </argument> <description> - Returns [code]true[/code] if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode. + Returns [code]true[/code] if the [code]from_port[/code] slot of the [code]from[/code] GraphNode is connected to the [code]to_port[/code] slot of the [code]to[/code] GraphNode. </description> </method> <method name="is_valid_connection_type" qualifiers="const"> @@ -171,19 +171,19 @@ </method> </methods> <members> - <member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled"> + <member name="right_disconnects" type="bool" setter="set_right_disconnects" getter="is_right_disconnects_enabled" default="false"> If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end. </member> - <member name="scroll_offset" type="Vector2" setter="set_scroll_ofs" getter="get_scroll_ofs"> + <member name="scroll_offset" type="Vector2" setter="set_scroll_ofs" getter="get_scroll_ofs" default="Vector2( 0, 0 )"> The scroll offset. </member> - <member name="snap_distance" type="int" setter="set_snap" getter="get_snap"> + <member name="snap_distance" type="int" setter="set_snap" getter="get_snap" default="20"> The snapping distance in pixels. </member> - <member name="use_snap" type="bool" setter="set_use_snap" getter="is_using_snap"> + <member name="use_snap" type="bool" setter="set_use_snap" getter="is_using_snap" default="true"> If [code]true[/code], enables snapping. </member> - <member name="zoom" type="float" setter="set_zoom" getter="get_zoom"> + <member name="zoom" type="float" setter="set_zoom" getter="get_zoom" default="1.0"> The current zoom value. </member> </members> @@ -198,28 +198,28 @@ Signal sent at the end of a GraphNode movement. </description> </signal> - <signal name="connection_request"> - <argument index="0" name="from" type="String"> - </argument> - <argument index="1" name="from_slot" type="int"> + <signal name="connection_from_empty"> + <argument index="0" name="to" type="String"> </argument> - <argument index="2" name="to" type="String"> + <argument index="1" name="to_slot" type="int"> </argument> - <argument index="3" name="to_slot" type="int"> + <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created. + Signal sent when user dragging connection from input port into empty space of the graph. </description> </signal> - <signal name="connection_from_empty"> - <argument index="0" name="to" type="String"> + <signal name="connection_request"> + <argument index="0" name="from" type="String"> </argument> - <argument index="1" name="to_slot" type="int"> + <argument index="1" name="from_slot" type="int"> </argument> - <argument index="2" name="release_position" type="Vector2"> + <argument index="2" name="to" type="String"> + </argument> + <argument index="3" name="to_slot" type="int"> </argument> <description> - Signal sent when user dragging connection from input port into empty space of the graph. + Signal sent to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. </description> </signal> <signal name="connection_to_empty"> @@ -248,12 +248,12 @@ <argument index="3" name="to_slot" type="int"> </argument> <description> - Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed. + Emitted to the GraphEdit when the connection between [code]from_slot[/code] slot of [code]from[/code] GraphNode and [code]to_slot[/code] slot of [code]to[/code] GraphNode is attempted to be removed. </description> </signal> <signal name="duplicate_nodes_request"> <description> - Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit. + Emitted when a GraphNode is attempted to be duplicated in the GraphEdit. </description> </signal> <signal name="node_selected"> @@ -267,7 +267,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent. + Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [code]position[/code] is the position of the mouse pointer when the signal is sent. </description> </signal> <signal name="scroll_offset_changed"> @@ -280,25 +280,25 @@ <constants> </constants> <theme_items> - <theme_item name="activity" type="Color"> + <theme_item name="activity" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="bezier_len_neg" type="int"> + <theme_item name="bezier_len_neg" type="int" default="160"> </theme_item> - <theme_item name="bezier_len_pos" type="int"> + <theme_item name="bezier_len_pos" type="int" default="80"> </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> - <theme_item name="grid_major" type="Color"> + <theme_item name="grid_major" type="Color" default="Color( 1, 1, 1, 0.2 )"> </theme_item> - <theme_item name="grid_minor" type="Color"> + <theme_item name="grid_minor" type="Color" default="Color( 1, 1, 1, 0.05 )"> </theme_item> <theme_item name="minus" type="Texture"> </theme_item> <theme_item name="more" type="Texture"> </theme_item> - <theme_item name="port_grab_distance_horizontal" type="int"> + <theme_item name="port_grab_distance_horizontal" type="int" default="48"> </theme_item> - <theme_item name="port_grab_distance_vertical" type="int"> + <theme_item name="port_grab_distance_vertical" type="int" default="6"> </theme_item> <theme_item name="reset" type="Texture"> </theme_item> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index a19676798b..6bc09e5289 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -4,7 +4,7 @@ A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types. </brief_description> <description> - A GraphNode is a container defined by a title. It can have 1 or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. + A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <return type="void"> </return> <description> - Disable all input and output slots of the GraphNode. + Disables all input and output slots of the GraphNode. </description> </method> <method name="clear_slot"> @@ -22,7 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Disable input and output slot whose index is 'idx'. + Disables input and output slot whose index is [code]idx[/code]. </description> </method> <method name="get_connection_input_color"> @@ -31,7 +31,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color of the input connection 'idx'. + Returns the color of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_input_count"> @@ -47,7 +47,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the input connection 'idx'. + Returns the position of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_input_type"> @@ -56,7 +56,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the type of the input connection 'idx'. + Returns the type of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_output_color"> @@ -65,7 +65,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color of the output connection 'idx'. + Returns the color of the output connection [code]idx[/code]. </description> </method> <method name="get_connection_output_count"> @@ -81,7 +81,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the position of the output connection 'idx'. + Returns the position of the output connection [code]idx[/code]. </description> </method> <method name="get_connection_output_type"> @@ -90,7 +90,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the type of the output connection 'idx'. + Returns the type of the output connection [code]idx[/code]. </description> </method> <method name="get_slot_color_left" qualifiers="const"> @@ -99,7 +99,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color set to 'idx' left (input) slot. + Returns the color set to [code]idx[/code] left (input) slot. </description> </method> <method name="get_slot_color_right" qualifiers="const"> @@ -108,7 +108,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the color set to 'idx' right (output) slot. + Returns the color set to [code]idx[/code] right (output) slot. </description> </method> <method name="get_slot_type_left" qualifiers="const"> @@ -117,7 +117,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the (integer) type of left (input) 'idx' slot. + Returns the (integer) type of left (input) [code]idx[/code] slot. </description> </method> <method name="get_slot_type_right" qualifiers="const"> @@ -126,7 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the (integer) type of right (output) 'idx' slot. + Returns the (integer) type of right (output) [code]idx[/code] slot. </description> </method> <method name="is_slot_enabled_left" qualifiers="const"> @@ -135,7 +135,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns [code]true[/code] if left (input) slot 'idx' is enabled, [code]false[/code] otherwise. + Returns [code]true[/code] if left (input) slot [code]idx[/code] is enabled, [code]false[/code] otherwise. </description> </method> <method name="is_slot_enabled_right" qualifiers="const"> @@ -144,7 +144,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns [code]true[/code] if right (output) slot 'idx' is enabled, [code]false[/code] otherwise. + Returns [code]true[/code] if right (output) slot [code]idx[/code] is enabled, [code]false[/code] otherwise. </description> </method> <method name="set_slot"> @@ -173,20 +173,21 @@ </method> </methods> <members> - <member name="comment" type="bool" setter="set_comment" getter="is_comment"> + <member name="comment" type="bool" setter="set_comment" getter="is_comment" default="false"> </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> - The offset of the GraphNode, relative to the scroll offset of the [GraphEdit]. Note that you cannot use position directly, as [GraphEdit] is a [Container]. + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + The offset of the GraphNode, relative to the scroll offset of the [GraphEdit]. + [b]Note:[/b] You cannot use position directly, as [GraphEdit] is a [Container]. </member> - <member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay"> + <member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0"> </member> - <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable"> + <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false"> </member> - <member name="selected" type="bool" setter="set_selected" getter="is_selected"> + <member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false"> </member> - <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible"> + <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" default="false"> </member> - <member name="title" type="String" setter="set_title" getter="get_title"> + <member name="title" type="String" setter="set_title" getter="get_title" default=""""> </member> </members> <signals> @@ -234,9 +235,9 @@ </theme_item> <theme_item name="close" type="Texture"> </theme_item> - <theme_item name="close_color" type="Color"> + <theme_item name="close_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="close_offset" type="int"> + <theme_item name="close_offset" type="int" default="18"> </theme_item> <theme_item name="comment" type="StyleBox"> </theme_item> @@ -250,7 +251,7 @@ </theme_item> <theme_item name="port" type="Texture"> </theme_item> - <theme_item name="port_offset" type="int"> + <theme_item name="port_offset" type="int" default="3"> </theme_item> <theme_item name="position" type="StyleBox"> </theme_item> @@ -258,13 +259,13 @@ </theme_item> <theme_item name="selectedframe" type="StyleBox"> </theme_item> - <theme_item name="separation" type="int"> + <theme_item name="separation" type="int" default="1"> </theme_item> - <theme_item name="title_color" type="Color"> + <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> <theme_item name="title_font" type="Font"> </theme_item> - <theme_item name="title_offset" type="int"> + <theme_item name="title_offset" type="int" default="20"> </theme_item> </theme_items> </class> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index 94d805e3f6..08832c08b4 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -4,23 +4,23 @@ Grid container used to arrange elements in a grid like layout. </brief_description> <description> - Grid container will arrange its children in a grid like structure, the grid columns are specified using the [member columns] property and the number of rows will be equal to the number of children in the container divided by the number of columns, for example: if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. + Grid container will arrange its children in a grid like structure, the grid columns are specified using the [member columns] property and the number of rows will be equal to the number of children in the container divided by the number of columns. For example, if the container has 5 children, and 2 columns, there will be 3 rows in the container. Notice that grid layout will preserve the columns and rows for every size of the container. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="columns" type="int" setter="set_columns" getter="get_columns"> + <member name="columns" type="int" setter="set_columns" getter="get_columns" default="1"> The number of columns in the [GridContainer]. If modified, [GridContainer] reorders its children to accommodate the new layout. </member> </members> <constants> </constants> <theme_items> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> </theme_item> - <theme_item name="vseparation" type="int"> + <theme_item name="vseparation" type="int" default="4"> </theme_item> </theme_items> </class> diff --git a/doc/classes/GrooveJoint2D.xml b/doc/classes/GrooveJoint2D.xml index dd758d0bd3..6b87fa5cfe 100644 --- a/doc/classes/GrooveJoint2D.xml +++ b/doc/classes/GrooveJoint2D.xml @@ -11,11 +11,11 @@ <methods> </methods> <members> - <member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset"> - The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's y axis (along the groove). Default value: [code]25[/code] + <member name="initial_offset" type="float" setter="set_initial_offset" getter="get_initial_offset" default="25.0"> + The body B's initial anchor position defined by the joint's origin and a local offset [member initial_offset] along the joint's Y axis (along the groove). </member> - <member name="length" type="float" setter="set_length" getter="get_length"> - The groove's length. The groove is from the joint's origin towards [member length] along the joint's local y axis. Default value: [code]50[/code] + <member name="length" type="float" setter="set_length" getter="get_length" default="50.0"> + The groove's length. The groove is from the joint's origin towards [member length] along the joint's local Y axis. </member> </members> <constants> diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml index fce030a260..e2abbe16cc 100644 --- a/doc/classes/HBoxContainer.xml +++ b/doc/classes/HBoxContainer.xml @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int"> + <theme_item name="separation" type="int" default="4"> </theme_item> </theme_items> </class> diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml index c2c22d3bcd..c34364c573 100644 --- a/doc/classes/HSeparator.xml +++ b/doc/classes/HSeparator.xml @@ -4,7 +4,7 @@ Horizontal separator. </brief_description> <description> - Horizontal separator. See [Separator]. It is used to separate objects vertically, though (but it looks horizontal!). + Horizontal separator. See [Separator]. Even though it looks horizontal, it is used to separate objects vertically. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int"> + <theme_item name="separation" type="int" default="4"> </theme_item> <theme_item name="separator" type="StyleBox"> </theme_item> diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index accc09d190..3a425705c6 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -13,13 +13,13 @@ <constants> </constants> <theme_items> - <theme_item name="autohide" type="int"> + <theme_item name="autohide" type="int" default="1"> </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> - <theme_item name="separation" type="int"> + <theme_item name="separation" type="int" default="12"> </theme_item> </theme_items> </class> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 325e6ca48e..c91ddccaa4 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -4,8 +4,8 @@ Hyper-text transfer protocol client. </brief_description> <description> - Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. - Note that this client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started. + Hyper-text transfer protocol client (sometimes called "User Agent"). Used to make HTTP requests to download web content, upload files and other data or to communicate with various services, among other use cases. See [HTTPRequest] for an higher-level alternative. + [b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started. A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). </description> @@ -33,7 +33,7 @@ <argument index="3" name="verify_host" type="bool" default="true"> </argument> <description> - Connect to a host. This needs to be done before any requests are sent. + Connects to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. If no [code]port[/code] is specified (or [code]-1[/code] is used), it is automatically set to 80 for HTTP and 443 for HTTPS (if [code]use_ssl[/code] is enabled). [code]verify_host[/code] will check the SSL identity of the host if set to [code]true[/code]. @@ -64,16 +64,21 @@ <return type="Dictionary"> </return> <description> - Returns all response headers as dictionary where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. - Structure: ("key":"value1; value2") - Example: (content-length:12), (Content-Type:application/json; charset=UTF-8) + Returns all response headers as a Dictionary of structure [code]{ "key": "value1; value2" }[/code] where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. + [b]Example:[/b] + [codeblock] + { + "content-length": 12, + "Content-Type": "application/json; charset=UTF-8", + } + [/codeblock] </description> </method> <method name="get_status" qualifiers="const"> <return type="int" enum="HTTPClient.Status"> </return> <description> - Returns a STATUS_* enum constant. Need to call [method poll] in order to get status updates. + Returns a [code]STATUS_*[/code] enum constant. Need to call [method poll] in order to get status updates. </description> </method> <method name="has_response" qualifiers="const"> @@ -107,13 +112,13 @@ [codeblock] var fields = {"username": "user", "password": "pass"} String query_string = http_client.query_string_from_dict(fields) - # returns: "username=user&password=pass" + # Returns "username=user&password=pass" [/codeblock] - Furthermore, if a key has a null value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. + Furthermore, if a key has a [code]null[/code] value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. [codeblock] var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]} String query_string = http_client.query_string_from_dict(fields) - # returns: "single=123&not_valued&multiple=22&multiple=33&multiple=44" + # Returns "single=123&not_valued&multiple=22&multiple=33&multiple=44" [/codeblock] </description> </method> @@ -175,7 +180,7 @@ </method> </methods> <members> - <member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled"> + <member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false"> If [code]true[/code], execution will block until all data is read from the response. </member> <member name="connection" type="StreamPeer" setter="set_connection" getter="get_connection"> @@ -298,10 +303,10 @@ HTTP status code [code]304 Not Modified[/code]. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to [code]false[/code]. </constant> <constant name="RESPONSE_USE_PROXY" value="305" enum="ResponseCode"> - HTTP status code [code]305 Use Proxy[/code]. Deprecated. Do not use. + HTTP status code [code]305 Use Proxy[/code]. [i]Deprecated. Do not use.[/i] </constant> <constant name="RESPONSE_SWITCH_PROXY" value="306" enum="ResponseCode"> - HTTP status code [code]306 Switch Proxy[/code]. Deprecated. Do not use. + HTTP status code [code]306 Switch Proxy[/code]. [i]Deprecated. Do not use.[/i] </constant> <constant name="RESPONSE_TEMPORARY_REDIRECT" value="307" enum="ResponseCode"> HTTP status code [code]307 Temporary Redirect[/code]. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 58833bd84b..306f17ea44 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -59,16 +59,16 @@ </method> </methods> <members> - <member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit"> + <member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1"> Maximum allowed size for response bodies. </member> - <member name="download_file" type="String" setter="set_download_file" getter="get_download_file"> + <member name="download_file" type="String" setter="set_download_file" getter="get_download_file" default=""""> The file to download into. Will output any received file into it. </member> - <member name="max_redirects" type="int" setter="set_max_redirects" getter="get_max_redirects"> + <member name="max_redirects" type="int" setter="set_max_redirects" getter="get_max_redirects" default="8"> Maximum number of allowed redirects. </member> - <member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads"> + <member name="use_threads" type="bool" setter="set_use_threads" getter="is_using_threads" default="false"> If [code]true[/code], multithreading is used to improve performance. </member> </members> @@ -83,7 +83,7 @@ <argument index="3" name="body" type="PoolByteArray"> </argument> <description> - This signal is emitted upon request completion. + Emitted when a request is completed. </description> </signal> </signals> diff --git a/doc/classes/HeightMapShape.xml b/doc/classes/HeightMapShape.xml index 22896535b9..cb7da8af26 100644 --- a/doc/classes/HeightMapShape.xml +++ b/doc/classes/HeightMapShape.xml @@ -11,13 +11,13 @@ <methods> </methods> <members> - <member name="map_data" type="PoolRealArray" setter="set_map_data" getter="get_map_data"> + <member name="map_data" type="PoolRealArray" setter="set_map_data" getter="get_map_data" default="PoolRealArray( 0, 0, 0, 0 )"> Height map data, pool array must be of [member map_width] * [member map_depth] size. </member> - <member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth"> + <member name="map_depth" type="int" setter="set_map_depth" getter="get_map_depth" default="2"> Depth of the height map data. Changing this will resize the [member map_data]. </member> - <member name="map_width" type="int" setter="set_map_width" getter="get_map_width"> + <member name="map_width" type="int" setter="set_map_width" getter="get_map_width" default="2"> Width of the height map data. Changing this will resize the [member map_data]. </member> </members> diff --git a/doc/classes/HingeJoint.xml b/doc/classes/HingeJoint.xml index 2fde885ee8..0ac67be96c 100644 --- a/doc/classes/HingeJoint.xml +++ b/doc/classes/HingeJoint.xml @@ -4,40 +4,40 @@ A hinge between two 3D bodies. </brief_description> <description> - Normally uses the z-axis of body A as the hinge axis, another axis can be specified when adding it manually though. + A HingeJoint normally uses the Z axis of body A as the hinge axis, another axis can be specified when adding it manually though. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="angular_limit/bias" type="float" setter="set_param" getter="get_param"> + <member name="angular_limit/bias" type="float" setter="set_param" getter="get_param" default="0.3"> The speed with which the rotation across the axis perpendicular to the hinge gets corrected. </member> - <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag"> + <member name="angular_limit/enable" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the hinges maximum and minimum rotation, defined by [member angular_limit/lower] and [member angular_limit/upper] has effects. </member> - <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit"> - The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code]. + <member name="angular_limit/lower" type="float" setter="_set_lower_limit" getter="_get_lower_limit" default="-90.0"> + The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. </member> - <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param"> + <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" default="1.0"> The lower this value, the more the rotation gets slowed down. </member> - <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param"> + <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9"> </member> - <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit"> - The maximum rotation. only active if [member angular_limit/enable] is [code]true[/code]. + <member name="angular_limit/upper" type="float" setter="_set_upper_limit" getter="_get_upper_limit" default="90.0"> + The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. </member> - <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag"> + <member name="motor/enable" type="bool" setter="set_flag" getter="get_flag" default="false"> When activated, a motor turns the hinge. </member> - <member name="motor/max_impulse" type="float" setter="set_param" getter="get_param"> + <member name="motor/max_impulse" type="float" setter="set_param" getter="get_param" default="1.0"> Maximum acceleration for the motor. </member> - <member name="motor/target_velocity" type="float" setter="set_param" getter="get_param"> + <member name="motor/target_velocity" type="float" setter="set_param" getter="get_param" default="1.0"> Target speed for the motor. </member> - <member name="params/bias" type="float" setter="set_param" getter="get_param"> + <member name="params/bias" type="float" setter="set_param" getter="get_param" default="0.3"> The speed with which the two bodies get pulled together when they move in different directions. </member> </members> @@ -46,10 +46,10 @@ The speed with which the two bodies get pulled together when they move in different directions. </constant> <constant name="PARAM_LIMIT_UPPER" value="1" enum="Param"> - The maximum rotation. only active if [member angular_limit/enable] is [code]true[/code]. + The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. </constant> <constant name="PARAM_LIMIT_LOWER" value="2" enum="Param"> - The minimum rotation. only active if [member angular_limit/enable] is [code]true[/code]. + The minimum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. </constant> <constant name="PARAM_LIMIT_BIAS" value="3" enum="Param"> The speed with which the rotation across the axis perpendicular to the hinge gets corrected. diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index 1d64ee1085..b8b5f0bd39 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="IP" inherits="Object" category="Core" version="3.2"> <brief_description> - Internet protocol (IP) support functions like DNS resolution. + Internet protocol (IP) support functions such as DNS resolution. </brief_description> <description> IP contains support functions for the Internet Protocol (IP). TCP/IP support is in different classes (see [StreamPeerTCP] and [TCP_Server]). IP provides DNS hostname resolution support, both blocking and threaded. @@ -15,7 +15,7 @@ <argument index="0" name="hostname" type="String" default=""""> </argument> <description> - Removes all of a "hostname"'s cached references. If no "hostname" is given then all cached IP addresses are removed. + Removes all of a [code]hostname[/code]'s cached references. If no [code]hostname[/code] is given, all cached IP addresses are removed. </description> </method> <method name="erase_resolve_item"> @@ -24,7 +24,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Removes a given item "id" from the queue. This should be used to free a queue after it has completed to enable more queries to happen. + Removes a given item [code]id[/code] from the queue. This should be used to free a queue after it has completed to enable more queries to happen. </description> </method> <method name="get_local_addresses" qualifiers="const"> @@ -56,7 +56,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns a queued hostname's IP address, given its queue "id". Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). + Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). </description> </method> <method name="get_resolve_item_status" qualifiers="const"> @@ -65,7 +65,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns a queued hostname's status as a RESOLVER_STATUS_* constant, given its queue "id". + Returns a queued hostname's status as a [code]RESOLVER_STATUS_*[/code] constant, given its queue [code]id[/code]. </description> </method> <method name="resolve_hostname"> @@ -76,7 +76,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the TYPE_* constant given as "ip_type". + Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. </description> </method> <method name="resolve_hostname_queue_item"> @@ -87,7 +87,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the TYPE_* constant given as "ip_type". Returns the queue ID if successful, or RESOLVER_INVALID_ID on error. + Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. </description> </method> </methods> diff --git a/doc/classes/IP_Unix.xml b/doc/classes/IP_Unix.xml index 4e09bf5dc0..2a97c40ef8 100644 --- a/doc/classes/IP_Unix.xml +++ b/doc/classes/IP_Unix.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="IP_Unix" inherits="IP" category="Core" version="3.2"> <brief_description> - Unix IP support. See [IP]. + UNIX IP support. See [IP]. </brief_description> <description> - Unix-specific implementation of IP support functions. See [IP]. + UNIX-specific implementation of IP support functions. See [IP]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index f2b6ddc7e9..65d5fbedc3 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -123,7 +123,7 @@ <argument index="3" name="format" type="int" enum="Image.Format"> </argument> <description> - Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [code]generate_mipmaps[/code] method. + Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="create_from_data"> @@ -140,7 +140,7 @@ <argument index="4" name="data" type="PoolByteArray"> </argument> <description> - Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [code]generate_mipmaps[/code] method. + Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="crop"> @@ -469,7 +469,13 @@ </method> </methods> <members> - <member name="data" type="Dictionary" setter="_set_data" getter="_get_data"> + <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{ +"data": PoolByteArray( ), +"format": "Lum8", +"height": 0, +"mipmaps": false, +"width": 0 +}"> Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants. </member> </members> @@ -485,126 +491,141 @@ <constant name="FORMAT_LA8" value="1" enum="Format"> </constant> <constant name="FORMAT_R8" value="2" enum="Format"> - OpenGL texture format RED with a single component and a bitdepth of 8. + OpenGL texture format [code]RED[/code] with a single component and a bitdepth of 8. </constant> <constant name="FORMAT_RG8" value="3" enum="Format"> - OpenGL texture format RG with two components and a bitdepth of 8 for each. + OpenGL texture format [code]RG[/code] with two components and a bitdepth of 8 for each. </constant> <constant name="FORMAT_RGB8" value="4" enum="Format"> - OpenGL texture format RGB with three components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + OpenGL texture format [code]RGB[/code] with three components, each with a bitdepth of 8. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_RGBA8" value="5" enum="Format"> - OpenGL texture format RGBA with four components, each with a bitdepth of 8. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 8. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_RGBA4444" value="6" enum="Format"> - OpenGL texture format RGBA with four components, each with a bitdepth of 4. + OpenGL texture format [code]RGBA[/code] with four components, each with a bitdepth of 4. </constant> <constant name="FORMAT_RGBA5551" value="7" enum="Format"> - OpenGL texture format GL_RGB5_A1 where 5 bits of depth for each component of RGB and one bit for alpha. + OpenGL texture format [code]GL_RGB5_A1[/code] where 5 bits of depth for each component of RGB and one bit for alpha. </constant> <constant name="FORMAT_RF" value="8" enum="Format"> - OpenGL texture format GL_R32F where there's one component, a 32-bit floating-point value. + OpenGL texture format [code]GL_R32F[/code] where there's one component, a 32-bit floating-point value. </constant> <constant name="FORMAT_RGF" value="9" enum="Format"> - OpenGL texture format GL_RG32F where there are two components, each a 32-bit floating-point values. + OpenGL texture format [code]GL_RG32F[/code] where there are two components, each a 32-bit floating-point values. </constant> <constant name="FORMAT_RGBF" value="10" enum="Format"> - OpenGL texture format GL_RGB32F where there are three components, each a 32-bit floating-point values. + OpenGL texture format [code]GL_RGB32F[/code] where there are three components, each a 32-bit floating-point values. </constant> <constant name="FORMAT_RGBAF" value="11" enum="Format"> - OpenGL texture format GL_RGBA32F where there are four components, each a 32-bit floating-point values. + OpenGL texture format [code]GL_RGBA32F[/code] where there are four components, each a 32-bit floating-point values. </constant> <constant name="FORMAT_RH" value="12" enum="Format"> - OpenGL texture format GL_R32F where there's one component, a 16-bit "half-precision" floating-point value. + OpenGL texture format [code]GL_R32F[/code] where there's one component, a 16-bit "half-precision" floating-point value. </constant> <constant name="FORMAT_RGH" value="13" enum="Format"> - OpenGL texture format GL_RG32F where there's two components, each a 16-bit "half-precision" floating-point value. + OpenGL texture format [code]GL_RG32F[/code] where there are two components, each a 16-bit "half-precision" floating-point value. </constant> <constant name="FORMAT_RGBH" value="14" enum="Format"> - OpenGL texture format GL_RGB32F where there's three components, each a 16-bit "half-precision" floating-point value. + OpenGL texture format [code]GL_RGB32F[/code] where there are three components, each a 16-bit "half-precision" floating-point value. </constant> <constant name="FORMAT_RGBAH" value="15" enum="Format"> - OpenGL texture format GL_RGBA32F where there's four components, each a 16-bit "half-precision" floating-point value. + OpenGL texture format [code]GL_RGBA32F[/code] where there are four components, each a 16-bit "half-precision" floating-point value. </constant> <constant name="FORMAT_RGBE9995" value="16" enum="Format"> - A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single exponent. + A special OpenGL texture format where the three color components have 9 bits of precision and all three share a single 5-bit exponent. </constant> <constant name="FORMAT_DXT1" value="17" enum="Format"> - The S3TC texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. More information can be found at https://www.khronos.org/opengl/wiki/S3_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 1, and is the smallest variation of S3TC, only providing 1 bit of alpha and color data being premultiplied with alpha. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_DXT3" value="18" enum="Format"> - The S3TC texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format that uses Block Compression 2, and color data is interpreted as not having been premultiplied by alpha. Well suited for images with sharp alpha transitions between translucent and opaque areas. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_DXT5" value="19" enum="Format"> - The S3TC texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparency gradients than DXT3. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + The [url=https://en.wikipedia.org/wiki/S3_Texture_Compression]S3TC[/url] texture format also known as Block Compression 3 or BC3 that contains 64 bits of alpha channel data followed by 64 bits of DXT1-encoded color data. Color data is not premultiplied by alpha, same as DXT3. DXT5 generally produces superior results for transparent gradients compared to DXT3. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_RGTC_R" value="20" enum="Format"> - Texture format that uses Red Green Texture Compression, normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. More information can be found here https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression. + Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red channel data using the same compression algorithm that DXT5 uses for the alpha channel. </constant> <constant name="FORMAT_RGTC_RG" value="21" enum="Format"> - Texture format that uses Red Green Texture Compression, normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. + Texture format that uses [url=https://www.khronos.org/opengl/wiki/Red_Green_Texture_Compression]Red Green Texture Compression[/url], normalizing the red and green channel data using the same compression algorithm that DXT5 uses for the alpha channel. </constant> <constant name="FORMAT_BPTC_RGBA" value="22" enum="Format"> - Texture format that uses BPTC compression with unsigned normalized RGBA components. More information can be found at https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned normalized RGBA components. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_BPTC_RGBF" value="23" enum="Format"> - Texture format that uses BPTC compression with signed floating-point RGB components. + Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with signed floating-point RGB components. </constant> <constant name="FORMAT_BPTC_RGBFU" value="24" enum="Format"> - Texture format that uses BPTC compression with unsigned floating-point RGB components. + Texture format that uses [url=https://www.khronos.org/opengl/wiki/BPTC_Texture_Compression]BPTC[/url] compression with unsigned floating-point RGB components. </constant> <constant name="FORMAT_PVRTC2" value="25" enum="Format"> - Texture format used on PowerVR-supported mobile platforms, uses 2 bit color depth with no alpha. More information on PVRTC can be found here https://en.wikipedia.org/wiki/PVRTC. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + Texture format used on PowerVR-supported mobile platforms, uses 2-bit color depth with no alpha. More information can be found [url=https://en.wikipedia.org/wiki/PVRTC]here[/url]. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_PVRTC2A" value="26" enum="Format"> - Same as PVRTC2, but with an alpha component. + Same as [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC2[/url], but with an alpha component. </constant> <constant name="FORMAT_PVRTC4" value="27" enum="Format"> - Similar to PVRTC2, but with 4 bit color depth and no alpha. + Similar to [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC2[/url], but with 4-bit color depth and no alpha. </constant> <constant name="FORMAT_PVRTC4A" value="28" enum="Format"> - Same as PVRTC4, but with an alpha component. + Same as [url=https://en.wikipedia.org/wiki/PVRTC]PVRTC4[/url], but with an alpha component. </constant> <constant name="FORMAT_ETC" value="29" enum="Format"> - Ericsson Texture Compression format, also referred to as 'ETC1', and is part of the OpenGL ES graphics standard. An overview of the format is given at https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC1]Ericsson Texture Compression format 1[/url], also referred to as "ETC1", and is part of the OpenGL ES graphics standard. This format cannot store an alpha channel. </constant> <constant name="FORMAT_ETC2_R11" value="30" enum="Format"> - Ericsson Texture Compression format 2 variant R11_EAC, which provides one channel of unsigned data. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]R11_EAC[/code] variant), which provides one channel of unsigned data. </constant> <constant name="FORMAT_ETC2_R11S" value="31" enum="Format"> - Ericsson Texture Compression format 2 variant SIGNED_R11_EAC, which provides one channel of signed data. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]SIGNED_R11_EAC[/code] variant), which provides one channel of signed data. </constant> <constant name="FORMAT_ETC2_RG11" value="32" enum="Format"> - Ericsson Texture Compression format 2 variant RG11_EAC, which provides two channels of unsigned data. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RG11_EAC[/code] variant), which provides two channels of unsigned data. </constant> <constant name="FORMAT_ETC2_RG11S" value="33" enum="Format"> - Ericsson Texture Compression format 2 variant SIGNED_RG11_EAC, which provides two channels of signed data. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]SIGNED_RG11_EAC[/code] variant), which provides two channels of signed data. </constant> <constant name="FORMAT_ETC2_RGB8" value="34" enum="Format"> - Ericsson Texture Compression format 2 variant RGB8, which is a followup of ETC1 and compresses RGB888 data. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8[/code] variant), which is a follow-up of ETC1 and compresses RGB888 data. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_ETC2_RGBA8" value="35" enum="Format"> - Ericsson Texture Compression format 2 variant RGBA8, which compresses RGBA8888 data with full alpha support. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGBA8[/code]variant), which compresses RGBA8888 data with full alpha support. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_ETC2_RGB8A1" value="36" enum="Format"> - Ericsson Texture Compression format 2 variant RGB8_PUNCHTHROUGH_ALPHA1, which compresses RGBA data to make alpha either fully transparent or fully opaque. Note that when creating an [ImageTexture], an sRGB to linear color space conversion is performed. + [url=https://en.wikipedia.org/wiki/Ericsson_Texture_Compression#ETC2_and_EAC]Ericsson Texture Compression format 2[/url] ([code]RGB8_PUNCHTHROUGH_ALPHA1[/code] variant), which compresses RGBA data to make alpha either fully transparent or fully opaque. + [b]Note:[/b] When creating an [ImageTexture], an sRGB to linear color space conversion is performed. </constant> <constant name="FORMAT_MAX" value="37" enum="Format"> Represents the size of the [enum Format] enum. </constant> <constant name="INTERPOLATE_NEAREST" value="0" enum="Interpolation"> + Performs nearest-neighbor interpolation. If the image is resized, it will be pixelated. </constant> <constant name="INTERPOLATE_BILINEAR" value="1" enum="Interpolation"> + Performs bilinear interpolation. If the image is resized, it will be blurry. This mode is faster than [constant INTERPOLATE_CUBIC], but it results in lower quality. </constant> <constant name="INTERPOLATE_CUBIC" value="2" enum="Interpolation"> + Performs cubic interpolation. If the image is resized, it will be blurry. This mode often gives better results compared to [constant INTERPOLATE_BILINEAR], at the cost of being slower. </constant> <constant name="INTERPOLATE_TRILINEAR" value="3" enum="Interpolation"> - Performs bilinear separately on the two most suited mipmap levels, then linearly interpolates between them. - It's slower than [constant INTERPOLATE_BILINEAR], but produces higher quality results, with much less aliasing artifacts. - If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. (Note that if you intend to scale multiple copies of the original image, it's better to call [code]generate_mipmaps[/code] on it in advance, to avoid wasting processing power in generating them again and again.) + Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them. + It's slower than [constant INTERPOLATE_BILINEAR], but produces higher-quality results with much less aliasing artifacts. + If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. + [b]Note:[/b] If you intend to scale multiple copies of the original image, it's better to call [method generate_mipmaps]] on it in advance, to avoid wasting processing power in generating them again and again. On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. </constant> <constant name="INTERPOLATE_LANCZOS" value="4" enum="Interpolation"> + Performs Lanczos interpolation. This is the slowest image resizing mode, but it typically gives the best results, especially when downscalng images. </constant> <constant name="ALPHA_NONE" value="0" enum="AlphaMode"> </constant> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 00a3c5c614..0a09b96ba7 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -58,7 +58,7 @@ <argument index="0" name="image" type="Image"> </argument> <description> - Set the [Image] of this [ImageTexture]. + Sets the [Image] of this [ImageTexture]. </description> </method> <method name="set_size_override"> @@ -72,10 +72,10 @@ </method> </methods> <members> - <member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality"> + <member name="lossy_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7"> The storage quality for [constant STORAGE_COMPRESS_LOSSY]. </member> - <member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage"> + <member name="storage" type="int" setter="set_storage" getter="get_storage" enum="ImageTexture.Storage" default="0"> The storage type (raw, lossy, or compressed). </member> </members> diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index ca45fc5f9e..ddfd3d74d5 100644 --- a/doc/classes/ImmediateGeometry.xml +++ b/doc/classes/ImmediateGeometry.xml @@ -21,7 +21,7 @@ <argument index="3" name="add_uv" type="bool" default="true"> </argument> <description> - Simple helper to draw a uvsphere, with given latitudes, longitude and radius. + Simple helper to draw an UV sphere with given latitude, longitude and radius. </description> </method> <method name="add_vertex"> @@ -42,7 +42,7 @@ </argument> <description> Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. - For the type of primitive, use the [Mesh].PRIMITIVE_* enumerations. + For the type of primitive, use the [Mesh].[code]PRIMITIVE_*[/code] enumerations. </description> </method> <method name="clear"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 1c2826ee57..efd8d33faf 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -4,7 +4,7 @@ A Singleton that deals with inputs. </brief_description> <description> - A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the Project Settings / Input Map tab. Or be set with [InputMap]. + A Singleton that deals with inputs. This includes key presses, mouse buttons and movement, joypads, and input actions. Actions and their events can be set in the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b], or with the [InputMap] class. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/inputs/index.html</link> @@ -39,7 +39,7 @@ <argument index="1" name="update_existing" type="bool" default="false"> </argument> <description> - Add a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. + Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. </description> </method> <method name="get_accelerometer" qualifiers="const"> @@ -83,7 +83,7 @@ <return type="Vector3"> </return> <description> - If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's x, y, and z axis. Otherwise, it returns an empty [Vector3]. + If the device has a gyroscope, this will return the rate of rotation in rad/s around a device's X, Y, and Z axes. Otherwise, it returns an empty [Vector3]. </description> </method> <method name="get_joy_axis" qualifiers="const"> @@ -130,7 +130,7 @@ <argument index="0" name="button_index" type="int"> </argument> <description> - Receives a joy button from [enum JoystickList] and returns its equivalent name as a string. + Receives a gamepad button from [enum JoystickList] and returns its equivalent name as a string. </description> </method> <method name="get_joy_guid" qualifiers="const"> @@ -139,7 +139,7 @@ <argument index="0" name="device" type="int"> </argument> <description> - Returns a SDL2 compatible device guid on platforms that use gamepad remapping. Returns "Default Gamepad" otherwise. + Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns [code]"Default Gamepad"[/code] otherwise. </description> </method> <method name="get_joy_name"> @@ -148,7 +148,7 @@ <argument index="0" name="device" type="int"> </argument> <description> - Returns the name of the joypad at the specified device index + Returns the name of the joypad at the specified device index. </description> </method> <method name="get_joy_vibration_duration"> @@ -187,7 +187,7 @@ <return type="int"> </return> <description> - Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time the bits are added together. + Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. </description> </method> <method name="get_mouse_mode" qualifiers="const"> @@ -292,7 +292,7 @@ <argument index="0" name="guid" type="String"> </argument> <description> - Removes all mappings from the internal db that match the given uid. + Removes all mappings from the internal database that match the given GUID. </description> </method> <method name="set_custom_mouse_cursor"> @@ -306,7 +306,7 @@ </argument> <description> Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See enum [code]CURSOR_*[/code] for the list of shapes. - [code]image[/code]'s size must be lower than 256x256. + [code]image[/code]'s size must be lower than 256×256. [code]hotspot[/code] must be within [code]image[/code]'s size. </description> </method> @@ -317,7 +317,7 @@ </argument> <description> Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW]. - Note that if you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead. + [b]Note:[/b] If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead. </description> </method> <method name="set_mouse_mode"> @@ -326,7 +326,7 @@ <argument index="0" name="mode" type="int" enum="Input.MouseMode"> </argument> <description> - Set the mouse mode. See the constants for more information. + Sets the mouse mode. See the constants for more information. </description> </method> <method name="set_use_accumulated_input"> @@ -335,7 +335,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Whether to accumulate similar input events sent by the operating system. Defaults to [code]true[/code]. + Whether to accumulate similar input events sent by the operating system. Enabled by default. </description> </method> <method name="start_joy_vibration"> @@ -350,8 +350,8 @@ <argument index="3" name="duration" type="float" default="0"> </argument> <description> - Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. weak_magnitude is the strength of the weak motor (between 0 and 1) and strong_magnitude is the strength of the strong motor (between 0 and 1). duration is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). - Note that not every hardware is compatible with long effect durations, it is recommended to restart an effect if in need to play it for more than a few seconds. + Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [code]weak_magnitude[/code] is the strength of the weak motor (between 0 and 1) and [code]strong_magnitude[/code] is the strength of the strong motor (between 0 and 1). [code]duration[/code] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). + [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. </description> </method> <method name="stop_joy_vibration"> @@ -392,7 +392,7 @@ Makes the mouse cursor hidden if it is visible. </constant> <constant name="MOUSE_MODE_CAPTURED" value="2" enum="MouseMode"> - Captures the mouse. The mouse will be hidden and unable to leave the game window. But it will still register movement and mouse button presses. + Captures the mouse. The mouse will be hidden and unable to leave the game window, but it will still register movement and mouse button presses. </constant> <constant name="MOUSE_MODE_CONFINED" value="3" enum="MouseMode"> Makes the mouse cursor visible but confines it to the game window. @@ -410,10 +410,10 @@ Cross cursor. Typically appears over regions in which a drawing operation can be performed or for selections. </constant> <constant name="CURSOR_WAIT" value="4" enum="CursorShape"> - Wait cursor. Indicates that the application is busy performing an operation. + Wait cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application is still usable during the operation. </constant> <constant name="CURSOR_BUSY" value="5" enum="CursorShape"> - Busy cursor. See [constant CURSOR_WAIT]. + Busy cursor. Indicates that the application is busy performing an operation. This cursor shape denotes that the application isn't usable during the operation (e.g. something is blocking its main thread). </constant> <constant name="CURSOR_DRAG" value="6" enum="CursorShape"> Drag cursor. Usually displayed when dragging something. @@ -425,16 +425,16 @@ Forbidden cursor. Indicates that the current action is forbidden (for example, when dragging something) or that the control at a position is disabled. </constant> <constant name="CURSOR_VSIZE" value="9" enum="CursorShape"> - Vertical resize mouse cursor. A double headed vertical arrow. It tells the user they can resize the window or the panel vertically. + Vertical resize mouse cursor. A double-headed vertical arrow. It tells the user they can resize the window or the panel vertically. </constant> <constant name="CURSOR_HSIZE" value="10" enum="CursorShape"> - Horizontal resize mouse cursor. A double headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. + Horizontal resize mouse cursor. A double-headed horizontal arrow. It tells the user they can resize the window or the panel horizontally. </constant> <constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape"> - Window resize mouse cursor. The cursor is a double headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. + Window resize mouse cursor. The cursor is a double-headed arrow that goes from the bottom left to the top right. It tells the user they can resize the window or the panel both horizontally and vertically. </constant> <constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape"> - Window resize mouse cursor. The cursor is a double headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. + Window resize mouse cursor. The cursor is a double-headed arrow that goes from the top left to the bottom right, the opposite of [constant CURSOR_BDIAGSIZE]. It tells the user they can resize the window or the panel both horizontally and vertically. </constant> <constant name="CURSOR_MOVE" value="13" enum="CursorShape"> Move cursor. Indicates that something can be moved. diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 335506867f..f2c00908f6 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -102,7 +102,7 @@ </method> </methods> <members> - <member name="device" type="int" setter="set_device" getter="get_device"> + <member name="device" type="int" setter="set_device" getter="get_device" default="0"> The event's device ID. </member> </members> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 9df7bbca74..46c47e357f 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -4,7 +4,7 @@ Input event type for actions. </brief_description> <description> - Contains a generic action which can be targeted from several type of inputs. Actions can be created from the project settings menu [code]Project > Project Settings > Input Map[/code]. See [method Node._input]. + Contains a generic action which can be targeted from several types of inputs. Actions can be created from the [b]Input Map[/b] tab in the [b]Project > Project Settings[/b] menu. See [method Node._input]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#actions</link> @@ -12,14 +12,14 @@ <methods> </methods> <members> - <member name="action" type="String" setter="set_action" getter="get_action"> + <member name="action" type="String" setter="set_action" getter="get_action" default=""""> The action's name. Actions are accessed via this [String]. </member> - <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> + <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the action's state is pressed. If [code]false[/code], the action's state is released. </member> - <member name="strength" type="float" setter="set_strength" getter="get_strength"> - The action's strength between 0 and 1. This value is consired as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by precising how strongly is the joypad axis bent or pressed. + <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> + The action's strength between 0 and 1. This value is considered as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by precising how strongly is the joypad axis bent or pressed. </member> </members> <constants> diff --git a/doc/classes/InputEventGesture.xml b/doc/classes/InputEventGesture.xml index b1abf04b51..59750a0902 100644 --- a/doc/classes/InputEventGesture.xml +++ b/doc/classes/InputEventGesture.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="position" type="Vector2" setter="set_position" getter="get_position"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index 78cd55b79a..dcdda83681 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -4,7 +4,7 @@ Input event for gamepad buttons. </brief_description> <description> - Input event type for gamepad buttons. For joysticks see [InputEventJoypadMotion]. + Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see [InputEventJoypadMotion]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html</link> @@ -12,13 +12,13 @@ <methods> </methods> <members> - <member name="button_index" type="int" setter="set_button_index" getter="get_button_index"> + <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> Button identifier. One of the [enum JoystickList] button constants. </member> - <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> + <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the button's state is pressed. If [code]false[/code], the button's state is released. </member> - <member name="pressure" type="float" setter="set_pressure" getter="get_pressure"> + <member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0"> Represents the pressure the user puts on the button with his finger, if the controller supports it. Ranges from [code]0[/code] to [code]1[/code]. </member> </members> diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index 5330b2a6e0..eb05cd2f99 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="InputEventJoypadMotion" inherits="InputEvent" category="Core" version="3.2"> <brief_description> - Input event type for gamepad joysticks and other motions. For buttons see [code]InputEventJoypadButton[/code]. + Input event type for gamepad joysticks and other motions. For buttons, see [code]InputEventJoypadButton[/code]. </brief_description> <description> Stores information about joystick motions. One [InputEventJoypadMotion] represents one axis at a time. @@ -12,10 +12,10 @@ <methods> </methods> <members> - <member name="axis" type="int" setter="set_axis" getter="get_axis"> + <member name="axis" type="int" setter="set_axis" getter="get_axis" default="0"> Axis identifier. Use one of the [enum JoystickList] axis constants. </member> - <member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value"> + <member name="axis_value" type="float" setter="set_axis_value" getter="get_axis_value" default="0.0"> Current position of the joystick on the given axis. The value ranges from [code]-1.0[/code] to [code]1.0[/code]. A value of [code]0[/code] means the axis is in its resting position. </member> </members> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 53b1f74bd4..cf9faaa26d 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -19,17 +19,17 @@ </method> </methods> <members> - <member name="echo" type="bool" setter="set_echo" getter="is_echo"> + <member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false"> If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. </member> - <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> + <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the key's state is pressed. If [code]false[/code], the key's state is released. </member> - <member name="scancode" type="int" setter="set_scancode" getter="get_scancode"> + <member name="scancode" type="int" setter="set_scancode" getter="get_scancode" default="0"> Key scancode, one of the [enum KeyList] constants. </member> - <member name="unicode" type="int" setter="set_unicode" getter="get_unicode"> - Key unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. + <member name="unicode" type="int" setter="set_unicode" getter="get_unicode" default="0"> + Key Unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. </member> </members> <constants> diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml index 5ded362bc7..fe77e46c6c 100644 --- a/doc/classes/InputEventMIDI.xml +++ b/doc/classes/InputEventMIDI.xml @@ -9,21 +9,21 @@ <methods> </methods> <members> - <member name="channel" type="int" setter="set_channel" getter="get_channel"> + <member name="channel" type="int" setter="set_channel" getter="get_channel" default="0"> </member> - <member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number"> + <member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number" default="0"> </member> - <member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value"> + <member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value" default="0"> </member> - <member name="instrument" type="int" setter="set_instrument" getter="get_instrument"> + <member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0"> </member> - <member name="message" type="int" setter="set_message" getter="get_message"> + <member name="message" type="int" setter="set_message" getter="get_message" default="0"> </member> - <member name="pitch" type="int" setter="set_pitch" getter="get_pitch"> + <member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0"> </member> - <member name="pressure" type="int" setter="set_pressure" getter="get_pressure"> + <member name="pressure" type="int" setter="set_pressure" getter="get_pressure" default="0"> </member> - <member name="velocity" type="int" setter="set_velocity" getter="get_velocity"> + <member name="velocity" type="int" setter="set_velocity" getter="get_velocity" default="0"> </member> </members> <constants> diff --git a/doc/classes/InputEventMagnifyGesture.xml b/doc/classes/InputEventMagnifyGesture.xml index 8f01f6f486..f5add435f5 100644 --- a/doc/classes/InputEventMagnifyGesture.xml +++ b/doc/classes/InputEventMagnifyGesture.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="factor" type="float" setter="set_factor" getter="get_factor"> + <member name="factor" type="float" setter="set_factor" getter="get_factor" default="1.0"> </member> </members> <constants> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 8ba272d470..56ba33702b 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -12,14 +12,14 @@ <methods> </methods> <members> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask"> - Mouse button mask identifier, one of or a bitwise combination of the [enum ButtonList] button masks. + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="0"> + The mouse button mask identifier, one of or a bitwise combination of the [enum ButtonList] button masks. </member> - <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position"> - Mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0. + <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2( 0, 0 )"> + The global mouse position relative to the current [Viewport] when used in [method Control._gui_input], otherwise is at 0,0. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position"> - Mouse local position relative to the [Viewport]. If used in [method Control._gui_input] the position is relative to the current [Control] which is under the mouse. + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + The local mouse position relative to the [Viewport]. If used in [method Control._gui_input], the position is relative to the current [Control] which is under the mouse. </member> </members> <constants> diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index 99e25d2c6f..4cf7174ab1 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -12,16 +12,16 @@ <methods> </methods> <members> - <member name="button_index" type="int" setter="set_button_index" getter="get_button_index"> - Mouse button identifier, one of the [enum ButtonList] button or button wheel constants. + <member name="button_index" type="int" setter="set_button_index" getter="get_button_index" default="0"> + The mouse button identifier, one of the [enum ButtonList] button or button wheel constants. </member> - <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick"> + <member name="doubleclick" type="bool" setter="set_doubleclick" getter="is_doubleclick" default="false"> If [code]true[/code], the mouse button's state is a double-click. </member> - <member name="factor" type="float" setter="set_factor" getter="get_factor"> - Magnitude. Amount (or delta) of the event. Used for scroll events, indicates scroll amount (vertically or horizontally). Only supported on some platforms, sensitivity varies by platform. May be 0 if not supported. + <member name="factor" type="float" setter="set_factor" getter="get_factor" default="1.0"> + The amount (or delta) of the event. When used for high-precision scroll events, this indicates the scroll amount (vertical or horizontal). This is only supported on some platforms; the reported sensitivity varies depending on the platform. May be [code]0[/code] if not supported. </member> - <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> + <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the mouse button's state is pressed. If [code]false[/code], the mouse button's state is released. </member> </members> diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 3df47177dc..fab4cc0fb9 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -12,11 +12,11 @@ <methods> </methods> <members> - <member name="relative" type="Vector2" setter="set_relative" getter="get_relative"> - Mouse position relative to the previous position (position at the last frame). + <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )"> + The mouse position relative to the previous position (position at the last frame). </member> - <member name="speed" type="Vector2" setter="set_speed" getter="get_speed"> - Mouse speed. + <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )"> + The mouse speed in pixels per second. </member> </members> <constants> diff --git a/doc/classes/InputEventPanGesture.xml b/doc/classes/InputEventPanGesture.xml index 8a2fa74597..dab2c74543 100644 --- a/doc/classes/InputEventPanGesture.xml +++ b/doc/classes/InputEventPanGesture.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="delta" type="Vector2" setter="set_delta" getter="get_delta"> + <member name="delta" type="Vector2" setter="set_delta" getter="get_delta" default="Vector2( 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index 36e47ee51a..be2eafbe7c 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -1,8 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="InputEventScreenDrag" inherits="InputEvent" category="Core" version="3.2"> <brief_description> - Input event type for screen drag events. - (only available on mobile devices) + Input event type for screen drag events. Only available on mobile devices. </brief_description> <description> Contains screen drag information. See [method Node._input]. @@ -13,17 +12,17 @@ <methods> </methods> <members> - <member name="index" type="int" setter="set_index" getter="get_index"> - Drag event index in the case of a multi-drag event. + <member name="index" type="int" setter="set_index" getter="get_index" default="0"> + The drag event index in the case of a multi-drag event. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position"> - Drag position. + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + The drag position. </member> - <member name="relative" type="Vector2" setter="set_relative" getter="get_relative"> - Drag position relative to its start position. + <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2( 0, 0 )"> + The drag position relative to its start position. </member> - <member name="speed" type="Vector2" setter="set_speed" getter="get_speed"> - Drag speed. + <member name="speed" type="Vector2" setter="set_speed" getter="get_speed" default="Vector2( 0, 0 )"> + The drag speed. </member> </members> <constants> diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index 8f537f12bc..6239fbc949 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -13,13 +13,13 @@ <methods> </methods> <members> - <member name="index" type="int" setter="set_index" getter="get_index"> - Touch index in the case of a multi-touch event. One index = one finger. + <member name="index" type="int" setter="set_index" getter="get_index" default="0"> + The touch index in the case of a multi-touch event. One index = one finger. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position"> - Touch position. + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> + The touch position. </member> - <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> + <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> If [code]true[/code], the touch's state is pressed. If [code]false[/code], the touch's state is released. </member> </members> diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index 9ea9ff7bef..9b31dd4639 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -12,19 +12,19 @@ <methods> </methods> <members> - <member name="alt" type="bool" setter="set_alt" getter="get_alt"> + <member name="alt" type="bool" setter="set_alt" getter="get_alt" default="false"> State of the [code]Alt[/code] modifier. </member> - <member name="command" type="bool" setter="set_command" getter="get_command"> + <member name="command" type="bool" setter="set_command" getter="get_command" default="false"> State of the [code]Command[/code] modifier. </member> - <member name="control" type="bool" setter="set_control" getter="get_control"> + <member name="control" type="bool" setter="set_control" getter="get_control" default="false"> State of the [code]Ctrl[/code] modifier. </member> - <member name="meta" type="bool" setter="set_metakey" getter="get_metakey"> + <member name="meta" type="bool" setter="set_metakey" getter="get_metakey" default="false"> State of the [code]Meta[/code] modifier. </member> - <member name="shift" type="bool" setter="set_shift" getter="get_shift"> + <member name="shift" type="bool" setter="set_shift" getter="get_shift" default="false"> State of the [code]Shift[/code] modifier. </member> </members> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index bb29a09d22..6bbb402b15 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -4,7 +4,7 @@ Singleton that manages [InputEventAction]. </brief_description> <description> - Manages all [InputEventAction] which can be created/modified from the project settings menu [code]Project > Project Settings > Input Map[/code] or in code with [method add_action] and [method action_add_event]. See [method Node._input]. + Manages all [InputEventAction] which can be created/modified from the project settings menu [b]Project > Project Settings > Input Map[/b] or in code with [method add_action] and [method action_add_event]. See [method Node._input]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap</link> diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index c4752c735d..4b98166ef2 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -24,7 +24,7 @@ <return type="String"> </return> <description> - Retrieve the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance]. + Gets the path to the [PackedScene] resource file that is loaded by default when calling [method replace_by_instance]. </description> </method> <method name="get_stored_values"> @@ -41,7 +41,7 @@ <argument index="0" name="custom_scene" type="PackedScene" default="null"> </argument> <description> - Replace this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. + Replaces this placeholder by the scene handed as an argument, or the original scene if no argument is given. As for all resources, the scene is loaded only if it's not loaded already. By manually loading the scene beforehand, delays caused by this function can be avoided. </description> </method> </methods> diff --git a/doc/classes/InterpolatedCamera.xml b/doc/classes/InterpolatedCamera.xml index d124ea707a..ca3a5d0733 100644 --- a/doc/classes/InterpolatedCamera.xml +++ b/doc/classes/InterpolatedCamera.xml @@ -21,13 +21,13 @@ </method> </methods> <members> - <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled"> + <member name="enabled" type="bool" setter="set_interpolation_enabled" getter="is_interpolation_enabled" default="false"> If [code]true[/code], and a target is set, the camera will move automatically. </member> - <member name="speed" type="float" setter="set_speed" getter="get_speed"> + <member name="speed" type="float" setter="set_speed" getter="get_speed" default="1.0"> How quickly the camera moves toward its target. Higher values will result in tighter camera motion. </member> - <member name="target" type="NodePath" setter="set_target_path" getter="get_target_path"> + <member name="target" type="NodePath" setter="set_target_path" getter="get_target_path" default="NodePath("")"> The target's [NodePath]. </member> </members> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index d78c930351..95c0e663ce 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -5,7 +5,7 @@ </brief_description> <description> This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. - Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be 'activated' with a double click (or Enter key). + Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing Enter. </description> <tutorials> </tutorials> @@ -31,15 +31,15 @@ <argument index="2" name="selectable" type="bool" default="true"> </argument> <description> - Adds an item to the item list with specified text. Specify an icon of null for a list item with no icon. - If selectable is [code]true[/code] the list item will be selectable. + Adds an item to the item list with specified text. Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon. + If selectable is [code]true[/code], the list item will be selectable. </description> </method> <method name="clear"> <return type="void"> </return> <description> - Remove all items from the list. + Removes all items from the list. </description> </method> <method name="ensure_current_is_visible"> @@ -73,7 +73,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the custom background color of the item specified by [code]idx[/code] index. Default value is [code]Color(0, 0, 0, 0)[/code]. + Returns the custom background color of the item specified by [code]idx[/code] index. </description> </method> <method name="get_item_custom_fg_color" qualifiers="const"> @@ -82,7 +82,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the custom foreground color of the item specified by [code]idx[/code] index. Default value is [code]Color(0, 0, 0, 0)[/code]. + Returns the custom foreground color of the item specified by [code]idx[/code] index. </description> </method> <method name="get_item_icon" qualifiers="const"> @@ -91,7 +91,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the icon associated with the specified index. Default value is [code]null[/code] + Returns the icon associated with the specified index. </description> </method> <method name="get_item_icon_modulate" qualifiers="const"> @@ -165,7 +165,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether or not the item at the specified index is disabled. + Returns [code]true[/code] if the item at the specified index is disabled. </description> </method> <method name="is_item_icon_transposed" qualifiers="const"> @@ -182,7 +182,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether or not the item at the specified index is selectable. + Returns [code]true[/code] if the item at the specified index is selectable. </description> </method> <method name="is_item_tooltip_enabled" qualifiers="const"> @@ -191,7 +191,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the tooltip is enabled for specified item index. + Returns [code]true[/code] if the tooltip is enabled for specified item index. </description> </method> <method name="is_selected" qualifiers="const"> @@ -200,7 +200,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether or not item at the specified index is currently selected. + Returns [code]true[/code] if the item at the specified index is currently selected. </description> </method> <method name="move_item"> @@ -232,7 +232,7 @@ </argument> <description> Select the item at the specified index. - Note: This method does not trigger the item selection signal. + [b]Note:[/b] This method does not trigger the item selection signal. </description> </method> <method name="set_item_custom_bg_color"> @@ -273,8 +273,8 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - Disable (or enable) item at the specified index. - Disabled items are not be selectable and do not trigger activation (Enter or double-click) signals. + Disables (or enables) the item at the specified index. + Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing Enter). </description> </method> <method name="set_item_icon"> @@ -285,7 +285,7 @@ <argument index="1" name="icon" type="Texture"> </argument> <description> - Set (or replace) the icon's [Texture] associated with the specified index. + Sets (or replaces) the icon's [Texture] associated with the specified index. </description> </method> <method name="set_item_icon_modulate"> @@ -338,7 +338,7 @@ <argument index="1" name="selectable" type="bool"> </argument> <description> - Allow or disallow selection of the item associated with the specified index. + Allows or disallows selection of the item associated with the specified index. </description> </method> <method name="set_item_text"> @@ -360,7 +360,7 @@ <argument index="1" name="tooltip" type="String"> </argument> <description> - Sets tooltip hint for the item associated with the specified index. + Sets the tooltip hint for the item associated with the specified index. </description> </method> <method name="set_item_tooltip_enabled"> @@ -387,51 +387,49 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Ensure the item associated with the specified index is not selected. + Ensures the item associated with the specified index is not selected. </description> </method> <method name="unselect_all"> <return type="void"> </return> <description> - Ensure there are no items selected. + Ensures there are no items selected. </description> </method> </methods> <members> - <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect"> + <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false"> If [code]true[/code], the currently selected item can be selected again. </member> - <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select"> + <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" default="false"> If [code]true[/code], right mouse button click can select items. </member> - <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height"> + <member name="auto_height" type="bool" setter="set_auto_height" getter="has_auto_height" default="false"> If [code]true[/code], the control will automatically resize the height to fit its content. </member> - <member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width"> - Sets the default column width in pixels. - If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. + <member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width" default="0"> + Sets the default column width in pixels. If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. </member> - <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size"> + <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2( 0, 0 )"> Sets the default icon size in pixels. </member> - <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode"> + <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode" default="1"> Sets the default position of the icon to either [constant ICON_MODE_LEFT] or [constant ICON_MODE_TOP]. </member> - <member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale"> - Sets the icon size to its initial size multiplied by the specified scale. Default value is 1.0. + <member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale" default="1.0"> + Sets the icon size to its initial size multiplied by the specified scale. </member> - <member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns"> - Sets the maximum columns the list will have. - If set to anything other than the default, the content will be split among the specified columns. + <member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns" default="1"> + Sets the maximum columns the list will have. If set to anything other than the default, the content will be split among the specified columns. </member> - <member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines"> + <member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines" default="1"> </member> - <member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width"> + <member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width" default="false"> If set to [code]true[/code], all columns will have the same width specified by [member fixed_column_width]. </member> - <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode"> - Allow single or multiple item selection. See the [enum SelectMode] constants. + <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0"> + Allows single or multiple item selection. See the [enum SelectMode] constants. </member> </members> <signals> @@ -439,7 +437,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Triggered when specified list item is activated via double click or Enter. + Triggered when specified list item is activated via double-clicking or by pressing Enter. </description> </signal> <signal name="item_rmb_selected"> @@ -449,8 +447,7 @@ </argument> <description> Triggered when specified list item has been selected via right mouse clicking. - The click position is also provided to allow appropriate popup of context menus - at the correct location. + 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> @@ -491,8 +488,10 @@ <constant name="ICON_MODE_LEFT" value="1" enum="IconMode"> </constant> <constant name="SELECT_SINGLE" value="0" enum="SelectMode"> + Only allow selecting a single item. </constant> <constant name="SELECT_MULTI" value="1" enum="SelectMode"> + Allows selecting multiple items by holding Ctrl or Shift. </constant> </constants> <theme_items> @@ -506,23 +505,23 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.627451, 0.627451, 0.627451, 1 )"> </theme_item> - <theme_item name="font_color_selected" type="Color"> + <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="guide_color" type="Color"> + <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> </theme_item> - <theme_item name="icon_margin" type="int"> + <theme_item name="icon_margin" type="int" default="4"> </theme_item> - <theme_item name="line_separation" type="int"> + <theme_item name="line_separation" type="int" default="2"> </theme_item> <theme_item name="selected" type="StyleBox"> </theme_item> <theme_item name="selected_focus" type="StyleBox"> </theme_item> - <theme_item name="vseparation" type="int"> + <theme_item name="vseparation" type="int" default="2"> </theme_item> </theme_items> </class> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index cb62a1e88e..e834f5cb39 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -28,7 +28,7 @@ <argument index="2" name="sort_keys" type="bool" default="false"> </argument> <description> - Converts a Variant var to JSON text and returns the result. Useful for serializing data to store or send over the network. + Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network. </description> </method> </methods> diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml index c9caa5c5d4..98db123f5b 100644 --- a/doc/classes/JSONParseResult.xml +++ b/doc/classes/JSONParseResult.xml @@ -4,7 +4,7 @@ Data class wrapper for decoded JSON. </brief_description> <description> - Returned by [method JSON.parse], [JSONParseResult] contains decoded JSON or error information if JSON source not successfully parsed. You can check if JSON source was successfully parsed with [code]if json_result.error == OK[/code]. + Returned by [method JSON.parse], [JSONParseResult] contains the decoded JSON or error information if the JSON source wasn't successfully parsed. You can check if the JSON source was successfully parsed with [code]if json_result.error == OK[/code]. </description> <tutorials> </tutorials> @@ -12,22 +12,22 @@ </methods> <members> <member name="error" type="int" setter="set_error" getter="get_error" enum="Error"> - The error type if JSON source was not successfully parsed. See [@GlobalScope] ERR_* constants. + The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. </member> - <member name="error_line" type="int" setter="set_error_line" getter="get_error_line"> + <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1"> The line number where the error occurred if JSON source was not successfully parsed. </member> - <member name="error_string" type="String" setter="set_error_string" getter="get_error_string"> - The error message if JSON source was not successfully parsed. See [@GlobalScope] ERR_* constants. + <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default=""""> + The error message if JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. </member> <member name="result" type="Variant" setter="set_result" getter="get_result"> - A [Variant] containing the parsed JSON. Use typeof() to check if it is what you expect. For example, if JSON source starts with curly braces ([code]{}[/code]) a [Dictionary] will be returned, if JSON source starts with braces ([code][][/code]) an [Array] will be returned. - [i]Be aware that the JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types.[/i] - Note that JSON objects do not preserve key order like Godot dictionaries, thus you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements:[/i] + A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with braces ([code][][/code]), an [Array] will be returned. + [b]Note:[/b] The JSON specification does not define integer or float types, but only a number type. Therefore, parsing a JSON text will convert all numerical values to float types. + [b]Note:[/b] JSON objects do not preserve key order like Godot dictionaries, thus, you should not rely on keys being in a certain order if a dictionary is constructed from JSON. In contrast, JSON arrays retain the order of their elements: [codeblock] var p = JSON.parse('["hello", "world", "!"]') if typeof(p.result) == TYPE_ARRAY: - print(p.result[0]) # prints 'hello' + print(p.result[0]) # Prints "hello" else: print("unexpected results") [/codeblock] diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index 68b6831103..7737001a6c 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -4,7 +4,7 @@ Singleton that connects the engine with the browser's JavaScript context in HTML5 export. </brief_description> <description> - The JavaScript singleton is implemented only in HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. + The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script</link> diff --git a/doc/classes/Joint.xml b/doc/classes/Joint.xml index 5cd59852df..fe50cdac10 100644 --- a/doc/classes/Joint.xml +++ b/doc/classes/Joint.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Joint" inherits="Spatial" category="Core" version="3.2"> <brief_description> - Base class for all 3D joints + Base class for all 3D joints. </brief_description> <description> Joints are used to bind together two physics bodies. They have a solver priority and can define if the bodies of the two attached nodes should be able to collide with each other. @@ -11,16 +11,16 @@ <methods> </methods> <members> - <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision"> + <member name="collision/exclude_nodes" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> If [code]true[/code], the two bodies of the nodes are not able to collide with each other. </member> - <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a"> + <member name="nodes/node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> The node attached to the first side (A) of the joint. </member> - <member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b"> + <member name="nodes/node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> The node attached to the second side (B) of the joint. </member> - <member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority"> + <member name="solver/priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1"> The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. </member> </members> diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml index b700bbd991..63d083d470 100644 --- a/doc/classes/Joint2D.xml +++ b/doc/classes/Joint2D.xml @@ -11,16 +11,16 @@ <methods> </methods> <members> - <member name="bias" type="float" setter="set_bias" getter="get_bias"> - When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. Default value: [code]0[/code] + <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0"> + When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint. </member> - <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision"> - If [code]true[/code], [member node_a] and [member node_b] can collide. Default value: [code]false[/code]. + <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> + If [code]true[/code], [member node_a] and [member node_b] can collide. </member> - <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a"> + <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> The first body attached to the joint. Must derive from [PhysicsBody2D]. </member> - <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b"> + <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> The second body attached to the joint. Must derive from [PhysicsBody2D]. </member> </members> diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 8ea3d8c188..b4e6b0abab 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -4,9 +4,9 @@ Kinematic body 3D node. </brief_description> <description> - Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: - Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - Kinematic Characters: KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: + [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + [b]Kinematic characters:[/b] KinematicBody also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> @@ -94,7 +94,7 @@ If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes if you include gravity in [code]linear_velocity[/code]. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. - If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody] nodes, but it won't also detect any collisions with them. If [code]false[/code] it will interact with [RigidBody] nodes like with [StaticBody]. + If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody] nodes like with [StaticBody]. Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. </description> </method> @@ -135,17 +135,17 @@ </method> </methods> <members> - <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin"> + <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.001"> If the body is at least this close to another body, this body will consider them to be colliding. </member> - <member name="move_lock_x" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the x-axis. + <member name="move_lock_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's X axis movement. </member> - <member name="move_lock_y" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the y-axis. + <member name="move_lock_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's Y axis movement. </member> - <member name="move_lock_z" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the z-axis. + <member name="move_lock_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's Z axis movement. </member> </members> <constants> diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index b7ff4bac84..39d84c6e31 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -4,9 +4,9 @@ Kinematic body 2D node. </brief_description> <description> - Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all (to other types of bodies, such a character or a rigid body, these are the same as a static body). They have however, two main uses: - Simulated Motion: When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). - Kinematic Characters: KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. + Kinematic bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a character or a rigid body, these are the same as a static body. However, they have two main uses: + [b]Simulated motion:[/b] When these bodies are moved manually, either from code or from an AnimationPlayer (with process mode set to fixed), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but that don't require advanced physics. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> @@ -27,7 +27,7 @@ </argument> <description> Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last [method move_and_slide] call. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). - Example usage: + [b]Example usage:[/b] [codeblock] for i in get_slide_count(): var collision = get_slide_collision(i) @@ -100,7 +100,7 @@ If [code]stop_on_slope[/code] is [code]true[/code], body will not slide on slopes when you include gravity in [code]linear_velocity[/code] and the body is standing still. If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops. [code]floor_max_angle[/code] is the maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall. The default value equals 45 degrees. - If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody2D] nodes, but it won't also detect any collisions with them. If [code]false[/code] it will interact with [RigidBody2D] nodes like with [StaticBody2D]. + If [code]infinite_inertia[/code] is [code]true[/code], body will be able to push [RigidBody2D] nodes, but it won't also detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. Returns the [code]linear_velocity[/code] vector, rotated and/or scaled if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. </description> </method> @@ -141,10 +141,10 @@ </method> </methods> <members> - <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin"> + <member name="collision/safe_margin" type="float" setter="set_safe_margin" getter="get_safe_margin" default="0.08"> If the body is at least this close to another body, this body will consider them to be colliding. </member> - <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled"> + <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method move_and_collide] functions. </member> </members> diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml index 4ce74df767..4ce28b25c9 100644 --- a/doc/classes/KinematicCollision.xml +++ b/doc/classes/KinematicCollision.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="KinematicCollision" inherits="Reference" category="Core" version="3.2"> <brief_description> - Collision data for KinematicBody collisions. + Collision data for [KinematicBody] collisions. </brief_description> <description> - Contains collision data for KinematicBody collisions. When a [KinematicBody] is moved using [method KinematicBody.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. + Contains collision data for [KinematicBody] collisions. When a [KinematicBody] is moved using [method KinematicBody.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. </description> <tutorials> @@ -12,37 +12,37 @@ <methods> </methods> <members> - <member name="collider" type="Object" setter="" getter="get_collider"> + <member name="collider" type="Object" setter="" getter="get_collider" default="null"> The colliding body. </member> - <member name="collider_id" type="int" setter="" getter="get_collider_id"> + <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> The colliding body's unique [RID]. </member> <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. </member> - <member name="collider_shape" type="Object" setter="" getter="get_collider_shape"> + <member name="collider_shape" type="Object" setter="" getter="get_collider_shape" default="null"> The colliding body's shape. </member> - <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index"> + <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0"> The colliding shape's index. See [CollisionObject]. </member> - <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity"> + <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3( 0, 0, 0 )"> The colliding object's velocity. </member> - <member name="local_shape" type="Object" setter="" getter="get_local_shape"> + <member name="local_shape" type="Object" setter="" getter="get_local_shape" default="null"> The moving object's colliding shape. </member> - <member name="normal" type="Vector3" setter="" getter="get_normal"> + <member name="normal" type="Vector3" setter="" getter="get_normal" default="Vector3( 0, 0, 0 )"> The colliding body's shape's normal at the point of collision. </member> - <member name="position" type="Vector3" setter="" getter="get_position"> + <member name="position" type="Vector3" setter="" getter="get_position" default="Vector3( 0, 0, 0 )"> The point of collision. </member> - <member name="remainder" type="Vector3" setter="" getter="get_remainder"> + <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3( 0, 0, 0 )"> The moving object's remaining movement vector. </member> - <member name="travel" type="Vector3" setter="" getter="get_travel"> + <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3( 0, 0, 0 )"> The distance the moving object traveled before collision. </member> </members> diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index 5a0303b7ba..91cee3d05a 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="KinematicCollision2D" inherits="Reference" category="Core" version="3.2"> <brief_description> - Collision data for KinematicBody2D collisions. + Collision data for [KinematicBody2D] collisions. </brief_description> <description> - Contains collision data for KinematicBody2D collisions. When a [KinematicBody2D] is moved using [method KinematicBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. + Contains collision data for [KinematicBody2D] collisions. When a [KinematicBody2D] is moved using [method KinematicBody2D.move_and_collide], it stops if it detects a collision with another body. If a collision is detected, a KinematicCollision2D object is returned. This object contains information about the collision, including the colliding object, the remaining motion, and the collision position. This information can be used to calculate a collision response. </description> <tutorials> @@ -12,37 +12,37 @@ <methods> </methods> <members> - <member name="collider" type="Object" setter="" getter="get_collider"> + <member name="collider" type="Object" setter="" getter="get_collider" default="null"> The colliding body. </member> - <member name="collider_id" type="int" setter="" getter="get_collider_id"> + <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> The colliding body's unique [RID]. </member> <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. </member> - <member name="collider_shape" type="Object" setter="" getter="get_collider_shape"> + <member name="collider_shape" type="Object" setter="" getter="get_collider_shape" default="null"> The colliding body's shape. </member> - <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index"> + <member name="collider_shape_index" type="int" setter="" getter="get_collider_shape_index" default="0"> The colliding shape's index. See [CollisionObject2D]. </member> - <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity"> + <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2( 0, 0 )"> The colliding object's velocity. </member> - <member name="local_shape" type="Object" setter="" getter="get_local_shape"> + <member name="local_shape" type="Object" setter="" getter="get_local_shape" default="null"> The moving object's colliding shape. </member> - <member name="normal" type="Vector2" setter="" getter="get_normal"> + <member name="normal" type="Vector2" setter="" getter="get_normal" default="Vector2( 0, 0 )"> The colliding body's shape's normal at the point of collision. </member> - <member name="position" type="Vector2" setter="" getter="get_position"> + <member name="position" type="Vector2" setter="" getter="get_position" default="Vector2( 0, 0 )"> The point of collision. </member> - <member name="remainder" type="Vector2" setter="" getter="get_remainder"> + <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2( 0, 0 )"> The moving object's remaining movement vector. </member> - <member name="travel" type="Vector2" setter="" getter="get_travel"> + <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2( 0, 0 )"> The distance the moving object traveled before collision. </member> </members> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 8d52cae186..72e640adb6 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -5,7 +5,7 @@ </brief_description> <description> Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead. - Note that contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to MOUSE_FILTER_IGNORE (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter. + [b]Note:[/b] Contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to [constant Control.MOUSE_FILTER_IGNORE] (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter. </description> <tutorials> </tutorials> @@ -35,39 +35,39 @@ <return type="int"> </return> <description> - Returns the number of lines shown. Useful if the [Label] 's height cannot currently display all lines. + Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines. </description> </method> </methods> <members> - <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align"> + <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0"> Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants. </member> - <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap"> - If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. Default: [code]false[/code]. + <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> + If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. </member> - <member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text"> + <member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false"> If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely. </member> - <member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped"> + <member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped" default="0"> The node ignores the first [code]lines_skipped[/code] lines before it starts to display text. </member> - <member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible"> + <member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1"> Limits the lines of text the node shows on screen. </member> - <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible"> + <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0"> Limits the count of visible characters. If you set [code]percent_visible[/code] to 50, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. </member> - <member name="text" type="String" setter="set_text" getter="get_text"> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> The text to display on screen. </member> - <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase"> + <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false"> If [code]true[/code], all the text displays as UPPERCASE. </member> - <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign"> + <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign" default="0"> Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. </member> - <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters"> + <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> Restricts the number of characters to display. Set to -1 to disable. </member> </members> @@ -79,7 +79,7 @@ Align rows centered. </constant> <constant name="ALIGN_RIGHT" value="2" enum="Align"> - Align rows to the right (default). + Align rows to the right. </constant> <constant name="ALIGN_FILL" value="3" enum="Align"> Expand row whitespaces to fit the width. @@ -100,21 +100,21 @@ <theme_items> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="font_color_shadow" type="Color"> + <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )"> </theme_item> - <theme_item name="font_outline_modulate" type="Color"> + <theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="line_spacing" type="int"> + <theme_item name="line_spacing" type="int" default="3"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> - <theme_item name="shadow_as_outline" type="int"> + <theme_item name="shadow_as_outline" type="int" default="0"> </theme_item> - <theme_item name="shadow_offset_x" type="int"> + <theme_item name="shadow_offset_x" type="int" default="1"> </theme_item> - <theme_item name="shadow_offset_y" type="int"> + <theme_item name="shadow_offset_y" type="int" default="1"> </theme_item> </theme_items> </class> diff --git a/doc/classes/LargeTexture.xml b/doc/classes/LargeTexture.xml index 4611bc228e..b4267f55f0 100644 --- a/doc/classes/LargeTexture.xml +++ b/doc/classes/LargeTexture.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="LargeTexture" inherits="Texture" category="Core" version="3.2"> <brief_description> - A Texture capable of storing many smaller Textures with offsets. + A [Texture] capable of storing many smaller textures with offsets. </brief_description> <description> - A Texture capable of storing many smaller Textures with offsets. - You can dynamically add pieces([Texture]) to this [LargeTexture] using different offsets. + A [Texture] capable of storing many smaller textures with offsets. + You can dynamically add pieces ([Texture]s) to this [LargeTexture] using different offsets. </description> <tutorials> </tutorials> @@ -18,7 +18,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Add another [Texture] to this [LargeTexture], starting on offset "ofs". + Adds [code]texture[/code] to this [LargeTexture], starting on offset [code]ofs[/code]. </description> </method> <method name="clear"> @@ -41,7 +41,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the offset of the piece with index "idx". + Returns the offset of the piece with the index [code]idx[/code]. </description> </method> <method name="get_piece_texture" qualifiers="const"> @@ -50,7 +50,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the [Texture] of the piece with index "idx". + Returns the [Texture] of the piece with the index [code]idx[/code]. </description> </method> <method name="set_piece_offset"> @@ -61,7 +61,7 @@ <argument index="1" name="ofs" type="Vector2"> </argument> <description> - Sets the offset of the piece with index "idx" to "ofs". + Sets the offset of the piece with the index [code]idx[/code] to [code]ofs[/code]. </description> </method> <method name="set_piece_texture"> @@ -72,7 +72,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Sets the [Texture] of the piece with index "idx" to "texture". + Sets the [Texture] of the piece with index [code]idx[/code] to [code]texture[/code]. </description> </method> <method name="set_size"> diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index 05eb44b2f1..64d8442180 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -4,7 +4,7 @@ Provides a base class for different kinds of light nodes. </brief_description> <description> - Light is the abstract base class for light nodes, so it shouldn't be used directly (It can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. + Light is the abstract base class for light nodes, so it shouldn't be used directly (it can't be instanced). Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> @@ -12,43 +12,43 @@ <methods> </methods> <members> - <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> - If [code]true[/code], the light only appears in the editor and will not be visible at runtime. Default value:[code]false[/code]. + <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false"> + If [code]true[/code], the light only appears in the editor and will not be visible at runtime. </member> - <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light.BakeMode"> + <member name="light_bake_mode" type="int" setter="set_bake_mode" getter="get_bake_mode" enum="Light.BakeMode" default="1"> The light's bake mode. See [enum BakeMode]. </member> - <member name="light_color" type="Color" setter="set_color" getter="get_color"> + <member name="light_color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> The light's color. </member> - <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask"> + <member name="light_cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="4294967295"> The light will affect objects in the selected layers. </member> - <member name="light_energy" type="float" setter="set_param" getter="get_param"> + <member name="light_energy" type="float" setter="set_param" getter="get_param" default="1.0"> The light's strength multiplier. </member> - <member name="light_indirect_energy" type="float" setter="set_param" getter="get_param"> - Secondary multiplier used with indirect light (light bounces). This works in baked light or GIProbe. + <member name="light_indirect_energy" type="float" setter="set_param" getter="get_param" default="1.0"> + Secondary multiplier used with indirect light (light bounces). This works on both [BakedLightmap] and [GIProbe]. </member> - <member name="light_negative" type="bool" setter="set_negative" getter="is_negative"> - If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. Default value: [code]false[/code]. + <member name="light_negative" type="bool" setter="set_negative" getter="is_negative" default="false"> + If [code]true[/code], the light's effect is reversed, darkening areas and casting bright shadows. </member> - <member name="light_specular" type="float" setter="set_param" getter="get_param"> + <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. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param"> - Used to adjust shadow appearance. Too small a value results in self shadowing, while too large a value causes shadows to separate from casters. Adjust as needed. + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.15"> + Used to adjust shadow appearance. Too small a value results in self-shadowing, while too large a value causes shadows to separate from casters. Adjust as needed. </member> - <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color"> + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 1 )"> The color of shadows cast by this light. </member> - <member name="shadow_contact" type="float" setter="set_param" getter="get_param"> + <member name="shadow_contact" type="float" setter="set_param" getter="get_param" default="0.0"> Attempts to reduce [member shadow_bias] gap. </member> - <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow"> - If [code]true[/code], the light will cast shadows. Default value: [code]false[/code]. + <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false"> + If [code]true[/code], the light will cast shadows. </member> - <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face"> + <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false"> </member> </members> <constants> @@ -86,13 +86,15 @@ Represents the size of the [enum Param] enum. </constant> <constant name="BAKE_DISABLED" value="0" enum="BakeMode"> - Light is ignored when baking. Note: hiding a light does [i]not[/i] affect baking. + Light is ignored when baking. + [b]Note:[/b] Hiding a light does [i]not[/i] affect baking. </constant> <constant name="BAKE_INDIRECT" value="1" enum="BakeMode"> - Only indirect lighting will be baked. Default value. + Only indirect lighting will be baked (default). </constant> <constant name="BAKE_ALL" value="2" enum="BakeMode"> - Both direct and indirect light will be baked. Note: you should hide the light if you don't want it to appear twice (dynamic and baked). + Both direct and indirect light will be baked. + [b]Note:[/b] You should hide the light if you don't want it to appear twice (dynamic and baked). </constant> </constants> </class> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index a83b48da88..88ad371983 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -4,7 +4,8 @@ Casts light in a 2D environment. </brief_description> <description> - Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). Note that Light2D can be used as a mask. + Casts light in a 2D environment. Light is defined by a (usually grayscale) texture, a color, an energy value, a mode (see constants), and various other parameters (range and shadows-related). + [b]Note:[/b] Light2D can also be used as a mask. </description> <tutorials> <link>http://docs.godotengine.org/en/latest/tutorials/2d/2d_lights_and_shadows.html</link> @@ -12,67 +13,67 @@ <methods> </methods> <members> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> The Light2D's [Color]. </member> - <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only"> - If [code]true[/code], Light2D will only appear when editing the scene. Default value: [code]false[/code]. + <member name="editor_only" type="bool" setter="set_editor_only" getter="is_editor_only" default="false"> + If [code]true[/code], Light2D will only appear when editing the scene. </member> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> - If [code]true[/code], Light2D will emit light. Default value: [code]true[/code]. + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> + If [code]true[/code], Light2D will emit light. </member> - <member name="energy" type="float" setter="set_energy" getter="get_energy"> + <member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0"> The Light2D's energy value. The larger the value, the stronger the light. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode"> - The Light2D's mode. See MODE_* constants for values. + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode" default="0"> + The Light2D's mode. See [code]MODE_*[/code] constants for values. </member> - <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset"> + <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> The offset of the Light2D's [code]texture[/code]. </member> - <member name="range_height" type="float" setter="set_height" getter="get_height"> + <member name="range_height" type="float" setter="set_height" getter="get_height" default="0.0"> The height of the Light2D. Used with 2D normal mapping. </member> - <member name="range_item_cull_mask" type="int" setter="set_item_cull_mask" getter="get_item_cull_mask"> + <member name="range_item_cull_mask" type="int" setter="set_item_cull_mask" getter="get_item_cull_mask" default="1"> The layer mask. Only objects with a matching mask will be affected by the Light2D. </member> - <member name="range_layer_max" type="int" setter="set_layer_range_max" getter="get_layer_range_max"> - Maximum layer value of objects that are affected by the Light2D. Default value: [code]0[/code]. + <member name="range_layer_max" type="int" setter="set_layer_range_max" getter="get_layer_range_max" default="0"> + Maximum layer value of objects that are affected by the Light2D. </member> - <member name="range_layer_min" type="int" setter="set_layer_range_min" getter="get_layer_range_min"> - Minimum layer value of objects that are affected by the Light2D. Default value: [code]0[/code]. + <member name="range_layer_min" type="int" setter="set_layer_range_min" getter="get_layer_range_min" default="0"> + Minimum layer value of objects that are affected by the Light2D. </member> - <member name="range_z_max" type="int" setter="set_z_range_max" getter="get_z_range_max"> - Maximum [code]z[/code] value of objects that are affected by the Light2D. Default value: [code]1024[/code]. + <member name="range_z_max" type="int" setter="set_z_range_max" getter="get_z_range_max" default="1024"> + Maximum [code]z[/code] value of objects that are affected by the Light2D. </member> - <member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min"> - Minimum [code]z[/code] value of objects that are affected by the Light2D. Default value: [code]-1024[/code]. + <member name="range_z_min" type="int" setter="set_z_range_min" getter="get_z_range_min" default="-1024"> + Minimum [code]z[/code] value of objects that are affected by the Light2D. </member> - <member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size"> - Shadow buffer size. Default value: [code]2048[/code]. + <member name="shadow_buffer_size" type="int" setter="set_shadow_buffer_size" getter="get_shadow_buffer_size" default="2048"> + Shadow buffer size. </member> - <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color"> + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 0 )"> [Color] of shadows cast by the Light2D. </member> - <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled"> - If [code]true[/code], the Light2D will cast shadows. Default value: [code]false[/code]. + <member name="shadow_enabled" type="bool" setter="set_shadow_enabled" getter="is_shadow_enabled" default="false"> + If [code]true[/code], the Light2D will cast shadows. </member> - <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter"> - Shadow filter type. Use [enum ShadowFilter] constants as values. Default value: [constant SHADOW_FILTER_NONE]. + <member name="shadow_filter" type="int" setter="set_shadow_filter" getter="get_shadow_filter" enum="Light2D.ShadowFilter" default="0"> + Shadow filter type. See [enum ShadowFilter] for possible values. </member> - <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth"> + <member name="shadow_filter_smooth" type="float" setter="set_shadow_smooth" getter="get_shadow_smooth" default="0.0"> Smoothing value for shadows. </member> - <member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length"> + <member name="shadow_gradient_length" type="float" setter="set_shadow_gradient_length" getter="get_shadow_gradient_length" default="0.0"> Smooth shadow gradient length. </member> - <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask"> + <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask" default="1"> The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> [Texture] used for the Light2D's appearance. </member> - <member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale"> + <member name="texture_scale" type="float" setter="set_texture_scale" getter="get_texture_scale" default="1.0"> The [code]texture[/code]'s scale factor. </member> </members> diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml index a621937eb3..55978aa0a1 100644 --- a/doc/classes/LightOccluder2D.xml +++ b/doc/classes/LightOccluder2D.xml @@ -12,10 +12,10 @@ <methods> </methods> <members> - <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask"> + <member name="light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1"> The LightOccluder2D's light mask. The LightOccluder2D will cast shadows only from Light2D(s) that have the same light mask(s). </member> - <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon"> + <member name="occluder" type="OccluderPolygon2D" setter="set_occluder_polygon" getter="get_occluder_polygon" default="null"> The [OccluderPolygon2D] used to compute the shadow. </member> </members> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 8a13e044f0..b627ae7344 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -17,7 +17,7 @@ <argument index="1" name="at_position" type="int" default="-1"> </argument> <description> - Add a point at the [code]position[/code]. Appends the point at the end of the line. + Adds a point at the [code]position[/code]. Appends the point at the end of the line. If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position < 0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> @@ -50,7 +50,7 @@ <argument index="0" name="i" type="int"> </argument> <description> - Remove the point at index [code]i[/code] from the line. + Removes the point at index [code]i[/code] from the line. </description> </method> <method name="set_point_position"> @@ -66,39 +66,42 @@ </method> </methods> <members> - <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode"> - Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. Default value: [constant LINE_CAP_NONE]. + <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0"> + Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. </member> - <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color"> + <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 0.4, 0.5, 1, 1 )"> The line's color. Will not be used if a gradient is set. </member> - <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode"> - Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. Default value: [constant LINE_CAP_NONE]. + <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0"> + Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. </member> - <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> + <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient" default="null"> The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. </member> - <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode"> + <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode" default="0"> The style for the points between the start and the end. </member> - <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points"> + <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points" default="PoolVector2Array( )"> The points that form the lines. The line is drawn between every point set in this array. </member> - <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision"> + <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision" default="8"> The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round. </member> - <member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit"> + <member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit" default="2.0"> The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [constant LINE_JOINT_SHARP]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. </member> - <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode"> - The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. Default value: [constant LINE_TEXTURE_NONE]. + <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0"> + The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. </member> - <member name="width" type="float" setter="set_width" getter="get_width"> + <member name="width" type="float" setter="set_width" getter="get_width" default="10.0"> The line's width. </member> + <member name="width_curve" type="Curve" setter="set_curve" getter="get_curve"> + The line's width varies with the curve. The original width is simply multiply by the value of the Curve. + </member> </members> <constants> <constant name="LINE_JOINT_SHARP" value="0" enum="LineJointMode"> @@ -111,7 +114,7 @@ The line's joints will be rounded. </constant> <constant name="LINE_CAP_NONE" value="0" enum="LineCapMode"> - Don't have a line cap. + Don't draw a line cap. </constant> <constant name="LINE_CAP_BOX" value="1" enum="LineCapMode"> Draws the line cap as a box. @@ -123,10 +126,10 @@ Takes the left pixels of the texture and renders it over the whole line. </constant> <constant name="LINE_TEXTURE_TILE" value="1" enum="LineTextureMode"> - Tiles the texture over the line. The texture need to be imported with Repeat Enabled for it to work properly. + Tiles the texture over the line. The texture must be imported with [b]Repeat[/b] enabled for it to work properly. </constant> <constant name="LINE_TEXTURE_STRETCH" value="2" enum="LineTextureMode"> - Stretches the texture across the line. Import the texture with Repeat Disabled for best results. + Stretches the texture across the line. Import the texture with [b]Repeat[/b] disabled for best results. </constant> </constants> </class> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 44043a5a16..482ec28c56 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -54,7 +54,7 @@ <argument index="0" name="option" type="int"> </argument> <description> - Executes a given action as defined in the MENU_* enum. + Executes a given action as defined in the[code]MENU_*[/code] enum. </description> </method> <method name="select"> @@ -65,12 +65,12 @@ <argument index="1" name="to" type="int" default="-1"> </argument> <description> - Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default [code]from[/code] is at the beginning and [code]to[/code] at the end. + Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end. [codeblock] text = "Welcome" - select() # Welcome - select(4) # ome - select(2, 5) # lco + select() # Will select "Welcome" + select(4) # Will select "ome" + select(2, 5) # Will select "lco" [/codeblock] </description> </method> @@ -83,49 +83,49 @@ </method> </methods> <members> - <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align"> - Text alignment as defined in the ALIGN_* enum. + <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0"> + Text alignment as defined in the [code]ALIGN_*[/code] enum. </member> - <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> + <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> If [code]true[/code], the caret (visual cursor) blinks. </member> - <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed"> + <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> Duration (in seconds) of a caret's blinking cycle. </member> - <member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position"> + <member name="caret_position" type="int" setter="set_cursor_position" getter="get_cursor_position" default="0"> The cursor's position inside the [LineEdit]. When set, the text may scroll to accommodate it. </member> - <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled"> + <member name="clear_button_enabled" type="bool" setter="set_clear_button_enabled" getter="is_clear_button_enabled" default="false"> If [code]true[/code], the [LineEdit] will show a clear button if [code]text[/code] is not empty. </member> - <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> - If [code]true[/code], the context menu will appear when right clicked. + <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true"> + If [code]true[/code], the context menu will appear when right-clicked. </member> - <member name="editable" type="bool" setter="set_editable" getter="is_editable"> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> If [code]false[/code], existing text cannot be modified and new text cannot be added. </member> - <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length"> + <member name="expand_to_text_length" type="bool" setter="set_expand_to_text_length" getter="get_expand_to_text_length" default="false"> If [code]true[/code], the [LineEdit] width will increase to stay longer than the [member text]. It will [b]not[/b] compress if the [member text] is shortened. </member> - <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="2"> Defines how the [LineEdit] can grab focus (Keyboard and mouse, only keyboard, or none). See [enum Control.FocusMode] for details. </member> - <member name="max_length" type="int" setter="set_max_length" getter="get_max_length"> + <member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0"> Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. </member> - <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha"> + <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha" default="0.6"> Opacity of the [member placeholder_text]. From [code]0[/code] to [code]1[/code]. </member> - <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder"> + <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default=""""> Text shown when the [LineEdit] is empty. It is [b]not[/b] the [LineEdit]'s default value (see [member text]). </member> - <member name="secret" type="bool" setter="set_secret" getter="is_secret"> + <member name="secret" type="bool" setter="set_secret" getter="is_secret" default="false"> If [code]true[/code], every character is replaced with the secret character (see [member secret_character]). </member> - <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character"> + <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default=""*""> The character to use to mask secret input (defaults to "*"). Only a single character can be used as the secret character. </member> - <member name="text" type="String" setter="set_text" getter="get_text"> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> String value of the [LineEdit]. </member> </members> @@ -147,13 +147,13 @@ </signals> <constants> <constant name="ALIGN_LEFT" value="0" enum="Align"> - Aligns the text on the left hand side of the [LineEdit]. + Aligns the text on the left-hand side of the [LineEdit]. </constant> <constant name="ALIGN_CENTER" value="1" enum="Align"> Centers the text in the middle of the [LineEdit]. </constant> <constant name="ALIGN_RIGHT" value="2" enum="Align"> - Aligns the text on the right hand side of the [LineEdit]. + Aligns the text on the right-hand side of the [LineEdit]. </constant> <constant name="ALIGN_FILL" value="3" enum="Align"> Stretches whitespaces to fit the [LineEdit]'s width. @@ -187,29 +187,29 @@ <theme_items> <theme_item name="clear" type="Texture"> </theme_item> - <theme_item name="clear_button_color" type="Color"> + <theme_item name="clear_button_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="clear_button_color_pressed" type="Color"> + <theme_item name="clear_button_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="cursor_color" type="Color"> + <theme_item name="cursor_color" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_selected" type="Color"> + <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="font_color_uneditable" type="Color"> + <theme_item name="font_color_uneditable" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 0.5 )"> </theme_item> - <theme_item name="minimum_spaces" type="int"> + <theme_item name="minimum_spaces" type="int" default="12"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> <theme_item name="read_only" type="StyleBox"> </theme_item> - <theme_item name="selection_color" type="Color"> + <theme_item name="selection_color" type="Color" default="Color( 0.490196, 0.490196, 0.490196, 1 )"> </theme_item> </theme_items> </class> diff --git a/doc/classes/LineShape2D.xml b/doc/classes/LineShape2D.xml index 94409cbd83..fbab1dbe3c 100644 --- a/doc/classes/LineShape2D.xml +++ b/doc/classes/LineShape2D.xml @@ -4,17 +4,17 @@ Line shape for 2D collisions. </brief_description> <description> - Line shape for 2D collisions. It works like a 2D plane and will not allow any body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. + Line shape for 2D collisions. It works like a 2D plane and will not allow any physics body to go to the negative side. Not recommended for rigid bodies, and usually not recommended for static bodies either because it forces checks against it on every frame. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="d" type="float" setter="set_d" getter="get_d"> + <member name="d" type="float" setter="set_d" getter="get_d" default="0.0"> The line's distance from the origin. </member> - <member name="normal" type="Vector2" setter="set_normal" getter="get_normal"> + <member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2( 0, -1 )"> The line's normal. </member> </members> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index ef9f785f0f..5dfb55a8dd 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -4,21 +4,21 @@ Simple button used to represent a link to some resource. </brief_description> <description> - This kind of buttons are primarily used when the interaction with the button causes a context change (like linking to a web page). + This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page). </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="text" type="String" setter="set_text" getter="get_text"> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> </member> - <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode"> + <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode" default="0"> </member> </members> <constants> <constant name="UNDERLINE_MODE_ALWAYS" value="0" enum="UnderlineMode"> - The LinkButton will always show an underline at the bottom of its text + The LinkButton will always show an underline at the bottom of its text. </constant> <constant name="UNDERLINE_MODE_ON_HOVER" value="1" enum="UnderlineMode"> The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it. @@ -32,13 +32,13 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="underline_spacing" type="int"> + <theme_item name="underline_spacing" type="int" default="2"> </theme_item> </theme_items> </class> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 312b2ff692..f5bf12a876 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -5,7 +5,7 @@ </brief_description> <description> [MainLoop] is the abstract base class for a Godot project's game loop. It in inherited by [SceneTree], which is the default game loop implementation used in Godot projects, though it is also possible to write and use one's own [MainLoop] subclass instead of the scene tree. - Upon application start, a [MainLoop] implementation has to be provided to the OS, or the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation. + Upon the application start, a [MainLoop] implementation must be provided to the OS; otherwise, the application will exit. This happens automatically (and a [SceneTree] is created) unless a main [Script] is provided from the command line (with e.g. [code]godot -s my_loop.gd[/code], which should then be a [MainLoop] implementation. Here is an example script implementing a simple [MainLoop]: [codeblock] extends MainLoop diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml index 3ea3204e56..08e8098a75 100644 --- a/doc/classes/MarginContainer.xml +++ b/doc/classes/MarginContainer.xml @@ -5,7 +5,7 @@ </brief_description> <description> Adds a top, left, bottom, and right margin to all [Control] nodes that are direct children of the container. To control the [MarginContainer]'s margin, use the [code]margin_*[/code] theme properties listed below. - [b]Note:[/b] Be careful, [Control] margin values are different than the constant margin values. If you want to change the custom margin values of the [MarginContainer] by code you should use the following examples: + [b]Note:[/b] Be careful, [Control] margin values are different than the constant margin values. If you want to change the custom margin values of the [MarginContainer] by code, you should use the following examples: [codeblock] var margin_value = 100 set("custom_constants/margin_top", margin_value) @@ -21,16 +21,16 @@ <constants> </constants> <theme_items> - <theme_item name="margin_bottom" type="int"> + <theme_item name="margin_bottom" type="int" default="0"> All direct children of [MarginContainer] will have a bottom margin of [code]margin_bottom[/code] pixels. </theme_item> - <theme_item name="margin_left" type="int"> + <theme_item name="margin_left" type="int" default="0"> All direct children of [MarginContainer] will have a left margin of [code]margin_left[/code] pixels. </theme_item> - <theme_item name="margin_right" type="int"> + <theme_item name="margin_right" type="int" default="0"> All direct children of [MarginContainer] will have a right margin of [code]margin_right[/code] pixels. </theme_item> - <theme_item name="margin_top" type="int"> + <theme_item name="margin_top" type="int" default="0"> All direct children of [MarginContainer] will have a top margin of [code]margin_top[/code] pixels. </theme_item> </theme_items> diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml index c7118a4d9f..083a3163ce 100644 --- a/doc/classes/Marshalls.xml +++ b/doc/classes/Marshalls.xml @@ -15,7 +15,7 @@ <argument index="0" name="base64_str" type="String"> </argument> <description> - Returns [PoolByteArray] of a given base64 encoded String. + Returns a decoded [PoolByteArray] corresponding to the Base64-encoded string [code]base64_str[/code]. </description> </method> <method name="base64_to_utf8"> @@ -24,7 +24,7 @@ <argument index="0" name="base64_str" type="String"> </argument> <description> - Returns utf8 String of a given base64 encoded String. + Returns a decoded string corresponding to the Base64-encoded string [code]base64_str[/code]. </description> </method> <method name="base64_to_variant"> @@ -35,8 +35,8 @@ <argument index="1" name="allow_objects" type="bool" default="false"> </argument> <description> - Returns [Variant] of a given base64 encoded String. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). + Returns a decoded [Variant] corresponding to the Base64-encoded string [code]base64_str[/code]. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. + [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="raw_to_base64"> @@ -45,7 +45,7 @@ <argument index="0" name="array" type="PoolByteArray"> </argument> <description> - Returns base64 encoded String of a given [PoolByteArray]. + Returns a Base64-encoded string of a given [PoolByteArray]. </description> </method> <method name="utf8_to_base64"> @@ -54,7 +54,7 @@ <argument index="0" name="utf8_str" type="String"> </argument> <description> - Returns base64 encoded String of a given utf8 String. + Returns a Base64-encoded string of the UTF-8 string [code]utf8_str[/code]. </description> </method> <method name="variant_to_base64"> @@ -65,7 +65,7 @@ <argument index="1" name="full_objects" type="bool" default="false"> </argument> <description> - Returns base64 encoded String of a given [Variant]. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code). + Returns a Base64-encoded string of the [Variant] [code]variant[/code]. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). </description> </method> </methods> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index 22da012022..80d8b674f3 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -11,9 +11,9 @@ <methods> </methods> <members> - <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass"> + <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass" default="null"> </member> - <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority"> + <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> </member> </members> <constants> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 1043aa1087..609bf6317a 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -26,7 +26,7 @@ </method> </methods> <members> - <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover"> + <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="false"> If [code]true[/code], when the cursor hovers above another MenuButton within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current MenuButton and open the other one. </member> </members> @@ -46,17 +46,17 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 1, 1, 1, 0.3 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> <theme_item name="hover" type="StyleBox"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="3"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index d2911fd299..f7b3b0d7ea 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Mesh" inherits="Resource" category="Core" version="3.2"> <brief_description> - A [Resource] that contains vertex-array based geometry. + A [Resource] that contains vertex array-based geometry. </brief_description> <description> - Mesh is a type of [Resource] that contains vertex-array based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. + Mesh is a type of [Resource] that contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. </description> <tutorials> </tutorials> @@ -22,7 +22,8 @@ <argument index="0" name="margin" type="float"> </argument> <description> - Calculate an outline mesh at a defined offset (margin) from the original mesh. Note: Typically returns the vertices in reverse order (e.g. clockwise to anti-clockwise). + Calculate an outline mesh at a defined offset (margin) from the original mesh. + [b]Note:[/b] This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise). </description> </method> <method name="create_trimesh_shape" qualifiers="const"> @@ -88,12 +89,12 @@ <argument index="1" name="material" type="Material"> </argument> <description> - Set a [Material] for a given surface. Surface will be rendered using this material. + Sets a [Material] for a given surface. Surface will be rendered using this material. </description> </method> </methods> <members> - <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint"> + <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index 5cee9915ff..22c31306bf 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -4,9 +4,9 @@ Helper tool to access and edit [Mesh] data. </brief_description> <description> - The MeshDataTool provides access to individual vertices in a [Mesh]. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. - To use the MeshDataTool, load a mesh with [method create_from_surface]. When you are finished editing the data commit the data to a mesh with [method commit_to_surface]. - Below is an example of how the MeshDataTool may be used. + MeshDataTool provides access to individual vertices in a [Mesh]. It allows users to read and edit vertex data of meshes. It also creates an array of faces and edges. + To use MeshDataTool, load a mesh with [method create_from_surface]. When you are finished editing the data commit the data to a mesh with [method commit_to_surface]. + Below is an example of how MeshDataTool may be used. [codeblock] var mdt = MeshDataTool.new() mdt.create_from_surface(mesh, 0) @@ -111,7 +111,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns meta data associated with given face. + Returns the metadata associated with the given face. </description> </method> <method name="get_face_normal" qualifiers="const"> @@ -120,7 +120,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Calculates and returns face normal of given face. + Calculates and returns the face normal of the given face. </description> </method> <method name="get_face_vertex" qualifiers="const"> @@ -131,7 +131,7 @@ <argument index="1" name="vertex" type="int"> </argument> <description> - Returns specified vertex of given face. + Returns the specified vertex of the given face. Vertex argument must be 2 or less because faces contain three vertices. </description> </method> @@ -139,15 +139,15 @@ <return type="int"> </return> <description> - Returns format of [Mesh]. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant ArrayMesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant ArrayMesh.ARRAY_FORMAT_NORMAL] is [code]2[/code]. - For list of format flags see [enum ArrayMesh.ArrayFormat]. + Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant ArrayMesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant ArrayMesh.ARRAY_FORMAT_NORMAL] is [code]2[/code]. + See [enum ArrayMesh.ArrayFormat] for a list of format flags. </description> </method> <method name="get_material" qualifiers="const"> <return type="Material"> </return> <description> - Returns material assigned to the [Mesh]. + Returns the material assigned to the [Mesh]. </description> </method> <method name="get_vertex" qualifiers="const"> @@ -190,7 +190,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns array of edges that share given vertex. + Returns an array of edges that share the given vertex. </description> </method> <method name="get_vertex_faces" qualifiers="const"> @@ -199,7 +199,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns array of faces that share given vertex. + Returns an array of faces that share the given vertex. </description> </method> <method name="get_vertex_meta" qualifiers="const"> @@ -208,7 +208,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns meta data associated with given vertex. + Returns the metadata associated with the given vertex. </description> </method> <method name="get_vertex_normal" qualifiers="const"> @@ -217,7 +217,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns normal of given vertex. + Returns the normal of the given vertex. </description> </method> <method name="get_vertex_tangent" qualifiers="const"> @@ -226,7 +226,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns tangent of given vertex. + Returns the tangent of the given vertex. </description> </method> <method name="get_vertex_uv" qualifiers="const"> @@ -235,7 +235,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns UV of given vertex. + Returns the UV of the given vertex. </description> </method> <method name="get_vertex_uv2" qualifiers="const"> @@ -244,7 +244,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns UV2 of given vertex. + Returns the UV2 of the given vertex. </description> </method> <method name="get_vertex_weights" qualifiers="const"> @@ -253,7 +253,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns bone weights of given vertex. + Returns bone weights of the given vertex. </description> </method> <method name="set_edge_meta"> @@ -264,7 +264,7 @@ <argument index="1" name="meta" type="Variant"> </argument> <description> - Sets the meta data of given edge. + Sets the metadata of the given edge. </description> </method> <method name="set_face_meta"> @@ -275,7 +275,7 @@ <argument index="1" name="meta" type="Variant"> </argument> <description> - Sets the meta data of given face. + Sets the metadata of the given face. </description> </method> <method name="set_material"> @@ -284,7 +284,7 @@ <argument index="0" name="material" type="Material"> </argument> <description> - Sets the material to be used by newly constructed [Mesh]. + Sets the material to be used by newly-constructed [Mesh]. </description> </method> <method name="set_vertex"> @@ -295,7 +295,7 @@ <argument index="1" name="vertex" type="Vector3"> </argument> <description> - Sets the position of given vertex. + Sets the position of the given vertex. </description> </method> <method name="set_vertex_bones"> @@ -306,7 +306,7 @@ <argument index="1" name="bones" type="PoolIntArray"> </argument> <description> - Sets the bones of given vertex. + Sets the bones of the given vertex. </description> </method> <method name="set_vertex_color"> @@ -317,7 +317,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Sets the color of given vertex. + Sets the color of the given vertex. </description> </method> <method name="set_vertex_meta"> @@ -328,7 +328,7 @@ <argument index="1" name="meta" type="Variant"> </argument> <description> - Sets the meta data associated with given vertex. + Sets the metadata associated with the given vertex. </description> </method> <method name="set_vertex_normal"> @@ -339,7 +339,7 @@ <argument index="1" name="normal" type="Vector3"> </argument> <description> - Sets the normal of given vertex. + Sets the normal of the given vertex. </description> </method> <method name="set_vertex_tangent"> @@ -350,7 +350,7 @@ <argument index="1" name="tangent" type="Plane"> </argument> <description> - Sets the tangent of given vertex. + Sets the tangent of the given vertex. </description> </method> <method name="set_vertex_uv"> @@ -361,7 +361,7 @@ <argument index="1" name="uv" type="Vector2"> </argument> <description> - Sets the UV of given vertex. + Sets the UV of the given vertex. </description> </method> <method name="set_vertex_uv2"> @@ -372,7 +372,7 @@ <argument index="1" name="uv2" type="Vector2"> </argument> <description> - Sets the UV2 of given vertex. + Sets the UV2 of the given vertex. </description> </method> <method name="set_vertex_weights"> @@ -383,7 +383,7 @@ <argument index="1" name="weights" type="PoolRealArray"> </argument> <description> - Sets the bone weights of given vertex. + Sets the bone weights of the given vertex. </description> </method> </methods> diff --git a/doc/classes/MeshInstance.xml b/doc/classes/MeshInstance.xml index f5868f51cb..e7dbb8e017 100644 --- a/doc/classes/MeshInstance.xml +++ b/doc/classes/MeshInstance.xml @@ -59,10 +59,10 @@ </method> </methods> <members> - <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" default="null"> The [Mesh] resource for the instance. </member> - <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path"> + <member name="skeleton" type="NodePath" setter="set_skeleton_path" getter="get_skeleton_path" default="NodePath("..")"> [NodePath] to the [Skeleton] associated with the instance. </member> </members> diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 4b38b9aa96..a44b009fb6 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -12,13 +12,13 @@ <methods> </methods> <members> - <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" default="null"> The [Mesh] that will be drawn by the [MeshInstance2D]. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" default="null"> The normal map that will be used if using the default [CanvasItemMaterial]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. </member> </members> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index ad5824640d..041d1fa80d 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -4,7 +4,7 @@ Library of meshes. </brief_description> <description> - Library of meshes. Contains a list of [Mesh] resources, each with name and ID. Useful for GridMap or painting Terrain. + Library of meshes. Contains a list of [Mesh] resources, each with name and ID. This resource is used in [GridMap]. </description> <tutorials> </tutorials> @@ -94,7 +94,7 @@ <return type="int"> </return> <description> - Get an unused id for a new item. + Gets an unused id for a new item. </description> </method> <method name="remove_item"> @@ -103,7 +103,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Remove the item. + Removes the item. </description> </method> <method name="set_item_mesh"> @@ -114,7 +114,7 @@ <argument index="1" name="mesh" type="Mesh"> </argument> <description> - Set the mesh of the item. + Sets the mesh of the item. </description> </method> <method name="set_item_name"> @@ -125,7 +125,7 @@ <argument index="1" name="name" type="String"> </argument> <description> - Set the name of the item. + Sets the name of the item. </description> </method> <method name="set_item_navmesh"> diff --git a/doc/classes/MeshTexture.xml b/doc/classes/MeshTexture.xml index d305cca482..4ec8268cc5 100644 --- a/doc/classes/MeshTexture.xml +++ b/doc/classes/MeshTexture.xml @@ -11,14 +11,14 @@ <methods> </methods> <members> - <member name="base_texture" type="Texture" setter="set_base_texture" getter="get_base_texture"> - Set the base texture that the Mesh will use to draw. + <member name="base_texture" type="Texture" setter="set_base_texture" getter="get_base_texture" default="null"> + Sets the base texture that the Mesh will use to draw. </member> - <member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size"> - Set the size of the image, needed for reference. + <member name="image_size" type="Vector2" setter="set_image_size" getter="get_image_size" default="Vector2( 0, 0 )"> + Sets the size of the image, needed for reference. </member> - <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> - Set the mesh used to draw. It must be a mesh using 2D vertices. + <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" default="null"> + Sets the mesh used to draw. It must be a mesh using 2D vertices. </member> </members> <constants> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 0784fc3a42..295f23a92c 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="MultiMesh" inherits="Resource" category="Core" version="3.2"> <brief_description> - Provides high performance mesh instancing. + Provides high-performance mesh instancing. </brief_description> <description> - MultiMesh provides low level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow because each object is submitted to the GPU to be drawn individually. - MultiMesh is much faster because it can draw thousands of instances with a single draw call, resulting in less API overhead. + MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance] nodes can be slow, since each object is submitted to the GPU then drawn individually. + MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always rendered (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user. </description> @@ -17,7 +17,7 @@ <return type="AABB"> </return> <description> - Returns the visibility AABB. + Returns the visibility axis-aligned bounding box. </description> </method> <method name="get_instance_color" qualifiers="const"> @@ -26,7 +26,7 @@ <argument index="0" name="instance" type="int"> </argument> <description> - Get the color of a specific instance. + Gets a specific instance's color. </description> </method> <method name="get_instance_custom_data" qualifiers="const"> @@ -62,9 +62,9 @@ <argument index="0" name="array" type="PoolRealArray"> </argument> <description> - Set all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. + Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc... - [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, COLOR_8BIT / CUSTOM_DATA_8BIT is stored as 1 float (4 bytes as is) and COLOR_FLOAT / CUSTOM_DATA_FLOAT is stored as 4 floats. + [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats. </description> </method> <method name="set_instance_color"> @@ -75,7 +75,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Set the color of a specific instance. + Sets the color of a specific instance. For the color to take effect, ensure that [member color_format] is non-[code]null[/code] on the [MultiMesh] and [member SpatialMaterial.vertex_color_use_as_albedo] is [code]true[/code] on the material. </description> </method> @@ -87,7 +87,7 @@ <argument index="1" name="custom_data" type="Color"> </argument> <description> - Set custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers. + Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers. </description> </method> <method name="set_instance_transform"> @@ -98,7 +98,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> - Set the [Transform] for a specific instance. + Sets the [Transform] for a specific instance. </description> </method> <method name="set_instance_transform_2d"> @@ -109,27 +109,27 @@ <argument index="1" name="transform" type="Transform2D"> </argument> <description> - Set the [Transform2D] for a specific instance. + Sets the [Transform2D] for a specific instance. </description> </method> </methods> <members> - <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat"> + <member name="color_format" type="int" setter="set_color_format" getter="get_color_format" enum="MultiMesh.ColorFormat" default="0"> Format of colors in color array that gets passed to shader. </member> - <member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat"> + <member name="custom_data_format" type="int" setter="set_custom_data_format" getter="get_custom_data_format" enum="MultiMesh.CustomDataFormat" default="0"> Format of custom data in custom data array that gets passed to shader. </member> - <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count"> - Number of instances that will get drawn. This clears and (re)sizes the buffers. By default all instances are drawn but you can limit this with [member visible_instance_count]. + <member name="instance_count" type="int" setter="set_instance_count" getter="get_instance_count" default="0"> + Number of instances that will get drawn. This clears and (re)sizes the buffers. By default, all instances are drawn but you can limit this with [member visible_instance_count]. </member> - <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" default="null"> Mesh to be drawn. </member> - <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat"> + <member name="transform_format" type="int" setter="set_transform_format" getter="get_transform_format" enum="MultiMesh.TransformFormat" default="0"> Format of transform used to transform mesh, either 2D or 3D. </member> - <member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count"> + <member name="visible_instance_count" type="int" setter="set_visible_instance_count" getter="get_visible_instance_count" default="-1"> Limits the number of instances drawn, -1 draws all instances. Changing this does not change the sizes of the buffers. </member> </members> diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml index 70834d6085..5e8cb83a39 100644 --- a/doc/classes/MultiMeshInstance.xml +++ b/doc/classes/MultiMeshInstance.xml @@ -5,7 +5,7 @@ </brief_description> <description> [MultiMeshInstance] is a specialized node to instance [GeometryInstance]s based on a [MultiMesh] resource. - This is useful to optimize the rendering of a high amount of instances of a given mesh (for example tree in a forest or grass strands). + This is useful to optimize the rendering of a high amount of instances of a given mesh (for example trees in a forest or grass strands). </description> <tutorials> <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> @@ -14,7 +14,7 @@ <methods> </methods> <members> - <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> + <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh" default="null"> The [MultiMesh] resource that will be used and shared among all instances of the [MultiMeshInstance]. </member> </members> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml index 8509986c3c..28cee1aeba 100644 --- a/doc/classes/MultiMeshInstance2D.xml +++ b/doc/classes/MultiMeshInstance2D.xml @@ -12,13 +12,13 @@ <methods> </methods> <members> - <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> + <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh" default="null"> The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" default="null"> The normal map that will be used if using the default [CanvasItemMaterial]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. </member> </members> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index b67d83efec..5f8c7ed120 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="MultiplayerAPI" inherits="Reference" category="Core" version="3.2"> <brief_description> - High Level Multiplayer API. + High-level multiplayer API. </brief_description> <description> - This class implements most of the logic behind the high level multiplayer API. + This class implements most of the logic behind the high-level multiplayer API. By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene. </description> @@ -37,7 +37,7 @@ </return> <description> Returns the sender's peer ID for the RPC currently being executed. - NOTE: If not inside an RPC this method will return 0. + [b]Note:[/b] If not inside an RPC this method will return 0. </description> </method> <method name="has_network_peer" qualifiers="const"> @@ -58,8 +58,8 @@ <return type="void"> </return> <description> - Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default [SceneTree] will poll its MultiplayerAPI for you. - NOTE: This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]). + Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default, [SceneTree] will poll its MultiplayerAPI for you. + [b]Note:[/b] This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]). </description> </method> <method name="send_bytes"> @@ -87,40 +87,40 @@ </method> </methods> <members> - <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed"> - If [code]true[/code] (or if the [member network_peer] [member PacketPeer.allow_object_decoding] the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). + <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false"> + If [code]true[/code] (or if the [member network_peer] has [member PacketPeer.allow_object_decoding] set to [code]true[/code]), the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. + [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. </member> - <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections"> + <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections. </member> </members> <signals> <signal name="connected_to_server"> <description> - Emitted whenever this MultiplayerAPI's [member network_peer] successfully connected to a server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member network_peer] successfully connected to a server. Only emitted on clients. </description> </signal> <signal name="connection_failed"> <description> - Emitted whenever this MultiplayerAPI's [member network_peer] fails to establish a connection to a server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member network_peer] fails to establish a connection to a server. Only emitted on clients. </description> </signal> <signal name="network_peer_connected"> <argument index="0" name="id" type="int"> </argument> <description> - Emitted whenever this MultiplayerAPI's [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). + Emitted when this MultiplayerAPI's [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). </description> </signal> <signal name="network_peer_disconnected"> <argument index="0" name="id" type="int"> </argument> <description> - Emitted whenever this MultiplayerAPI's [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. + Emitted when this MultiplayerAPI's [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. </description> </signal> <signal name="network_peer_packet"> @@ -129,12 +129,12 @@ <argument index="1" name="packet" type="PoolByteArray"> </argument> <description> - Emitted whenever this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. + Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. </description> </signal> <signal name="server_disconnected"> <description> - Emitted whenever this MultiplayerAPI's [member network_peer] disconnects from server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member network_peer] disconnects from server. Only emitted on clients. </description> </signal> </signals> @@ -152,13 +152,13 @@ Used with [method Node.rpc_config] or [method Node.rset_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. </constant> <constant name="RPC_MODE_SLAVE" value="3" enum="RPCMode"> - Deprecated. Use [constant RPC_MODE_PUPPET] instead. Analogous to the [code]slave[/code] keyword. + [i]Deprecated.[/i] Use [constant RPC_MODE_PUPPET] instead. Analogous to the [code]slave[/code] keyword. </constant> <constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode"> Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword. </constant> <constant name="RPC_MODE_SYNC" value="4" enum="RPCMode"> - Deprecated. Use [constant RPC_MODE_REMOTESYNC] instead. Analogous to the [code]sync[/code] keyword. + [i]Deprecated.[/i] Use [constant RPC_MODE_REMOTESYNC] instead. Analogous to the [code]sync[/code] keyword. </constant> <constant name="RPC_MODE_MASTERSYNC" value="5" enum="RPCMode"> Behave like [constant RPC_MODE_MASTER] but also make the call or property change locally. Analogous to the [code]mastersync[/code] keyword. diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index 2f41e100fc..793696321b 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Mutex" inherits="Reference" category="Core" version="3.2"> <brief_description> - A synchronization Mutex. + A synchronization mutex (mutual exclusion). </brief_description> <description> - A synchronization Mutex. Element used to synchronize multiple [Thread]s. Basically a binary [Semaphore]. Guarantees that only one thread can ever acquire this lock at a time. Can be used to protect a critical section. Be careful to avoid deadlocks. + A synchronization mutex (mutual exclusion). This is used to synchronize multiple [Thread]s, and is equivalent to a binary [Semaphore]. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. </description> <tutorials> </tutorials> @@ -13,21 +13,21 @@ <return type="void"> </return> <description> - Lock this [Mutex], blocks until it is unlocked by the current owner. + Locks this [Mutex], blocks until it is unlocked by the current owner. </description> </method> <method name="try_lock"> <return type="int" enum="Error"> </return> <description> - Try locking this [Mutex], does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise. + Tries locking this [Mutex], but does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise. </description> </method> <method name="unlock"> <return type="void"> </return> <description> - Unlock this [Mutex], leaving it to other threads. + Unlocks this [Mutex], leaving it to other threads. </description> </method> </methods> diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index f0ae3fef99..58b7d1255e 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -4,7 +4,7 @@ Mesh-based navigation and pathfinding node. </brief_description> <description> - Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default these will be automatically collected from child [NavigationMeshInstance] nodes, but they can also be added on the fly with [method navmesh_add]. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. + Provides navigation and pathfinding within a collection of [NavigationMesh]es. By default, these will be automatically collected from child [NavigationMeshInstance] nodes, but they can also be added on the fly with [method navmesh_add]. In addition to basic pathfinding, this class also assists with aligning navigation agents with the meshes they are navigating on. </description> <tutorials> </tutorials> @@ -97,8 +97,8 @@ </method> </methods> <members> - <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector"> - Defines which direction is up. By default this is [code](0, 1, 0)[/code], which is the world up direction. + <member name="up_vector" type="Vector3" setter="set_up_vector" getter="get_up_vector" default="Vector3( 0, 1, 0 )"> + Defines which direction is up. By default, this is [code](0, 1, 0)[/code], which is the world's "up" direction. </member> </members> <constants> diff --git a/doc/classes/Navigation2D.xml b/doc/classes/Navigation2D.xml index 67b5d72182..ea1b992d79 100644 --- a/doc/classes/Navigation2D.xml +++ b/doc/classes/Navigation2D.xml @@ -4,7 +4,7 @@ 2D navigation and pathfinding node. </brief_description> <description> - Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. By default these are automatically collected from child [NavigationPolygonInstance] nodes, but they can also be added on the fly with [method navpoly_add]. + Navigation2D provides navigation and pathfinding within a 2D area, specified as a collection of [NavigationPolygon] resources. By default, these are automatically collected from child [NavigationPolygonInstance] nodes, but they can also be added on the fly with [method navpoly_add]. </description> <tutorials> </tutorials> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 79ad7f63ae..f6c7a7d1b5 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -77,43 +77,43 @@ </method> </methods> <members> - <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height"> + <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="2.0"> </member> - <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb"> + <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.9"> </member> - <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope"> + <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0"> </member> - <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius"> + <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.6"> </member> - <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height"> + <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.2"> </member> - <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size"> + <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> </member> - <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance"> + <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0"> </member> - <member name="detail/sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error"> + <member name="detail/sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="1.0"> </member> - <member name="edge/max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error"> + <member name="edge/max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3"> </member> - <member name="edge/max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length"> + <member name="edge/max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="12.0"> </member> - <member name="filter/filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans"> + <member name="filter/filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false"> </member> - <member name="filter/ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans"> + <member name="filter/ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false"> </member> - <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles"> + <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false"> </member> <member name="geometry/collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> </member> - <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type"> + <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" default="0"> </member> - <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly"> + <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> </member> - <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size"> + <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> </member> - <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size"> + <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="8.0"> </member> - <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type"> + <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" default="0"> </member> </members> <constants> diff --git a/doc/classes/NavigationMeshInstance.xml b/doc/classes/NavigationMeshInstance.xml index 3b11005e38..a6266aac0a 100644 --- a/doc/classes/NavigationMeshInstance.xml +++ b/doc/classes/NavigationMeshInstance.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> </member> - <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> + <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh" default="null"> </member> </members> <constants> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index 2630ae1377..555f308660 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -4,7 +4,7 @@ A node that has methods to draw outlines or use indices of vertices to create navigation polygons. </brief_description> <description> - There are two ways to create polygons. Either by using the [method add_outline] method or using the [method add_polygon] method. + There are two ways to create polygons. Either by using the [method add_outline] method, or using the [method add_polygon] method. Using [method add_outline]: [codeblock] var polygon = NavigationPolygon.new() diff --git a/doc/classes/NavigationPolygonInstance.xml b/doc/classes/NavigationPolygonInstance.xml index e566e25336..26cc7fbf31 100644 --- a/doc/classes/NavigationPolygonInstance.xml +++ b/doc/classes/NavigationPolygonInstance.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> </member> - <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon"> + <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon" default="null"> </member> </members> <constants> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index ac84c32b5e..4f212cf392 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -45,15 +45,15 @@ </argument> <description> Sets the peer to which packets will be sent. - The [code]id[/code] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. Default: [constant TARGET_PEER_BROADCAST] + The [code]id[/code] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST]. </description> </method> </methods> <members> - <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections"> - If [code]true[/code], this [NetworkedMultiplayerPeer] refuses new connections. Default value: [code]false[/code]. + <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="true"> + If [code]true[/code], this [NetworkedMultiplayerPeer] refuses new connections. </member> - <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="NetworkedMultiplayerPeer.TransferMode"> + <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="NetworkedMultiplayerPeer.TransferMode" default="0"> The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. </member> </members> @@ -96,7 +96,7 @@ Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. </constant> <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode"> - Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. + Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. </constant> <constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus"> The ongoing connection disconnected. diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index 3095da14be..0723d50ba1 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -4,38 +4,38 @@ Scalable texture-based frame that tiles the texture's centers and sides, but keeps the corners' original size. Perfect for panels and dialog boxes. </brief_description> <description> - Better known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3 by 3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. + Also known as 9-slice panels, NinePatchRect produces clean panels of any size, based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's sides horizontally or vertically, the center on both axes but it doesn't scale or tile the corners. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode"> + <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode" default="0"> Doesn't do anything at the time of writing. </member> - <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode"> + <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="NinePatchRect.AxisStretchMode" default="0"> Doesn't do anything at the time of writing. </member> - <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled"> - If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders. Default value: [code]true[/code] + <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true"> + If [code]true[/code], draw the panel's center. Else, only draw the 9-slice's borders. </member> - <member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin"> + <member name="patch_margin_bottom" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> The height of the 9-slice's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> - <member name="patch_margin_left" type="int" setter="set_patch_margin" getter="get_patch_margin"> + <member name="patch_margin_left" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> The height of the 9-slice's left column. </member> - <member name="patch_margin_right" type="int" setter="set_patch_margin" getter="get_patch_margin"> + <member name="patch_margin_right" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> The height of the 9-slice's right column. </member> - <member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin"> + <member name="patch_margin_top" type="int" setter="set_patch_margin" getter="get_patch_margin" default="0"> The height of the 9-slice's top row. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> Rectangular region of the texture to sample from. If you're working with an atlas, use this property to define the area the 9-slice should use. All other properties are relative to this one. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> The node's texture resource. </member> </members> @@ -48,7 +48,7 @@ </signals> <constants> <constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode"> - Doesn't do anything at the time of writing. Default value for [code]axis_stretch_horizontal[/code] and [code]axis_stretch_vertical[/code]. + Doesn't do anything at the time of writing. </constant> <constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode"> Doesn't do anything at the time of writing. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 6df207b2cd..5a90354124 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -14,7 +14,7 @@ To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instanced what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children. [b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree]. - [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]) it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call Godot will use its [NodePath] (make sure node names are the same on all peers). Also take a look at the high-level networking tutorial and corresponding demos. + [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link> @@ -84,7 +84,8 @@ <description> Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards. Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables. - Usually used for initialization. For even earlier initialization, [method Object._init] may be used. Also see [method _enter_tree]. + Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree]. + [b]Note:[/b] [method _ready] may be called only once for each node. After removing a node from the scene tree and adding again, [code]_ready[/code] will not be called for the second time. This can be bypassed with requesting another call with [method request_ready], which may be called anywhere before adding the node again. </description> </method> <method name="_unhandled_input" qualifiers="virtual"> @@ -120,7 +121,7 @@ </argument> <description> 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 parent node is deleted, so an entire scene can be removed by deleting its topmost node. - Setting [code]legible_unique_name[/code] to [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type. + If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type. </description> </method> <method name="add_child_below_node"> @@ -134,7 +135,7 @@ </argument> <description> Adds a child node. The child is placed below the given node in the list of children. - Setting [code]legible_unique_name[/code] to [code]true[/code] creates child nodes with human-readable names, based on the name of the node being instanced instead of its type. + If [code]legible_unique_name[/code] is [code]true[/code], the child node will have an human-readable name based on the name of the node being instanced instead of its type. </description> </method> <method name="add_to_group"> @@ -176,8 +177,9 @@ <argument index="2" name="owned" type="bool" default="true"> </argument> <description> - Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. - If [code]owned[/code] is [code]true[/code], this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through script, because those scenes don't have an owner. + Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]). + [b]Note:[/b] It does not match against the full path, just against individual node names. + If [code]owned[/code] is [code]true[/code], this method only finds nodes whose owner is this node. This is especially important for scenes instantiated through a script, because those scenes don't have an owner. </description> </method> <method name="find_parent" qualifiers="const"> @@ -186,7 +188,8 @@ <argument index="0" name="mask" type="String"> </argument> <description> - Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case sensitive, but '*' matches zero or more characters and '?' matches any single character except '.'). Note that it does not match against the full path, just against individual node names. + Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]). + [b]Note:[/b] It does not match against the full path, just against individual node names. </description> </method> <method name="get_child" qualifiers="const"> @@ -284,7 +287,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> - Similar to [method get_node], but does not raise an error when [code]path[/code] does not point to a valid [Node]. + Similar to [method get_node], but does not raise an error if [code]path[/code] does not point to a valid [Node]. </description> </method> <method name="get_parent" qualifiers="const"> @@ -489,7 +492,8 @@ <return type="void"> </return> <description> - Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the [method get_node] function. Example output: + Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the [method get_node] function. + [b]Example output:[/b] [codeblock] TheGame TheGame/Menu @@ -504,7 +508,8 @@ <return type="void"> </return> <description> - Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. Example output: + Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. + [b]Example output:[/b] [codeblock] ┖╴TheGame ┠╴Menu @@ -525,7 +530,7 @@ <argument index="2" name="parent_first" type="bool" default="false"> </argument> <description> - Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the [code]parent_first[/code] argument is [code]true[/code] then the method will be called on the current node first, then on all children. If it is [code]false[/code] then the children will be called first. + Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the [code]parent_first[/code] argument is [code]true[/code], the method will be called on the current node first, then on all its children. If [code]parent_first[/code] is [code]false[/code], the children will be called first. </description> </method> <method name="propagate_notification"> @@ -591,7 +596,7 @@ <return type="void"> </return> <description> - Requests that [code]_ready[/code] be called again. + Requests that [code]_ready[/code] be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see [method _ready]). [code]_ready[/code] is called only for the node which requested it, which means that you need to request ready for each child if you want them to call [code]_ready[/code] too (in which case, [code]_ready[/code] will be called in the same order as it would normally). </description> </method> <method name="rpc" qualifiers="vararg"> @@ -600,7 +605,8 @@ <argument index="0" name="method" type="String"> </argument> <description> - Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Also see [method rset] and [method rset_config] for properties. Returns an empty [Variant]. Note that you can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]. + Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. See also [method rset] and [method rset_config] for properties. Returns an empty [Variant]. + [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> <method name="rpc_config"> @@ -611,7 +617,7 @@ <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> <description> - Changes the RPC mode for the given [code]method[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). Also see [method rset] and [method rset_config] for properties. + Changes the RPC mode for the given [code]method[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). See also [method rset] and [method rset_config] for properties. </description> </method> <method name="rpc_id" qualifiers="vararg"> @@ -653,7 +659,7 @@ <argument index="1" name="value" type="Variant"> </argument> <description> - Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see [method rset_config]. Also see [method rpc] for RPCs for methods, most information applies to this method as well. + Remotely changes a property's value on other peers (and locally). Behaviour depends on the RPC configuration for the given property, see [method rset_config]. See also [method rpc] for RPCs for methods, most information applies to this method as well. </description> </method> <method name="rset_config"> @@ -664,7 +670,7 @@ <argument index="1" name="mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> <description> - Changes the RPC mode for the given [code]property[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, properties are not exposed to networking (and RPCs). Also see [method rpc] and [method rpc_config] for methods. + Changes the RPC mode for the given [code]property[/code] to the given [code]mode[/code]. See [enum MultiplayerAPI.RPCMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, properties are not exposed to networking (and RPCs). See also [method rpc] and [method rpc_config] for methods. </description> </method> <method name="rset_id"> @@ -739,7 +745,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes behavior. + Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes' behaviour. </description> </method> <method name="set_process"> @@ -766,7 +772,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes behavior. + Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes' behaviour. </description> </method> <method name="set_process_priority"> @@ -808,7 +814,7 @@ </methods> <members> <member name="custom_multiplayer" type="MultiplayerAPI" setter="set_custom_multiplayer" getter="get_custom_multiplayer"> - The override to the default [MultiplayerAPI]. Set to null to use the default SceneTree one. + The override to the default [MultiplayerAPI]. Set to [code]null[/code] to use the default [SceneTree] one. </member> <member name="filename" type="String" setter="set_filename" getter="get_filename"> When a scene is instanced from a file, its topmost node contains the filename from which it was loaded. @@ -817,12 +823,12 @@ The [MultiplayerAPI] instance associated with this node. Either the [member custom_multiplayer], or the default SceneTree one (if inside tree). </member> <member name="name" type="String" setter="set_name" getter="get_name"> - The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed + The name of the node. This name is unique among the siblings (other child nodes from the same parent). When set to an existing name, the node will be automatically renamed. </member> <member name="owner" type="Node" setter="set_owner" getter="get_owner"> - 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 (using [PackedScene]) all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing. + 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 (using [PackedScene]), all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing. </member> - <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode"> + <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode" default="0"> Pause mode. How the node will behave if the [SceneTree] is paused. </member> </members> @@ -879,7 +885,8 @@ Notification received every frame when the process flag is set (see [method set_process]). </constant> <constant name="NOTIFICATION_PARENTED" value="18"> - Notification received when a node is set as a child of another node. Note that this doesn't mean that a node entered the [SceneTree]. + Notification received when a node is set as a child of another node. + [b]Note:[/b] This doesn't mean that a node entered the [SceneTree]. </constant> <constant name="NOTIFICATION_UNPARENTED" value="19"> Notification received when a node is unparented (parent removed it from the list of children). @@ -953,7 +960,7 @@ Inherits pause mode from the node's parent. For the root node, it is equivalent to [constant PAUSE_MODE_STOP]. Default. </constant> <constant name="PAUSE_MODE_STOP" value="1" enum="PauseMode"> - Stop processing when the [SceneTree] is paused. + Stops processing when the [SceneTree] is paused. </constant> <constant name="PAUSE_MODE_PROCESS" value="2" enum="PauseMode"> Continue to process regardless of the [SceneTree] pause state. diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 1b97f3267f..abdbfa09f7 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Node2D" inherits="CanvasItem" category="Core" version="3.2"> <brief_description> - A 2D game object, parent of all 2D related nodes. Has a position, rotation, scale and Z-index. + A 2D game object, parent of all 2D-related nodes. Has a position, rotation, scale and Z index. </brief_description> <description> A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. @@ -16,7 +16,7 @@ <argument index="0" name="ratio" type="Vector2"> </argument> <description> - Multiplies the current scale by the 'ratio' vector. + Multiplies the current scale by the [code]ratio[/code] vector. </description> </method> <method name="get_angle_to" qualifiers="const"> @@ -25,7 +25,7 @@ <argument index="0" name="point" type="Vector2"> </argument> <description> - Returns the angle between the node and the 'point' in radians. + Returns the angle between the node and the [code]point[/code] in radians. </description> </method> <method name="get_relative_transform_to_parent" qualifiers="const"> @@ -43,7 +43,7 @@ <argument index="0" name="offset" type="Vector2"> </argument> <description> - Adds the 'offset' vector to the node's global position. + Adds the [code]offset[/code] vector to the node's global position. </description> </method> <method name="look_at"> @@ -52,7 +52,7 @@ <argument index="0" name="point" type="Vector2"> </argument> <description> - Rotates the node so it points towards the 'point'. + Rotates the node so it points towards the [code]point[/code]. </description> </method> <method name="move_local_x"> @@ -130,26 +130,26 @@ <member name="global_transform" type="Transform2D" setter="set_global_transform" getter="get_global_transform"> Global [Transform2D]. </member> - <member name="position" type="Vector2" setter="set_position" getter="get_position"> + <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2( 0, 0 )"> Position, relative to the node's parent. </member> - <member name="rotation" type="float" setter="set_rotation" getter="get_rotation"> + <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> Rotation in radians, relative to the node's parent. </member> - <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> + <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> Rotation in degrees, relative to the node's parent. </member> - <member name="scale" type="Vector2" setter="set_scale" getter="get_scale"> - The node's scale. Unscaled value: [code](1, 1)[/code] + <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2( 1, 1 )"> + The node's scale. Unscaled value: [code](1, 1)[/code]. </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform"> Local [Transform2D]. </member> - <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative"> - If [code]true[/code], the node's Z-index is relative to its parent's Z-index. If this node's Z-index is 2 and its parent's effective Z-index is 3, then this node's effective Z-index will be 2 + 3 = 5. + <member name="z_as_relative" type="bool" setter="set_z_as_relative" getter="is_z_relative" default="true"> + If [code]true[/code], the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5. </member> - <member name="z_index" type="int" setter="set_z_index" getter="get_z_index"> - Z-index. Controls the order in which the nodes render. A node with a higher Z-index will display in front of others. + <member name="z_index" type="int" setter="set_z_index" getter="get_z_index" default="0"> + Z index. Controls the order in which the nodes render. A node with a higher Z index will display in front of others. </member> </members> <constants> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 67f12813cc..5deee941da 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -17,21 +17,21 @@ <argument index="0" name="from" type="String"> </argument> <description> - Create a NodePath from a string, e.g. "Path2D/PathFollow2D/Sprite:texture:size". A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent. + Creates a NodePath from a string, e.g. [code]"Path2D/PathFollow2D/Sprite:texture:size"[/code]. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent. The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested. Examples of valid NodePaths (assuming that those nodes exist and have the referenced resources or properties): [codeblock] # Points to the Sprite node "Path2D/PathFollow2D/Sprite" - # Points to the Sprite node and its 'texture' resource. + # Points to the Sprite node and its "texture" resource. # get_node() would retrieve "Sprite", while get_node_and_resource() - # would retrieve both the Sprite node and the 'texture' resource. + # would retrieve both the Sprite node and the "texture" resource. "Path2D/PathFollow2D/Sprite:texture" - # Points to the Sprite node and its 'position' property. + # Points to the Sprite node and its "position" property. "Path2D/PathFollow2D/Sprite:position" - # Points to the Sprite node and the 'x' component of its 'position' property. + # Points to the Sprite node and the "x" component of its "position" property. "Path2D/PathFollow2D/Sprite:position:x" - # Absolute path (from 'root') + # Absolute path (from "root") "/root/Level/Path2D" [/codeblock] </description> @@ -42,9 +42,9 @@ <description> Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node). [codeblock] - # This will be parsed as a node path to the 'x' property in the 'position' node + # This will be parsed as a node path to the "x" property in the "position" node var node_path = NodePath("position:x") - # This will be parsed as a node path to the 'x' component of the 'position' property in the current node + # This will be parsed as a node path to the "x" component of the "position" property in the current node var property_path = node_path.get_as_property_path() print(property_path) # :position:x [/codeblock] @@ -67,7 +67,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the node name indicated by [code]idx[/code] (0 to [method get_name_count]). + Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]). [codeblock] var node_path = NodePath("Path2D/PathFollow2D/Sprite") print(node_path.get_name(0)) # Path2D @@ -80,7 +80,7 @@ <return type="int"> </return> <description> - Get the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included. + Gets the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included. For example, [code]"Path2D/PathFollow2D/Sprite"[/code] has 3 names. </description> </method> @@ -90,7 +90,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]). + Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]). [codeblock] var node_path = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path") print(node_path.get_subname(0)) # texture @@ -102,7 +102,7 @@ <return type="int"> </return> <description> - Get the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character ([code]:[/code]) in the node path. + Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character ([code]:[/code]) in the node path. For example, [code]"Path2D/PathFollow2D/Sprite:texture:load_path"[/code] has 2 subnames. </description> </method> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index f6e2f47a42..d73c85a6d9 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -4,7 +4,7 @@ Operating System functions. </brief_description> <description> - Operating System functions. OS Wraps the most common functionality to communicate with the host Operating System, such as: clipboard, video mode, date and time, timers, environment variables, execution of binaries, command line, etc. + Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, date and time, timers, environment variables, execution of binaries, command line, etc. </description> <tutorials> </tutorials> @@ -17,7 +17,7 @@ <argument index="1" name="title" type="String" default=""Alert!""> </argument> <description> - Displays a modal dialog box utilizing the host OS. + Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. </description> </method> <method name="can_draw" qualifiers="const"> @@ -53,7 +53,7 @@ <argument index="0" name="msec" type="int"> </argument> <description> - Delay execution of the current thread by given milliseconds. + Delay execution of the current thread by [code]msec[/code] milliseconds. </description> </method> <method name="delay_usec" qualifiers="const"> @@ -62,7 +62,7 @@ <argument index="0" name="usec" type="int"> </argument> <description> - Delay execution of the current thread by given microseconds. + Delay execution of the current thread by [code]usec[/code] microseconds. </description> </method> <method name="dump_memory_to_file"> @@ -101,15 +101,15 @@ </argument> <description> Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable. - The arguments are used in the given order and separated by a space, so [code]OS.execute('ping', ['-w', '3', 'godotengine.org'], false)[/code] will resolve to [code]ping -w 3 godotengine.org[/code] in the system's shell. + The arguments are used in the given order and separated by a space, so [code]OS.execute("ping", ["-w", "3", "godotengine.org"], false)[/code] will resolve to [code]ping -w 3 godotengine.org[/code] in the system's shell. This method has slightly different behavior based on whether the [code]blocking[/code] mode is enabled. - When [code]blocking[/code] is enabled, the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the [code]output[/code] array as a single string. When the process terminates, the Godot thread will resume execution. - When [code]blocking[/code] is disabled, the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so [code]output[/code] will be empty. - The return value also depends on the blocking mode. When blocking, the method will return -2 (no process ID information is available in blocking mode). When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return -1. + If [code]blocking[/code] is [code]true[/code], the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the [code]output[/code] array as a single string. When the process terminates, the Godot thread will resume execution. + If [code]blocking[/code] is [code]false[/code], the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so [code]output[/code] will be empty. + The return value also depends on the blocking mode. When blocking, the method will return -2 (no process ID information is available in blocking mode). When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return [code]-1[/code]. Example of blocking mode and retrieving the shell output: [codeblock] var output = [] - OS.execute('ls', ['-l', '/tmp'], true, output) + OS.execute("ls", ["-l", "/tmp"], true, output) [/codeblock] Example of non-blocking mode, running another instance of the project and storing its process ID: [codeblock] @@ -117,7 +117,7 @@ [/codeblock] If you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example: [codeblock] - OS.execute('CMD.exe', ['/C', 'cd %TEMP% && dir'], true, output) + OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output) [/codeblock] </description> </method> @@ -127,7 +127,7 @@ <argument index="0" name="string" type="String"> </argument> <description> - Returns the scancode of the given string (e.g. "Escape") + Returns the scancode of the given string (e.g. "Escape"). </description> </method> <method name="get_audio_driver_count" qualifiers="const"> @@ -172,7 +172,7 @@ <argument index="0" name="utc" type="bool" default="false"> </argument> <description> - Returns current date as a dictionary of keys: year, month, day, weekday, dst (daylight savings time). + Returns current date as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]dst[/code] (Daylight Savings Time). </description> </method> <method name="get_datetime" qualifiers="const"> @@ -181,7 +181,7 @@ <argument index="0" name="utc" type="bool" default="false"> </argument> <description> - Returns current datetime as a dictionary of keys: year, month, day, weekday, dst (daylight savings time), hour, minute, second. + Returns current datetime as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]dst[/code] (Daylight Savings Time), [code]hour[/code], [code]minute[/code], [code]second[/code]. </description> </method> <method name="get_datetime_from_unix_time" qualifiers="const"> @@ -190,8 +190,8 @@ <argument index="0" name="unix_time_val" type="int"> </argument> <description> - Get a dictionary of time values when given epoch time. - Dictionary Time values will be a union of values from [method get_time] and [method get_date] dictionaries (with the exception of dst = day light standard time, as it cannot be determined from epoch). + Gets a dictionary of time values corresponding to the given UNIX epoch time (in seconds). + The returned Dictionary's values will be the same as [method get_datetime], with the exception of Daylight Savings Time as it cannot be determined from the epoch. </description> </method> <method name="get_dynamic_memory_usage" qualifiers="const"> @@ -221,7 +221,7 @@ <return type="Vector2"> </return> <description> - Returns IME cursor position (currently edited portion of the string) relative to the characters in the composition string. + Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position. </description> </method> @@ -229,7 +229,7 @@ <return type="String"> </return> <description> - Returns IME intermediate composition string. + Returns the IME intermediate composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string. </description> </method> @@ -238,7 +238,7 @@ </return> <description> Returns the current latin keyboard variant as a String. - Possible return values are: "QWERTY", "AZERTY", "QZERTY", "DVORAK", "NEO", "COLEMAK" or "ERROR". + Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code]. </description> </method> <method name="get_locale" qualifiers="const"> @@ -259,7 +259,7 @@ <return type="String"> </return> <description> - Returns the name of the host OS. Possible values are: "Android", "Haiku", "iOS", "HTML5", "OSX", "Server", "Windows", "UWP", "X11". + Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"Haiku"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code]. </description> </method> <method name="get_power_percent_left"> @@ -273,7 +273,7 @@ <return type="int"> </return> <description> - Returns the time in seconds before the device runs out of battery. + Returns an estimate of the time left in seconds before the device runs out of battery. </description> </method> <method name="get_power_state"> @@ -287,14 +287,14 @@ <return type="int"> </return> <description> - Returns the game process ID + Returns the project's process ID. </description> </method> <method name="get_processor_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the number of cores available in the host machine. + Returns the number of threads available on the host machine. </description> </method> <method name="get_real_window_size" qualifiers="const"> @@ -310,7 +310,7 @@ <argument index="0" name="code" type="int"> </argument> <description> - Returns the given scancode as a string (e.g. Return values: "Escape", "Shift+Escape"). + Returns the given scancode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]). </description> </method> <method name="get_screen_count" qualifiers="const"> @@ -327,13 +327,15 @@ </argument> <description> Returns the dots per inch density of the specified screen. - On Android Devices, the actual screen densities are grouped into six generalized densities: - ldpi - 120 dpi - mdpi - 160 dpi - hdpi - 240 dpi - xhdpi - 320 dpi - xxhdpi - 480 dpi - xxxhdpi - 640 dpi + On Android devices, the actual screen densities are grouped into six generalized densities: + [codeblock] + ldpi - 120 dpi + mdpi - 160 dpi + hdpi - 240 dpi + xhdpi - 320 dpi + xxhdpi - 480 dpi + xxxhdpi - 640 dpi + [/codeblock] </description> </method> <method name="get_screen_position" qualifiers="const"> @@ -358,13 +360,14 @@ <return type="int"> </return> <description> + Returns the amount of time in milliseconds it took for the boot logo to appear. </description> </method> <method name="get_static_memory_peak_usage" qualifiers="const"> <return type="int"> </return> <description> - Returns the max amount of static memory used (only works in debug). + Returns the maximum amount of static memory used (only works in debug). </description> </method> <method name="get_static_memory_usage" qualifiers="const"> @@ -432,14 +435,14 @@ </return> <description> Returns a string that is unique to the device. - Returns empty string on HTML5 and UWP which are not supported yet. + [b]Note:[/b] Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet. </description> </method> <method name="get_unix_time" qualifiers="const"> <return type="int"> </return> <description> - Returns the current unix epoch timestamp. + Returns the current UNIX epoch timestamp. </description> </method> <method name="get_unix_time_from_datetime" qualifiers="const"> @@ -448,9 +451,9 @@ <argument index="0" name="datetime" type="Dictionary"> </argument> <description> - Get an epoch time value from a dictionary of time values. - [code]datetime[/code] must be populated with the following keys: year, month, day, hour, minute, second. - You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight savings time (dst), if present, is ignored. + Gets an epoch time value from a dictionary of time values. + [code]datetime[/code] must be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], [code]second[/code]. + You can pass the output from [method get_datetime_from_unix_time] directly into this function. Daylight Savings Time ([code]dst[/code]), if present, is ignored. </description> </method> <method name="get_user_data_dir" qualifiers="const"> @@ -484,13 +487,14 @@ <return type="int"> </return> <description> - Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or it is currently hidden. + Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. </description> </method> <method name="get_window_safe_area" qualifiers="const"> <return type="Rect2"> </return> <description> + Returns unobscured area of the window where interactive controls should be rendered. </description> </method> <method name="has_environment" qualifiers="const"> @@ -509,7 +513,7 @@ </argument> <description> Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. - Note that tag names are case-sensitive. + [b]Note:[/b] Tag names are case-sensitive. </description> </method> <method name="has_touchscreen_ui_hint" qualifiers="const"> @@ -546,7 +550,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the "Okay" button should appear on the left and "Cancel" on the right. + Returns [code]true[/code] if the [b]OK[/b] button should appear on the left and [b]Cancel[/b] on the right. </description> </method> <method name="is_scancode_unicode" qualifiers="const"> @@ -555,14 +559,14 @@ <argument index="0" name="code" type="int"> </argument> <description> - Returns [code]true[/code] if the input code has a unicode character. + Returns [code]true[/code] if the input scancode corresponds to a Unicode character. </description> </method> <method name="is_stdout_verbose" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the engine was executed with -v (verbose stdout). + Returns [code]true[/code] if the engine was executed with [code]-v[/code] (verbose stdout). </description> </method> <method name="is_userfs_persistent" qualifiers="const"> @@ -586,7 +590,7 @@ </argument> <description> Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. - Note that this method can also be used to kill processes that were not spawned by the game. + [b]Note:[/b] This method can also be used to kill processes that were not spawned by the game. </description> </method> <method name="move_window_to_foreground"> @@ -623,7 +627,7 @@ </argument> <description> Plays native video from the specified path, at the given volume and with audio and subtitle tracks. - Note: This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. + [b]Note:[/b] This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. </description> </method> <method name="native_video_stop"> @@ -652,7 +656,7 @@ <argument index="0" name="tofile" type="String" default=""""> </argument> <description> - Shows all resources in the game. Optionally the list can be written to a file. + Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in [code]tofile[/code]. </description> </method> <method name="print_all_textures_by_size"> @@ -735,7 +739,7 @@ <description> Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS). Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog. - Note: This method is only implemented on macOS and Windows. + [b]Note:[/b] This method is only implemented on macOS and Windows. </description> </method> <method name="set_thread_name"> @@ -791,63 +795,63 @@ <argument index="0" name="existing_text" type="String" default=""""> </argument> <description> - Shows the virtual keyboard if the platform has one. The [i]existing_text[/i] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). </description> </method> </methods> <members> - <member name="clipboard" type="String" setter="set_clipboard" getter="get_clipboard"> + <member name="clipboard" type="String" setter="set_clipboard" getter="get_clipboard" default=""""> The clipboard from the host OS. Might be unavailable on some platforms. </member> - <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen"> + <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0"> The current screen index (starting from 0). </member> - <member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code"> + <member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0"> The exit code passed to the OS when the main loop exits. </member> - <member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on"> + <member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on" default="true"> If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile. </member> - <member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode"> + <member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode" default="false"> If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. </member> - <member name="max_window_size" type="Vector2" setter="set_max_window_size" getter="get_max_window_size"> + <member name="max_window_size" type="Vector2" setter="set_max_window_size" getter="get_max_window_size" default="Vector2( 0, 0 )"> The maximum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value. </member> - <member name="min_window_size" type="Vector2" setter="set_min_window_size" getter="get_min_window_size"> + <member name="min_window_size" type="Vector2" setter="set_min_window_size" getter="get_min_window_size" default="Vector2( 0, 0 )"> The minimum size of the window (without counting window manager decorations). Does not affect fullscreen mode. Set to [code](0, 0)[/code] to reset to the system default value. </member> - <member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation"> + <member name="screen_orientation" type="int" setter="set_screen_orientation" getter="get_screen_orientation" enum="_OS.ScreenOrientation" default="0"> The current screen orientation. </member> - <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled"> + <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled" default="true"> If [code]true[/code], vertical synchronization (Vsync) is enabled. </member> - <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window"> + <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false"> If [code]true[/code], removes the window frame. - Note: Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. + [b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. </member> - <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen"> + <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen" default="false"> If [code]true[/code], the window is fullscreen. </member> - <member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized"> + <member name="window_maximized" type="bool" setter="set_window_maximized" getter="is_window_maximized" default="false"> If [code]true[/code], the window is maximized. </member> - <member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized"> + <member name="window_minimized" type="bool" setter="set_window_minimized" getter="is_window_minimized" default="false"> If [code]true[/code], the window is minimized. </member> - <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled"> + <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled" default="false"> If [code]true[/code], the window background is transparent and window frame is removed. Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering. - Note: This property has no effect if "Project > Project Settings > Display > Window > Per-pixel transparency > Allowed" setting is disabled. + [b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled. </member> - <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position"> + <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )"> The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. </member> - <member name="window_resizable" type="bool" setter="set_window_resizable" getter="is_window_resizable"> + <member name="window_resizable" type="bool" setter="set_window_resizable" getter="is_window_resizable" default="true"> If [code]true[/code], the window is resizable by the user. </member> - <member name="window_size" type="Vector2" setter="set_window_size" getter="get_window_size"> + <member name="window_size" type="Vector2" setter="set_window_size" getter="get_window_size" default="Vector2( 0, 0 )"> The size of the window (without counting window manager decorations). </member> </members> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 7b262d80c7..b87e912b45 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -66,7 +66,7 @@ </return> <description> Virtual method which can be overridden to customize the return value of [method to_string], and thus the object's representation where it is converted to a string, e.g. with [code]print(obj)[/code]. - Returns a [String] representing the object. Default is [code]"[ClassName:RID]"[/code]. + Returns a [String] representing the object. If not overridden, defaults to [code]"[ClassName:RID]"[/code]. </description> </method> <method name="add_user_signal"> @@ -139,7 +139,7 @@ <argument index="4" name="flags" type="int" default="0"> </argument> <description> - 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 parameters. Use [code]flags[/code] to set deferred or one shot connections. See [enum ConnectFlags] constants. + 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 parameters. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. 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 with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost. Examples: @@ -217,7 +217,7 @@ <argument index="0" name="property" type="NodePath"> </argument> <description> - Get the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code]. + Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code]. </description> </method> <method name="get_instance_id" qualifiers="const"> @@ -426,7 +426,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Defines whether the object can translate strings (with calls to [method tr]). Default is [code]true[/code]. + Defines whether the object can translate strings (with calls to [method tr]). Enabled by default. </description> </method> <method name="set_meta"> @@ -453,7 +453,7 @@ <return type="String"> </return> <description> - Returns a [String] representing the object. Default is [code]"[ClassName:RID]"[/code]. + Returns a [String] representing the object. If not overridden, defaults to [code]"[ClassName:RID]"[/code]. Override the method [method _to_string] to customize the [String] representation. </description> </method> @@ -483,13 +483,13 @@ Called before the object is about to be deleted. </constant> <constant name="CONNECT_DEFERRED" value="1" enum="ConnectFlags"> - Connect a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. + Connects a signal in deferred mode. This way, signal emissions are stored in a queue, then set on idle time. </constant> <constant name="CONNECT_PERSIST" value="2" enum="ConnectFlags"> Persisting connections are saved when the object is serialized to file. </constant> <constant name="CONNECT_ONESHOT" value="4" enum="ConnectFlags"> - One shot connections disconnect themselves after emission. + One-shot connections disconnect themselves after emission. </constant> <constant name="CONNECT_REFERENCE_COUNTED" value="8" enum="ConnectFlags"> Connect a signal as reference counted. This means that a given signal can be connected several times to the same target, and will only be fully disconnected once no references are left. diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index a52d51fa7d..f4fa6ac688 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -11,25 +11,26 @@ <methods> </methods> <members> - <member name="closed" type="bool" setter="set_closed" getter="is_closed"> - If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. Default value: [code]true[/code]. + <member name="closed" type="bool" setter="set_closed" getter="is_closed" default="true"> + If [code]true[/code], closes the polygon. A closed OccluderPolygon2D occludes the light coming from any direction. An opened OccluderPolygon2D occludes the light only at its outline's direction. </member> - <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode"> - Set the direction of the occlusion culling or disable it. Default value: [constant CULL_DISABLED]. + <member name="cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="OccluderPolygon2D.CullMode" default="0"> + The culling mode to use. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - A [Vector2] array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference. + <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + A [Vector2] array with the index for polygon's vertices positions. + [b]Note:[/b] The returned value is a copy of the underlying array, rather than a reference. </member> </members> <constants> <constant name="CULL_DISABLED" value="0" enum="CullMode"> - Culling mode for the occlusion. Disabled means no culling. See [member cull_mode]. + Culling is disabled. See [member cull_mode]. </constant> <constant name="CULL_CLOCKWISE" value="1" enum="CullMode"> - Culling mode for the occlusion. Sets the culling to be in clockwise direction. See [member cull_mode]. + Culling is performed in the clockwise direction. See [member cull_mode]. </constant> <constant name="CULL_COUNTER_CLOCKWISE" value="2" enum="CullMode"> - Culling mode for the occlusion. Sets the culling to be in counter clockwise direction. See [member cull_mode]. + Culling is performed in the counterclockwise direction. See [member cull_mode]. </constant> </constants> </class> diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml index 408018fdcb..7189826385 100644 --- a/doc/classes/OmniLight.xml +++ b/doc/classes/OmniLight.xml @@ -12,23 +12,25 @@ <methods> </methods> <members> - <member name="omni_attenuation" type="float" setter="set_param" getter="get_param"> - The light's attenuation (drop-off) curve. A number of presets are available in the Inspector. + <member name="omni_attenuation" type="float" setter="set_param" getter="get_param" default="1.0"> + The light's attenuation (drop-off) curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> - <member name="omni_range" type="float" setter="set_param" getter="get_param"> - Maximum distance the light affects. + <member name="omni_range" type="float" setter="set_param" getter="get_param" default="5.0"> + The light's radius. </member> - <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail"> + <member name="omni_shadow_detail" type="int" setter="set_shadow_detail" getter="get_shadow_detail" enum="OmniLight.ShadowDetail" default="1"> See [enum ShadowDetail]. </member> - <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode"> + <member name="omni_shadow_mode" type="int" setter="set_shadow_mode" getter="get_shadow_mode" enum="OmniLight.ShadowMode" default="1"> See [enum ShadowMode]. </member> </members> <constants> <constant name="SHADOW_DUAL_PARABOLOID" value="0" enum="ShadowMode"> + Shadows are rendered to a dual-paraboloid texture. Faster than [constant SHADOW_CUBE], but lower-quality. </constant> <constant name="SHADOW_CUBE" value="1" enum="ShadowMode"> + Shadows are rendered to a cubemap. Slower than [constant SHADOW_DUAL_PARABOLOID], but higher-quality. </constant> <constant name="SHADOW_DETAIL_VERTICAL" value="0" enum="ShadowDetail"> </constant> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 1f714656de..c44495ead9 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -19,7 +19,7 @@ <argument index="2" name="id" type="int" default="-1"> </argument> <description> - Add an item, with a "texture" icon, text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. + Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end. </description> </method> <method name="add_item"> @@ -30,14 +30,14 @@ <argument index="1" name="id" type="int" default="-1"> </argument> <description> - Add an item, with text "label" and (optionally) id. If no "id" is passed, "id" becomes the item index. New items are appended at the end. + Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end. </description> </method> <method name="add_separator"> <return type="void"> </return> <description> - Add a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. + Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. </description> </method> <method name="clear"> @@ -60,7 +60,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the icon of the item at index "idx". + Returns the icon of the item at index [code]idx[/code]. </description> </method> <method name="get_item_id" qualifiers="const"> @@ -95,7 +95,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the text of the item at index "idx". + Returns the text of the item at index [code]idx[/code]. </description> </method> <method name="get_popup" qualifiers="const"> @@ -160,7 +160,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Set the icon of an item at index "idx". + Sets the icon of an item at index [code]idx[/code]. </description> </method> <method name="set_item_id"> @@ -171,7 +171,7 @@ <argument index="1" name="id" type="int"> </argument> <description> - Set the ID of an item at index "idx". + Sets the ID of an item at index [code]idx[/code]. </description> </method> <method name="set_item_metadata"> @@ -192,12 +192,12 @@ <argument index="1" name="text" type="String"> </argument> <description> - Set the text of an item at index "idx". + Sets the text of an item at index [code]idx[/code]. </description> </method> </methods> <members> - <member name="selected" type="int" setter="_select_int" getter="get_selected"> + <member name="selected" type="int" setter="_select_int" getter="get_selected" default="-1"> </member> </members> <signals> @@ -205,14 +205,14 @@ <argument index="0" name="id" type="int"> </argument> <description> - This signal is emitted when user navigated to an item using [code]ui_up[/code] or [code]ui_down[/code] action. ID of the item selected is passed as argument. + Emitted the when user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument. </description> </signal> <signal name="item_selected"> <argument index="0" name="id" type="int"> </argument> <description> - This signal is emitted when the current item was changed by the user. Index of the item selected is passed as argument. + Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. </description> </signal> </signals> @@ -221,7 +221,7 @@ <theme_items> <theme_item name="arrow" type="Texture"> </theme_item> - <theme_item name="arrow_margin" type="int"> + <theme_item name="arrow_margin" type="int" default="2"> </theme_item> <theme_item name="disabled" type="StyleBox"> </theme_item> @@ -229,17 +229,17 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> <theme_item name="hover" type="StyleBox"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="2"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml index f230953aac..fa6a00d65d 100644 --- a/doc/classes/PackedDataContainer.xml +++ b/doc/classes/PackedDataContainer.xml @@ -23,7 +23,7 @@ </method> </methods> <members> - <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data"> + <member name="__data__" type="PoolByteArray" setter="_set_data" getter="_get_data" default="PoolByteArray( )"> </member> </members> <constants> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 7827571178..f01ef78c02 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -5,26 +5,27 @@ </brief_description> <description> A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. - Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). Note that the node doesn't need to own itself. - Example of saving a node with different owners: The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. + Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). + [b]Note:[/b] The node doesn't need to own itself. + [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [code]Node2D[/code] ([code]node[/code]), [code]RigidBody2D[/code] ([code]rigid[/code]) and [code]CollisionObject2D[/code] ([code]collision[/code]). [code]collision[/code] is a child of [code]rigid[/code] which is a child of [code]node[/code]. Only [code]rigid[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code]. [codeblock] - # create the objects + # Create the objects var node = Node2D.new() var rigid = RigidBody2D.new() var collision = CollisionShape2D.new() - # create the object hierarchy + # Create the object hierarchy rigid.add_child(collision) node.add_child(rigid) - # change owner of rigid, but not of collision + # Change owner of rigid, but not of collision rigid.owner = node var scene = PackedScene.new() - # only node and rigid are now packed + # Only node and rigid are now packed var result = scene.pack(node) if result == OK: - ResourceSaver.save("res://path/name.scn", scene) # or user://... + ResourceSaver.save("res://path/name.scn", scene) # Or "user://..." [/codeblock] </description> <tutorials> @@ -64,7 +65,17 @@ </method> </methods> <members> - <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene"> + <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{ +"conn_count": 0, +"conns": PoolIntArray( ), +"editable_instances": [ ], +"names": PoolStringArray( ), +"node_count": 0, +"node_paths": [ ], +"nodes": PoolIntArray( ), +"variants": [ ], +"version": 2 +}"> A dictionary representation of the scene contents. Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for base scene children overrides, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. </member> @@ -74,10 +85,12 @@ If passed to [method instance], blocks edits to the scene state. </constant> <constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState"> - If passed to [method instance], provides local scene resources to the local scene. Requires tools compiled. + If passed to [method instance], provides local scene resources to the local scene. + [b]Note:[/b] Only available in editor builds. </constant> <constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState"> - If passed to [method instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled. + If passed to [method instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state. + [b]Note:[/b] Only available in editor builds. </constant> </constants> </class> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index 4109d9d462..d52bf4e3bb 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -4,7 +4,7 @@ Abstraction and base class for packet-based protocols. </brief_description> <description> - PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low level bytes or having to worry about network ordering. + PacketPeer is an abstraction and base class for packet-based protocols (such as UDP). It provides an API for sending and receiving packets both as raw data or variables. This makes it easy to transfer data over a protocol, without having to encode data as low-level bytes or having to worry about network ordering. </description> <tutorials> </tutorials> @@ -20,7 +20,7 @@ <return type="PoolByteArray"> </return> <description> - Get a raw packet. + Gets a raw packet. </description> </method> <method name="get_packet_error" qualifiers="const"> @@ -36,8 +36,8 @@ <argument index="0" name="allow_objects" type="bool" default="false"> </argument> <description> - Get a Variant. When [code]allow_objects[/code] (or [member allow_object_decoding]) is [code]true[/code] decoding objects is allowed. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). + Gets a Variant. If [code]allow_objects[/code] (or [member allow_object_decoding]) is [code]true[/code], decoding objects is allowed. + [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="put_packet"> @@ -46,7 +46,7 @@ <argument index="0" name="buffer" type="PoolByteArray"> </argument> <description> - Send a raw packet. + Sends a raw packet. </description> </method> <method name="put_var"> @@ -57,15 +57,15 @@ <argument index="1" name="full_objects" type="bool" default="false"> </argument> <description> - Send a Variant as a packet. When [code]full_objects[/code] (or [member allow_object_decoding]) is [code]true[/code] encoding objects is allowed (and can potentially include code). + Sends a [Variant] as a packet. If [code]full_objects[/code] (or [member allow_object_decoding]) is [code]true[/code], encoding objects is allowed (and can potentially include code). </description> </method> </methods> <members> - <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed"> - Deprecated. Use [code]get_var[/code] and [code]put_var[/code] parameters instead. - If [code]true[/code] the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var]. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). + <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false"> + [i]Deprecated.[/i] Use [code]get_var[/code] and [code]put_var[/code] parameters instead. + If [code]true[/code], the PacketPeer will allow encoding and decoding of object via [method get_var] and [method put_var]. + [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> </members> <constants> diff --git a/doc/classes/PacketPeerStream.xml b/doc/classes/PacketPeerStream.xml index 20e5e570ac..0376fea592 100644 --- a/doc/classes/PacketPeerStream.xml +++ b/doc/classes/PacketPeerStream.xml @@ -11,9 +11,9 @@ <methods> </methods> <members> - <member name="input_buffer_max_size" type="int" setter="set_input_buffer_max_size" getter="get_input_buffer_max_size"> + <member name="input_buffer_max_size" type="int" setter="set_input_buffer_max_size" getter="get_input_buffer_max_size" default="65532"> </member> - <member name="output_buffer_max_size" type="int" setter="set_output_buffer_max_size" getter="get_output_buffer_max_size"> + <member name="output_buffer_max_size" type="int" setter="set_output_buffer_max_size" getter="get_output_buffer_max_size" default="65532"> </member> <member name="stream_peer" type="StreamPeer" setter="set_stream_peer" getter="get_stream_peer"> The wrapped [StreamPeer] object. diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 376818fb86..260dbae8e2 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -13,7 +13,7 @@ <return type="void"> </return> <description> - Close the UDP socket the [PacketPeerUDP] is currently listening on. + Closes the UDP socket the [PacketPeerUDP] is currently listening on. </description> </method> <method name="get_packet_ip" qualifiers="const"> @@ -45,7 +45,7 @@ <argument index="1" name="interface_name" type="String"> </argument> <description> - Join the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code]. + Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code]. You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. </description> </method> @@ -57,7 +57,7 @@ <argument index="1" name="interface_name" type="String"> </argument> <description> - Remove the interface identified by [code]interface_name[/code] from the multicast group specified by [code]multicast_address[/code]. + Removes the interface identified by [code]interface_name[/code] from the multicast group specified by [code]multicast_address[/code]. </description> </method> <method name="listen"> @@ -70,10 +70,10 @@ <argument index="2" name="recv_buf_size" type="int" default="65536"> </argument> <description> - Make this [PacketPeerUDP] listen on the "port" binding to "bind_address" with a buffer size "recv_buf_size". - If "bind_address" is set as "*" (default), the peer will listen on all available addresses (both IPv4 and IPv6). - If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the peer will listen on all available addresses matching that IP type. - If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). + Makes this [PacketPeerUDP] listen on the [code]port[/code] binding to [code]bind_address[/code] with a buffer size [code]recv_buf_size[/code]. + If [code]bind_address[/code] is set to [code]"*"[/code] (default), the peer will listen on all available addresses (both IPv4 and IPv6). + If [code]bind_address[/code] is set to [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the peer will listen on all available addresses matching that IP type. + If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). </description> </method> <method name="set_dest_address"> @@ -84,14 +84,14 @@ <argument index="1" name="port" type="int"> </argument> <description> - Set the destination address and port for sending packets and variables, a hostname will be resolved using if valid. + Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. </description> </method> <method name="wait"> <return type="int" enum="Error"> </return> <description> - Wait for a packet to arrive on the listening port, see [method listen]. + Waits for a packet to arrive on the listening port. See [method listen]. </description> </method> </methods> diff --git a/doc/classes/PanoramaSky.xml b/doc/classes/PanoramaSky.xml index 30d15c030a..93a8bc6166 100644 --- a/doc/classes/PanoramaSky.xml +++ b/doc/classes/PanoramaSky.xml @@ -4,14 +4,14 @@ A type of [Sky] used to draw a background texture. </brief_description> <description> - A resource referenced in an [Environment] that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines except it uses a equirectangular sky map instead of a cube map. + A resource referenced in an [Environment] that is used to draw a background. The Panorama sky functions similar to skyboxes in other engines, except it uses an equirectangular sky map instead of a cube map. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama"> + <member name="panorama" type="Texture" setter="set_panorama" getter="get_panorama" default="null"> [Texture] to be applied to the PanoramaSky. </member> </members> diff --git a/doc/classes/ParallaxBackground.xml b/doc/classes/ParallaxBackground.xml index 6c9d5de945..2778707577 100644 --- a/doc/classes/ParallaxBackground.xml +++ b/doc/classes/ParallaxBackground.xml @@ -11,22 +11,22 @@ <methods> </methods> <members> - <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset"> - Base position offset of all [ParallaxLayer] children. + <member name="scroll_base_offset" type="Vector2" setter="set_scroll_base_offset" getter="get_scroll_base_offset" default="Vector2( 0, 0 )"> + The base position offset for all [ParallaxLayer] children. </member> - <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale"> - Base motion scale of all [ParallaxLayer] children. + <member name="scroll_base_scale" type="Vector2" setter="set_scroll_base_scale" getter="get_scroll_base_scale" default="Vector2( 1, 1 )"> + The base motion scale for all [ParallaxLayer] children. </member> - <member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom"> + <member name="scroll_ignore_camera_zoom" type="bool" setter="set_ignore_camera_zoom" getter="is_ignore_camera_zoom" default="false"> If [code]true[/code], elements in [ParallaxLayer] child aren't affected by the zoom level of the camera. </member> - <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin"> - Top left limits for scrolling to begin. If the camera is outside of this limit the background will stop scrolling. Must be lower than [member scroll_limit_end] to work. + <member name="scroll_limit_begin" type="Vector2" setter="set_limit_begin" getter="get_limit_begin" default="Vector2( 0, 0 )"> + Top-left limits for scrolling to begin. If the camera is outside of this limit, the background will stop scrolling. Must be lower than [member scroll_limit_end] to work. </member> - <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end"> - Right bottom limits for scrolling to end. If the camera is outside of this limit the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work. + <member name="scroll_limit_end" type="Vector2" setter="set_limit_end" getter="get_limit_end" default="Vector2( 0, 0 )"> + Bottom-right limits for scrolling to end. If the camera is outside of this limit, the background will stop scrolling. Must be higher than [member scroll_limit_begin] to work. </member> - <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset"> + <member name="scroll_offset" type="Vector2" setter="set_scroll_offset" getter="get_scroll_offset" default="Vector2( 0, 0 )"> The ParallaxBackground's scroll value. Calculated automatically when using a [Camera2D], but can be used to manually manage scrolling when no camera is present. </member> </members> diff --git a/doc/classes/ParallaxLayer.xml b/doc/classes/ParallaxLayer.xml index 993f38c31a..75c69cc4b1 100644 --- a/doc/classes/ParallaxLayer.xml +++ b/doc/classes/ParallaxLayer.xml @@ -6,21 +6,21 @@ <description> A ParallaxLayer must be the child of a [ParallaxBackground] node. Each ParallaxLayer can be set to move at different speeds relative to the camera movement or the [member ParallaxBackground.scroll_offset] value. This node's children will be affected by its scroll offset. - Note that any changes to this node's position and scale made after it enters the scene will be ignored. + [b]Note:[/b] Any changes to this node's position and scale made after it enters the scene will be ignored. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring"> - The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code] the [Texture] will not be mirrored. Default value: [code](0, 0)[/code]. + <member name="motion_mirroring" type="Vector2" setter="set_mirroring" getter="get_mirroring" default="Vector2( 0, 0 )"> + The ParallaxLayer's [Texture] mirroring. Useful for creating an infinite scrolling background. If an axis is set to [code]0[/code], the [Texture] will not be mirrored. </member> - <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset"> + <member name="motion_offset" type="Vector2" setter="set_motion_offset" getter="get_motion_offset" default="Vector2( 0, 0 )"> The ParallaxLayer's offset relative to the parent ParallaxBackground's [member ParallaxBackground.scroll_offset]. </member> - <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale"> - Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code] it will not scroll. + <member name="motion_scale" type="Vector2" setter="set_motion_scale" getter="get_motion_scale" default="Vector2( 1, 1 )"> + Multiplies the ParallaxLayer's motion. If an axis is set to [code]0[/code], it will not scroll. </member> </members> <constants> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index d7e939ba31..7ff99ebb73 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -15,7 +15,7 @@ <return type="AABB"> </return> <description> - Returns the bounding box that contains all the particles that are active in the current frame. + Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. </description> </method> <method name="restart"> @@ -27,13 +27,13 @@ </method> </methods> <members> - <member name="amount" type="int" setter="set_amount" getter="get_amount"> + <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles to emit. </member> - <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [constant DRAW_ORDER_INDEX]. + <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder" default="0"> + Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. </member> - <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh"> + <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh" default="null"> [Mesh] that is drawn for the first draw pass. </member> <member name="draw_pass_2" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh"> @@ -45,43 +45,43 @@ <member name="draw_pass_4" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh"> [Mesh] that is drawn for the fourth draw pass. </member> - <member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes"> + <member name="draw_passes" type="int" setter="set_draw_passes" getter="get_draw_passes" default="1"> The number of draw passes when rendering particles. </member> - <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. + <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> + If [code]true[/code], particles are being emitted. </member> - <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> - Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code]. + <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> + Time ratio between each emission. If [code]0[/code], particles are emitted continuously. If [code]1[/code], all particles are emitted simultaneously. </member> - <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> - <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> - If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code]. + <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> - Amount of time each particle will exist. Default value: [code]1[/code]. + <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> + Amount of time each particle will exist. </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. </member> - <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code], only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. + <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> + If [code]true[/code], only [code]amount[/code] particles will be emitted. </member> - <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> + <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting. </member> - <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material"> + <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material" default="null"> [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. </member> - <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> - Emission randomness ratio. Default value: [code]0[/code]. + <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> + Emission randomness ratio. </member> - <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> - Speed scaling ratio. Default value: [code]1[/code]. A value of [code]0[/code] can be used to pause the particles. + <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> + Speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> - <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb"> + <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB( -4, -4, -4, 8, 8, 8 )"> The [AABB] that determines the area of the world part of which needs to be visible on screen for the particle system to be active. </member> </members> diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index a874e8f6a0..52b0c846ca 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -27,52 +27,52 @@ </method> </methods> <members> - <member name="amount" type="int" setter="set_amount" getter="get_amount"> + <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [constant DRAW_ORDER_INDEX]. + <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0"> + Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. </member> - <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting"> - If [code]true[/code], particles are being emitted. Default value: [code]true[/code]. + <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> + If [code]true[/code], particles are being emitted. </member> - <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio"> - How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. Default value: [code]0[/code]. + <member name="explosiveness" type="float" setter="set_explosiveness_ratio" getter="get_explosiveness_ratio" default="0.0"> + How rapidly particles in an emission cycle are emitted. If greater than [code]0[/code], there will be a gap in emissions before the next cycle begins. </member> - <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps"> + <member name="fixed_fps" type="int" setter="set_fixed_fps" getter="get_fixed_fps" default="0"> The particle system's frame rate is fixed to a value. For instance, changing the value to 2 will make the particles render at 2 frames per second. Note this does not slow down the simulation of the particle system itself. </member> - <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta"> - If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. Default value: [code]true[/code] + <member name="fract_delta" type="bool" setter="set_fractional_delta" getter="get_fractional_delta" default="true"> + If [code]true[/code], results in fractional delta calculation which has a smoother particles display effect. </member> - <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime"> - Amount of time each particle will exist. Default value: [code]1[/code]. + <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> + Amount of time each particle will exist. </member> - <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates"> - If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. Default value: [code]true[/code]. + <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> + If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" default="null"> Normal map to be used for the [member texture] property. </member> - <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot"> - If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. Default value: [code]false[/code]. + <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> + If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. </member> - <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time"> + <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> - <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material"> + <member name="process_material" type="Material" setter="set_process_material" getter="get_process_material" default="null"> [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. </member> - <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio"> - Emission lifetime randomness ratio. Default value: [code]0[/code]. + <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> + Emission lifetime randomness ratio. </member> - <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale"> - Particle system's running speed scaling ratio. Default value: [code]1[/code]. A value of [code]0[/code] can be used to pause the particles. + <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> + Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> - Particle texture. If [code]null[/code] particles will be squares. + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> + Particle texture. If [code]null[/code], particles will be squares. </member> - <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect"> + <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )"> Editor visibility helper. </member> </members> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 00862e5672..e0618a87c1 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -13,58 +13,58 @@ <methods> </methods> <members> - <member name="angle" type="float" setter="set_param" getter="get_param"> + <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> Initial rotation applied to each particle, in degrees. - Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES]. </member> - <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="angle_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's rotation will be animated along this [CurveTexture]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Rotation randomness ratio. Default value: [code]0[/code]. + <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Rotation randomness ratio. </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param"> + <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. - Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. + Only applied when [member flag_disable_z] or [member flag_rotate_y] are [code]true[/code] or the [SpatialMaterial] being used to draw the particle is using [constant SpatialMaterial.BILLBOARD_PARTICLES]. </member> - <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="angular_velocity_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's angular velocity will vary along this [CurveTexture]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Angular velocity randomness ratio. Default value: [code]0[/code]. + <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Angular velocity randomness ratio. </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param"> + <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation offset. </member> - <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="anim_offset_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's animation offset will vary along this [CurveTexture]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Animation offset randomness ratio. Default value: [code]0[/code]. + <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Animation offset randomness ratio. </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param"> + <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> Particle animation speed. </member> - <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="anim_speed_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's animation speed will vary along this [CurveTexture]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Animation speed randomness ratio. Default value: [code]0[/code]. + <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Animation speed randomness ratio. </member> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> Each particle's initial color. If the [Particles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [SpatialMaterial] make sure to set [member SpatialMaterial.vertex_color_use_as_albedo] to [code]true[/code]. </member> - <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp"> + <member name="color_ramp" type="Texture" setter="set_color_ramp" getter="get_color_ramp" default="null"> Each particle's color will vary along this [GradientTexture]. </member> - <member name="damping" type="float" setter="set_param" getter="get_param"> + <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> The rate at which particles lose velocity. </member> - <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="damping_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Damping will vary along this [CurveTexture]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Damping randomness ratio. Default value: [code]0[/code]. + <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Damping randomness ratio. </member> <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> The box's extents if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_BOX]. @@ -81,50 +81,50 @@ <member name="emission_point_texture" type="Texture" setter="set_emission_point_texture" getter="get_emission_point_texture"> Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> - <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape"> - Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. Default value: [constant EMISSION_SHAPE_POINT]. + <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0"> + Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE]. </member> - <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag"> - Align y-axis of particle with the direction of its velocity. + <member name="flag_align_y" type="bool" setter="set_flag" getter="get_flag" default="false"> + Align Y axis of particle with the direction of its velocity. </member> - <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], particles will not move on the z axis. Default value: [code]true[/code] for [Particles2D], [code]false[/code] for [Particles]. + <member name="flag_disable_z" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], particles will not move on the z axis. </member> - <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], particles rotate around y-axis by [member angle]. + <member name="flag_rotate_y" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], particles rotate around Y axis by [member angle]. </member> - <member name="flatness" type="float" setter="set_flatness" getter="get_flatness"> - Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. Default [code]0[/code]. + <member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0"> + Amount of [member spread] in Y/Z plane. A value of [code]1[/code] restricts particles to X/Z plane. </member> - <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity"> - Gravity applied to every particle. Default value: [code](0, -9.8, 0)[/code]. + <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3( 0, -9.8, 0 )"> + Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param"> + <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> Initial hue variation applied to each particle. </member> - <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="hue_variation_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's hue will vary along this [CurveTexture]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Hue variation randomness ratio. Default value: [code]0[/code]. + <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Hue variation randomness ratio. </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param"> + <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Initial velocity randomness ratio. Default value: [code]0[/code]. + <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Initial velocity randomness ratio. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param"> + <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Linear acceleration applied to each particle in the direction of motion. </member> - <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="linear_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's linear acceleration will vary along this [CurveTexture]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Linear acceleration randomness ratio. Default value: [code]0[/code]. + <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Linear acceleration randomness ratio. </member> <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. @@ -134,45 +134,45 @@ Each particle's orbital velocity will vary along this [CurveTexture]. </member> <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Orbital velocity randomness ratio. Default value: [code]0[/code]. + Orbital velocity randomness ratio. </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param"> + <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Radial acceleration applied to each particle. Makes particle accelerate away from origin. </member> - <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="radial_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's radial acceleration will vary along this [CurveTexture]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Radial acceleration randomness ratio. Default value: [code]0[/code]. + <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Radial acceleration randomness ratio. </member> - <member name="scale" type="float" setter="set_param" getter="get_param"> + <member name="scale" type="float" setter="set_param" getter="get_param" default="1.0"> Initial scale applied to each particle. </member> - <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="scale_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's scale will vary along this [CurveTexture]. </member> - <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Scale randomness ratio. Default value: [code]0[/code]. + <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Scale randomness ratio. </member> - <member name="spread" type="float" setter="set_spread" getter="get_spread"> - Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Default value: [code]45[/code]. Applied to X/Z plane and Y/Z planes. + <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> + Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param"> + <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. </member> - <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture"> + <member name="tangential_accel_curve" type="Texture" setter="set_param_texture" getter="get_param_texture" default="null"> Each particle's tangential acceleration will vary along this [CurveTexture]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Tangential acceleration randomness ratio. Default value: [code]0[/code]. + <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> + Tangential acceleration randomness ratio. </member> - <member name="trail_color_modifier" type="GradientTexture" setter="set_trail_color_modifier" getter="get_trail_color_modifier"> + <member name="trail_color_modifier" type="GradientTexture" setter="set_trail_color_modifier" getter="get_trail_color_modifier" default="null"> Trail particles' color will vary along this [GradientTexture]. </member> - <member name="trail_divisor" type="int" setter="set_trail_divisor" getter="get_trail_divisor"> + <member name="trail_divisor" type="int" setter="set_trail_divisor" getter="get_trail_divisor" default="1"> Emitter will emit [code]amount[/code] divided by [code]trail_divisor[/code] particles. The remaining particles will be used as trail(s). </member> - <member name="trail_size_modifier" type="CurveTexture" setter="set_trail_size_modifier" getter="get_trail_size_modifier"> + <member name="trail_size_modifier" type="CurveTexture" setter="set_trail_size_modifier" getter="get_trail_size_modifier" default="null"> Trail particles' size will vary along this [CurveTexture]. </member> </members> diff --git a/doc/classes/Path.xml b/doc/classes/Path.xml index 12ae8fd3d5..5c1100e670 100644 --- a/doc/classes/Path.xml +++ b/doc/classes/Path.xml @@ -12,7 +12,11 @@ <methods> </methods> <members> - <member name="curve" type="Curve3D" setter="set_curve" getter="get_curve"> + <member name="curve" type="Curve3D" setter="set_curve" getter="get_curve" default="Object(Curve3D,"resource_local_to_scene":false,"resource_name":"","bake_interval":0.2,"_data":{ +"points": PoolVector3Array( ), +"tilts": PoolRealArray( ) +},"up_vector_enabled":true,"script":null) +"> A [Curve3D] describing the path. </member> </members> diff --git a/doc/classes/Path2D.xml b/doc/classes/Path2D.xml index a50df96bda..960cd5163d 100644 --- a/doc/classes/Path2D.xml +++ b/doc/classes/Path2D.xml @@ -4,15 +4,18 @@ Contains a [Curve2D] path for [PathFollow2D] nodes to follow. </brief_description> <description> - Can have [PathFollow2D] child nodes moving along the [Curve2D]. See [PathFollow2D] for more information on the usage. - Note that the path is considered as relative to the moved nodes (children of [PathFollow2D]). As such, the curve should usually start with a zero vector [code](0, 0)[/code]. + Can have [PathFollow2D] child nodes moving along the [Curve2D]. See [PathFollow2D] for more information on usage. + [b]Note:[/b] The path is considered as relative to the moved nodes (children of [PathFollow2D]). As such, the curve should usually start with a zero vector ([code](0, 0)[/code]). </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="curve" type="Curve2D" setter="set_curve" getter="get_curve"> + <member name="curve" type="Curve2D" setter="set_curve" getter="get_curve" default="Object(Curve2D,"resource_local_to_scene":false,"resource_name":"","bake_interval":5.0,"_data":{ +"points": PoolVector2Array( ) +},"script":null) +"> A [Curve2D] describing the path. </member> </members> diff --git a/doc/classes/PathFollow.xml b/doc/classes/PathFollow.xml index f0b238eb1d..0b4a781a7e 100644 --- a/doc/classes/PathFollow.xml +++ b/doc/classes/PathFollow.xml @@ -5,34 +5,34 @@ </brief_description> <description> This node takes its parent [Path], and returns the coordinates of a point within it, given a distance from the first vertex. - It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. + It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> + <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true"> If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. The points along the [Curve3D] of the [Path] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. </member> - <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset"> + <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0"> The node's offset along the curve. </member> - <member name="loop" type="bool" setter="set_loop" getter="has_loop"> + <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="true"> If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. </member> - <member name="offset" type="float" setter="set_offset" getter="get_offset"> + <member name="offset" type="float" setter="set_offset" getter="get_offset" default="0.0"> The distance from the first vertex, measured in 3D units along the path. This sets this node's position to a point within the path. </member> - <member name="rotation_mode" type="int" setter="set_rotation_mode" getter="get_rotation_mode" enum="PathFollow.RotationMode"> + <member name="rotation_mode" type="int" setter="set_rotation_mode" getter="get_rotation_mode" enum="PathFollow.RotationMode" default="3"> Allows or forbids rotation on one or more axes, depending on the [enum RotationMode] constants being used. </member> - <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset"> + <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset" default="0.0"> The distance from the first vertex, considering 0.0 as the first vertex and 1.0 as the last. This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. </member> - <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset"> + <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0"> The node's offset perpendicular to the curve. </member> </members> diff --git a/doc/classes/PathFollow2D.xml b/doc/classes/PathFollow2D.xml index 6f38b9f08d..9c4624dfee 100644 --- a/doc/classes/PathFollow2D.xml +++ b/doc/classes/PathFollow2D.xml @@ -5,37 +5,37 @@ </brief_description> <description> This node takes its parent [Path2D], and returns the coordinates of a point within it, given a distance from the first vertex. - It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be descendants of this node. Then, when setting an offset in this node, the descendant nodes will move accordingly. + It is useful for making other nodes follow a path, without coding the movement pattern. For that, the nodes must be children of this node. The descendant nodes will then move accordingly when setting an offset in this node. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation"> + <member name="cubic_interp" type="bool" setter="set_cubic_interpolation" getter="get_cubic_interpolation" default="true"> If [code]true[/code], the position between two cached points is interpolated cubically, and linearly otherwise. The points along the [Curve2D] of the [Path2D] are precomputed before use, for faster calculations. The point at the requested offset is then calculated interpolating between two adjacent cached points. This may present a problem if the curve makes sharp turns, as the cached points may not follow the curve closely enough. - There are two answers to this problem: Either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. + There are two answers to this problem: either increase the number of cached points and increase memory consumption, or make a cubic interpolation between two points at the cost of (slightly) slower calculations. </member> - <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset"> + <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0"> The node's offset along the curve. </member> - <member name="lookahead" type="float" setter="set_lookahead" getter="get_lookahead"> - How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations. Default value: [code]4[/code]. + <member name="lookahead" type="float" setter="set_lookahead" getter="get_lookahead" default="4.0"> + How far to look ahead of the curve to calculate the tangent if the node is rotating. E.g. shorter lookaheads will lead to faster rotations. </member> - <member name="loop" type="bool" setter="set_loop" getter="has_loop"> + <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="true"> If [code]true[/code], any offset outside the path's length will wrap around, instead of stopping at the ends. Use it for cyclic paths. </member> - <member name="offset" type="float" setter="set_offset" getter="get_offset"> + <member name="offset" type="float" setter="set_offset" getter="get_offset" default="0.0"> The distance along the path in pixels. </member> - <member name="rotate" type="bool" setter="set_rotate" getter="is_rotating"> + <member name="rotate" type="bool" setter="set_rotate" getter="is_rotating" default="true"> If [code]true[/code], this node rotates to follow the path, making its descendants rotate. </member> - <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset"> + <member name="unit_offset" type="float" setter="set_unit_offset" getter="get_unit_offset" default="0.0"> The distance along the path as a number in the range 0.0 (for the first vertex) to 1.0 (for the last). This is just another way of expressing the offset within the path, as the offset supplied is multiplied internally by the path's length. </member> - <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset"> + <member name="v_offset" type="float" setter="set_v_offset" getter="get_v_offset" default="0.0"> The node's offset perpendicular to the curve. </member> </members> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index 3bcc001a2b..a2b5856624 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -4,8 +4,9 @@ Exposes performance-related data. </brief_description> <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 [i]Monitor[/i] tab in the editor's [i]Debugger[/i] panel. By using the [method get_monitor] method of this class, you can access this data from your code. Note that a few of these monitors are only available in debug mode and will always return 0 when used in a release build. - Many of these monitors are not updated in real-time, so there may be a short delay between changes. + 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. + [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. </description> <tutorials> </tutorials> @@ -67,7 +68,7 @@ Vertices drawn per frame. 3D only. </constant> <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="14" enum="Monitor"> - Material changes per frame. 3D only + Material changes per frame. 3D only. </constant> <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="15" enum="Monitor"> Shader changes per frame. 3D only. diff --git a/doc/classes/PhysicalBone.xml b/doc/classes/PhysicalBone.xml index bf379afab8..583c24e2c0 100644 --- a/doc/classes/PhysicalBone.xml +++ b/doc/classes/PhysicalBone.xml @@ -33,21 +33,21 @@ </method> </methods> <members> - <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset"> + <member name="body_offset" type="Transform" setter="set_body_offset" getter="get_body_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> - <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> + <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> </member> - <member name="friction" type="float" setter="set_friction" getter="get_friction"> + <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0"> </member> - <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale"> + <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> </member> - <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset"> + <member name="joint_offset" type="Transform" setter="set_joint_offset" getter="get_joint_offset" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> - <member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone.JointType"> + <member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone.JointType" default="0"> </member> - <member name="mass" type="float" setter="set_mass" getter="get_mass"> + <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> </member> - <member name="weight" type="float" setter="set_weight" getter="get_weight"> + <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8"> </member> </members> <constants> diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml index 1fd578ecd8..af3bba9b86 100644 --- a/doc/classes/Physics2DDirectBodyState.xml +++ b/doc/classes/Physics2DDirectBodyState.xml @@ -56,7 +56,7 @@ <argument index="1" name="impulse" type="Vector2"> </argument> <description> - Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. + Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> @@ -135,7 +135,8 @@ <return type="int"> </return> <description> - Returns the number of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. See [member RigidBody2D.contact_monitor]. + Returns the number of contacts this body has with other bodies. + [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor]. </description> </method> <method name="get_contact_local_normal" qualifiers="const"> diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml index 040d7d05c3..e11e8918cd 100644 --- a/doc/classes/Physics2DDirectSpaceState.xml +++ b/doc/classes/Physics2DDirectSpaceState.xml @@ -16,8 +16,8 @@ <argument index="0" name="shape" type="Physics2DShapeQueryParameters"> </argument> <description> - Checks how far the shape can travel toward a point. Note that both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. - If the shape can not move, the array will be empty. + Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty. + [b]Note:[/b] Both the shape and the motion are supplied through a [Physics2DShapeQueryParameters] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. </description> </method> <method name="collide_shape"> @@ -37,7 +37,8 @@ <argument index="0" name="shape" type="Physics2DShapeQueryParameters"> </argument> <description> - Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. Note that this method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields: + Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. + [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields: [code]collider_id[/code]: The colliding object's ID. [code]linear_velocity[/code]: The colliding object's velocity [Vector2]. If the object is an [Area2D], the result is [code](0, 0)[/code]. [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. @@ -45,7 +46,6 @@ [code]point[/code]: The intersection point. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - If the shape did not intersect anything, then an empty dictionary is returned instead. </description> </method> <method name="intersect_point"> @@ -129,7 +129,8 @@ <argument index="1" name="max_results" type="int" default="32"> </argument> <description> - Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. Note that this method does not take into account the [code]motion[/code] property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields: + Checks the intersections of a shape, given through a [Physics2DShapeQueryParameters] object, against the space. + [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields: [code]collider[/code]: The colliding object. [code]collider_id[/code]: The colliding object's ID. [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method Physics2DServer.shape_set_data]. diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index de4a8c233e..ba00438ea1 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Physics2DServer" inherits="Object" category="Core" version="3.2"> <brief_description> - Physics 2D Server. + Server interface for low-level 2D physics access. </brief_description> <description> - Physics 2D Server is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. + Physics2DServer is the server responsible for all 2D physics. It can create many kinds of physics objects, but does not insert them on the node tree. </description> <tutorials> </tutorials> @@ -940,7 +940,7 @@ <argument index="0" name="joint" type="RID"> </argument> <description> - Returns the type of a joint (see [enum JointType]). + Returns a joint's type (see [enum JointType]). </description> </method> <method name="joint_set_param"> @@ -1017,7 +1017,7 @@ <argument index="0" name="shape" type="RID"> </argument> <description> - Returns the type of shape (see [enum ShapeType]). + Returns a shape's type (see [enum ShapeType]). </description> </method> <method name="shape_set_data"> @@ -1248,13 +1248,13 @@ <constant name="JOINT_PARAM_MAX_FORCE" value="2" enum="JointParam"> </constant> <constant name="DAMPED_STRING_REST_LENGTH" value="0" enum="DampedStringParam"> - Set the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. + Sets the resting length of the spring joint. The joint will always try to go to back this length when pulled apart. </constant> <constant name="DAMPED_STRING_STIFFNESS" value="1" enum="DampedStringParam"> - Set the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. + Sets the stiffness of the spring joint. The joint applies a force equal to the stiffness times the distance from its resting length. </constant> <constant name="DAMPED_STRING_DAMPING" value="2" enum="DampedStringParam"> - Set the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). + Sets the damping ratio of the spring joint. A value of 0 indicates an undamped spring, while 1 causes the system to reach equilibrium as fast as possible (critical damping). </constant> <constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode"> Disables continuous collision detection. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml index 43d9b71c94..7d46dd2876 100644 --- a/doc/classes/Physics2DShapeQueryParameters.xml +++ b/doc/classes/Physics2DShapeQueryParameters.xml @@ -15,31 +15,31 @@ <argument index="0" name="shape" type="Resource"> </argument> <description> - Set the [Shape2D] that will be used for collision/intersection queries. + Sets the [Shape2D] that will be used for collision/intersection queries. </description> </method> </methods> <members> - <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled"> + <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> </member> - <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled"> + <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647"> The physics layer the query should be made on. </member> - <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude"> + <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> The list of objects or object [RID]s, that will be excluded from collisions. </member> - <member name="margin" type="float" setter="set_margin" getter="get_margin"> + <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The collision margin for the shape. </member> - <member name="motion" type="Vector2" setter="set_motion" getter="get_motion"> + <member name="motion" type="Vector2" setter="set_motion" getter="get_motion" default="Vector2( 0, 0 )"> The motion of the shape being queried for. </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> - The [RID] of the queried shape. See [method set_shape] also. + The [RID] of the queried shape. See also [method set_shape]. </member> - <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform"> + <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> the transform matrix of the queried shape. </member> </members> diff --git a/doc/classes/Physics2DTestMotionResult.xml b/doc/classes/Physics2DTestMotionResult.xml index a0f8a1ca4c..410bffc0f0 100644 --- a/doc/classes/Physics2DTestMotionResult.xml +++ b/doc/classes/Physics2DTestMotionResult.xml @@ -9,23 +9,23 @@ <methods> </methods> <members> - <member name="collider" type="Object" setter="" getter="get_collider"> + <member name="collider" type="Object" setter="" getter="get_collider" default="null"> </member> - <member name="collider_id" type="int" setter="" getter="get_collider_id"> + <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> </member> <member name="collider_rid" type="RID" setter="" getter="get_collider_rid"> </member> - <member name="collider_shape" type="int" setter="" getter="get_collider_shape"> + <member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0"> </member> - <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity"> + <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2( 0, 0 )"> </member> - <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal"> + <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2( 0, 0 )"> </member> - <member name="collision_point" type="Vector2" setter="" getter="get_collision_point"> + <member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2( 0, 0 )"> </member> - <member name="motion" type="Vector2" setter="" getter="get_motion"> + <member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2( 0, 0 )"> </member> - <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder"> + <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2( 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml index fc4f2e18fd..ee50f5a6c3 100644 --- a/doc/classes/PhysicsBody.xml +++ b/doc/classes/PhysicsBody.xml @@ -77,15 +77,13 @@ </method> </methods> <members> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - Default value: 1 (the first layer/bit is enabled). </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this area scans for collisions. - Default value: 1 (the first layer/bit is enabled). </member> </members> <constants> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index a5024c2432..076131357b 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -77,15 +77,13 @@ </method> </methods> <members> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the [member collision_mask] property. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. - Default value: 1 (the first layer/bit is enabled). </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this area scans for collisions. - Default value: 1 (the first layer/bit is enabled). </member> <member name="layers" type="int" setter="_set_layers" getter="_get_layers"> Both [member collision_layer] and [member collision_mask]. Returns [member collision_layer] when accessed. Updates [member collision_layer] and [member collision_mask] when modified. diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index e556e8037a..e68d280cd1 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -57,7 +57,7 @@ <argument index="1" name="j" type="Vector3"> </argument> <description> - Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. + Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> @@ -66,7 +66,7 @@ <argument index="0" name="j" type="Vector3"> </argument> <description> - Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the passed in vector. + Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter. </description> </method> <method name="get_contact_collider" qualifiers="const"> @@ -127,7 +127,8 @@ <return type="int"> </return> <description> - Returns the number of contacts this body has with other bodies. Note that by default this returns 0 unless bodies are configured to log contacts. See [member RigidBody.contact_monitor]. + Returns the number of contacts this body has with other bodies. + [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody.contact_monitor]. </description> </method> <method name="get_contact_impulse" qualifiers="const"> diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml index b507b4f9f5..73f1416172 100644 --- a/doc/classes/PhysicsMaterial.xml +++ b/doc/classes/PhysicsMaterial.xml @@ -11,15 +11,15 @@ <methods> </methods> <members> - <member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent"> + <member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent" default="false"> </member> - <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - The body's bounciness. Default value: [code]0[/code]. + <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> + The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). </member> - <member name="friction" type="float" setter="set_friction" getter="get_friction"> - The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Default value: [code]1[/code]. + <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0"> + The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). </member> - <member name="rough" type="bool" setter="set_rough" getter="is_rough"> + <member name="rough" type="bool" setter="set_rough" getter="is_rough" default="false"> </member> </members> <constants> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index 77536e2b5b..a779a34e6a 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PhysicsServer" inherits="Object" category="Core" version="3.2"> <brief_description> - Server interface for low level physics access. + Server interface for low-level physics access. </brief_description> <description> - Everything related to physics in 3D. + PhysicsServer is the server responsible for all 3D physics. It can create many kinds of physics objects, but does not insert them on the node tree. </description> <tutorials> </tutorials> @@ -68,7 +68,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter"> </argument> <description> - Returns an area parameter value. A list of available parameters is on the AREA_PARAM_* constants. + Returns an area parameter value. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. </description> </method> <method name="area_get_shape" qualifiers="const"> @@ -221,7 +221,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets the value for an area parameter. A list of available parameters is on the AREA_PARAM_* constants. + Sets the value for an area parameter. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. </description> </method> <method name="area_set_ray_pickable"> @@ -292,7 +292,7 @@ <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode"> </argument> <description> - Sets the space override mode for the area. The modes are described in the constants AREA_SPACE_OVERRIDE_*. + Sets the space override mode for the area. The modes are described in the constants [code]AREA_SPACE_OVERRIDE_*[/code]. </description> </method> <method name="area_set_transform"> @@ -500,7 +500,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter"> </argument> <description> - Returns the value of a body parameter. A list of available parameters is on the BODY_PARAM_* constants. + Returns the value of a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. </description> </method> <method name="body_get_shape" qualifiers="const"> @@ -588,7 +588,7 @@ <argument index="0" name="body" type="RID"> </argument> <description> - If [code]true[/code], the body can be detected by rays + If [code]true[/code], the body can be detected by rays. </description> </method> <method name="body_remove_collision_exception"> @@ -739,7 +739,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a body parameter. A list of available parameters is on the BODY_PARAM_* constants. + Sets a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. </description> </method> <method name="body_set_ray_pickable"> @@ -1144,7 +1144,7 @@ <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType"> </argument> <description> - Creates a shape of type SHAPE_*. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + Creates a shape of type [code]SHAPE_*[/code]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. </description> </method> <method name="shape_get_data" qualifiers="const"> @@ -1162,7 +1162,7 @@ <argument index="0" name="shape" type="RID"> </argument> <description> - Returns the type of shape (see SHAPE_* constants). + Returns the type of shape (see [code]SHAPE_*[/code] constants). </description> </method> <method name="shape_set_data"> @@ -1257,7 +1257,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets the value for a space parameter. A list of available parameters is on the SPACE_PARAM_* constants. + Sets the value for a space parameter. A list of available parameters is on the [code]SPACE_PARAM_*[/code] constants. </description> </method> </methods> @@ -1318,10 +1318,10 @@ If [code]true[/code], a motor turns the Hinge </constant> <constant name="SLIDER_JOINT_LINEAR_LIMIT_UPPER" value="0" enum="SliderJointParam"> - The maximum difference between the pivot points on their x-axis before damping happens. + The maximum difference between the pivot points on their X axis before damping happens. </constant> <constant name="SLIDER_JOINT_LINEAR_LIMIT_LOWER" value="1" enum="SliderJointParam"> - The minimum difference between the pivot points on their x-axis before damping happens. + The minimum difference between the pivot points on their X axis before damping happens. </constant> <constant name="SLIDER_JOINT_LINEAR_LIMIT_SOFTNESS" value="2" enum="SliderJointParam"> A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. @@ -1390,7 +1390,7 @@ Swing is rotation from side to side, around the axis perpendicular to the twist axis. The swing span defines, how much rotation will not get corrected allong the swing axis. Could be defined as looseness in the [ConeTwistJoint]. - If below 0.05, this behavior is locked. Default value: [code]PI/4[/code]. + If below 0.05, this behavior is locked. </constant> <constant name="CONE_TWIST_JOINT_TWIST_SPAN" value="1" enum="ConeTwistJointParam"> Twist is the rotation around the twist axis, this value defined how far the joint can twist. diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml index c1f8b48d73..7d7307592e 100644 --- a/doc/classes/PhysicsShapeQueryParameters.xml +++ b/doc/classes/PhysicsShapeQueryParameters.xml @@ -17,19 +17,19 @@ </method> </methods> <members> - <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled"> + <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> </member> - <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled"> + <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> </member> - <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude"> + <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> </member> - <member name="margin" type="float" setter="set_margin" getter="get_margin"> + <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform"> + <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/PinJoint.xml b/doc/classes/PinJoint.xml index 4546377171..10ae3d27d9 100644 --- a/doc/classes/PinJoint.xml +++ b/doc/classes/PinJoint.xml @@ -1,36 +1,32 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PinJoint" inherits="Joint" category="Core" version="3.2"> <brief_description> - Pin Joint for 3D Shapes. + Pin joint for 3D shapes. </brief_description> <description> - Pin Joint for 3D Rigid Bodies. It pins 2 bodies (rigid or static) together. + Pin joint for 3D rigid bodies. It pins 2 bodies (rigid or static) together. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="params/bias" type="float" setter="set_param" getter="get_param"> - The force with which the pinned objects stay in positional relation to each other. - The higher, the stronger. + <member name="params/bias" type="float" setter="set_param" getter="get_param" default="0.3"> + The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. </member> - <member name="params/damping" type="float" setter="set_param" getter="get_param"> - The force with which the pinned objects stay in velocity relation to each other. - The higher, the stronger. + <member name="params/damping" type="float" setter="set_param" getter="get_param" default="1.0"> + The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. </member> - <member name="params/impulse_clamp" type="float" setter="set_param" getter="get_param"> + <member name="params/impulse_clamp" type="float" setter="set_param" getter="get_param" default="0.0"> If above 0, this value is the maximum value for an impulse that this Joint produces. </member> </members> <constants> <constant name="PARAM_BIAS" value="0" enum="Param"> - The force with which the pinned objects stay in positional relation to each other. - The higher, the stronger. + The force with which the pinned objects stay in positional relation to each other. The higher, the stronger. </constant> <constant name="PARAM_DAMPING" value="1" enum="Param"> - The force with which the pinned objects stay in velocity relation to each other. - The higher, the stronger. + The force with which the pinned objects stay in velocity relation to each other. The higher, the stronger. </constant> <constant name="PARAM_IMPULSE_CLAMP" value="2" enum="Param"> If above 0, this value is the maximum value for an impulse that this Joint produces. diff --git a/doc/classes/PinJoint2D.xml b/doc/classes/PinJoint2D.xml index 4a11ce30e1..f65cb86b1c 100644 --- a/doc/classes/PinJoint2D.xml +++ b/doc/classes/PinJoint2D.xml @@ -1,17 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PinJoint2D" inherits="Joint2D" category="Core" version="3.2"> <brief_description> - Pin Joint for 2D Shapes. + Pin Joint for 2D shapes. </brief_description> <description> - Pin Joint for 2D Rigid Bodies. It pins two bodies (rigid or static) together. + Pin Joint for 2D rigid bodies. It pins two bodies (rigid or static) together. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="softness" type="float" setter="set_softness" getter="get_softness"> + <member name="softness" type="float" setter="set_softness" getter="get_softness" default="0.0"> The higher this value, the more the bond to the pinned partner can flex. </member> </members> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index a5e5c7022f..69dfe28ac4 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -22,7 +22,7 @@ <argument index="3" name="d" type="float"> </argument> <description> - Creates a plane from the four parameters "a", "b", "c" and "d". + Creates a plane from the four parameters [code]a[/code], [code]b[/code], [code]c[/code] and [code]d[/code]. </description> </method> <method name="Plane"> @@ -62,7 +62,7 @@ <argument index="0" name="point" type="Vector3"> </argument> <description> - Returns the shortest distance from the plane to the position "point". + Returns the shortest distance from the plane to the position [code]point[/code]. </description> </method> <method name="get_any_point"> @@ -80,7 +80,7 @@ <argument index="1" name="epsilon" type="float" default="0.00001"> </argument> <description> - Returns [code]true[/code] if "point" is inside the plane (by a very minimum threshold). + Returns [code]true[/code] if [code]point[/code] is inside the plane (by a very minimum [code]epsilon[/code] threshold). </description> </method> <method name="intersect_3"> @@ -91,7 +91,7 @@ <argument index="1" name="c" type="Plane"> </argument> <description> - Returns the intersection point of the three planes "b", "c" and this plane. If no intersection is found null is returned. + Returns the intersection point of the three planes [code]b[/code], [code]c[/code] and this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="intersects_ray"> @@ -102,7 +102,7 @@ <argument index="1" name="dir" type="Vector3"> </argument> <description> - Returns the intersection point of a ray consisting of the position "from" and the direction normal "dir" with this plane. If no intersection is found null is returned. + Returns the intersection point of a ray consisting of the position [code]from[/code] and the direction normal [code]dir[/code] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="intersects_segment"> @@ -113,7 +113,7 @@ <argument index="1" name="end" type="Vector3"> </argument> <description> - Returns the intersection point of a segment from position "begin" to position "end" with this plane. If no intersection is found null is returned. + Returns the intersection point of a segment from position [code]begin[/code] to position [code]end[/code] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="is_point_over"> @@ -122,7 +122,7 @@ <argument index="0" name="point" type="Vector3"> </argument> <description> - Returns [code]true[/code] if "point" is located above the plane. + Returns [code]true[/code] if [code]point[/code] is located above the plane. </description> </method> <method name="normalized"> @@ -138,20 +138,20 @@ <argument index="0" name="point" type="Vector3"> </argument> <description> - Returns the orthogonal projection of point "p" into a point in the plane. + Returns the orthogonal projection of point [code]p[/code] into a point in the plane. </description> </method> </methods> <members> - <member name="d" type="float" setter="" getter=""> + <member name="d" type="float" setter="" getter="" default="0.0"> </member> - <member name="normal" type="Vector3" setter="" getter=""> + <member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> </member> - <member name="x" type="float" setter="" getter=""> + <member name="x" type="float" setter="" getter="" default="0.0"> </member> - <member name="y" type="float" setter="" getter=""> + <member name="y" type="float" setter="" getter="" default="0.0"> </member> - <member name="z" type="float" setter="" getter=""> + <member name="z" type="float" setter="" getter="" default="0.0"> </member> </members> <constants> diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml index a507f9f145..01aee93dad 100644 --- a/doc/classes/PlaneMesh.xml +++ b/doc/classes/PlaneMesh.xml @@ -11,14 +11,14 @@ <methods> </methods> <members> - <member name="size" type="Vector2" setter="set_size" getter="get_size"> - Size of the generated plane. Defaults to (2.0, 2.0). + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 2, 2 )"> + Size of the generated plane. </member> - <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth"> - Number of subdivision along the Z axis. Defaults to 0. + <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> + Number of subdivision along the Z axis. </member> - <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width"> - Number of subdivision along the X axis. Defaults to 0. + <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" default="0"> + Number of subdivision along the X axis. </member> </members> <constants> diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml index 83d8b09280..b94bb8e613 100644 --- a/doc/classes/PlaneShape.xml +++ b/doc/classes/PlaneShape.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="plane" type="Plane" setter="set_plane" getter="get_plane"> + <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 8f434e5499..6fc0d76d02 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -77,51 +77,52 @@ </method> </methods> <members> - <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased"> - If [code]true[/code], polygon edges will be anti-aliased. Default value: [code]false[/code]. + <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false"> + If [code]true[/code], polygon edges will be anti-aliased. </member> - <member name="bones" type="Array" setter="_set_bones" getter="_get_bones"> + <member name="bones" type="Array" setter="_set_bones" getter="_get_bones" default="[ ]"> </member> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 1, 1, 1, 1 )"> The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code]. </member> - <member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count"> + <member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count" default="0"> </member> - <member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border"> - Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error. Default value: [code]100[/code]. + <member name="invert_border" type="float" setter="set_invert_border" getter="get_invert_border" default="100.0"> + Added padding applied to the bounding box when using [code]invert[/code]. Setting this value too small may result in a "Bad Polygon" error. </member> - <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert"> - If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. Default value: [code]false[/code]. + <member name="invert_enable" type="bool" setter="set_invert" getter="get_invert" default="false"> + If [code]true[/code], polygon will be inverted, containing the area outside the defined points and extending to the [code]invert_border[/code]. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The offset applied to each vertex. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - The polygon's list of vertices. The final point will be connected to the first. Note that this returns a copy of the [PoolVector2Array] rather than a reference. + <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> + The polygon's list of vertices. The final point will be connected to the first. + [b]Note:[/b] This returns a copy of the [PoolVector2Array] rather than a reference. </member> - <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons"> + <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[ ]"> </member> - <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton"> + <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath("")"> </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> The polygon's fill texture. Use [code]uv[/code] to set texture coordinates. </member> - <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset"> + <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code]. </member> <member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation"> The texture's rotation in radians. </member> - <member name="texture_rotation_degrees" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees"> + <member name="texture_rotation_degrees" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees" default="0.0"> The texture's rotation in degrees. </member> - <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale"> + <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2( 1, 1 )"> Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa. </member> - <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv"> + <member name="uv" type="PoolVector2Array" setter="set_uv" getter="get_uv" default="PoolVector2Array( )"> Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code]. </member> - <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors"> + <member name="vertex_colors" type="PoolColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PoolColorArray( )"> Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code]. </member> </members> diff --git a/doc/classes/PoolByteArray.xml b/doc/classes/PoolByteArray.xml index cb99b660ae..08848e789b 100644 --- a/doc/classes/PoolByteArray.xml +++ b/doc/classes/PoolByteArray.xml @@ -4,7 +4,8 @@ A pooled [Array] of bytes. </brief_description> <description> - An [Array] specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold bytes. Optimized for memory usage, does not fragment the memory. + [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -15,21 +16,21 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [PoolByteArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PoolByteArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> <argument index="0" name="byte" type="int"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> <argument index="0" name="array" type="PoolByteArray"> </argument> <description> - Append a [PoolByteArray] at the end of this array. + Appends a [PoolByteArray] at the end of this array. </description> </method> <method name="compress"> @@ -74,33 +75,33 @@ <argument index="1" name="byte" type="int"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> <argument index="0" name="byte" type="int"> </argument> <description> - Append an element at the end of the array. + Appends an element at the end of the array. </description> </method> <method name="remove"> <argument index="0" name="idx" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="set"> @@ -109,14 +110,14 @@ <argument index="1" name="byte" type="int"> </argument> <description> - Change the byte at the given index. + Changes the byte at the given index. </description> </method> <method name="sha256_string"> <return type="String"> </return> <description> - Returns SHA256 string of the PoolByteArray. + Returns SHA-256 string of the PoolByteArray. </description> </method> <method name="size"> diff --git a/doc/classes/PoolColorArray.xml b/doc/classes/PoolColorArray.xml index efc3582ba4..a1fb868ef5 100644 --- a/doc/classes/PoolColorArray.xml +++ b/doc/classes/PoolColorArray.xml @@ -4,7 +4,8 @@ A pooled [Array] of [Color]. </brief_description> <description> - An [Array] specifically designed to hold [Color]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [Color]. Optimized for memory usage, does not fragment the memory. + [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -15,21 +16,21 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [PoolColorArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PoolColorArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> <argument index="0" name="color" type="Color"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> <argument index="0" name="array" type="PoolColorArray"> </argument> <description> - Append a [PoolColorArray] at the end of this array. + Appends a [PoolColorArray] at the end of this array. </description> </method> <method name="insert"> @@ -40,33 +41,33 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> <argument index="0" name="color" type="Color"> </argument> <description> - Append a value to the array. + Appends a value to the array. </description> </method> <method name="remove"> <argument index="0" name="idx" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="set"> @@ -75,7 +76,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Change the [Color] at the given index. + Changes the [Color] at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/PoolIntArray.xml b/doc/classes/PoolIntArray.xml index fca1083c25..730833b097 100644 --- a/doc/classes/PoolIntArray.xml +++ b/doc/classes/PoolIntArray.xml @@ -4,7 +4,8 @@ A pooled [Array] of integers ([int]). </brief_description> <description> - An [Array] specifically designed to hold integer values ([int]). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold integer values ([int]). Optimized for memory usage, does not fragment the memory. + [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -15,21 +16,21 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [PoolIntArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PoolIntArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> <argument index="0" name="integer" type="int"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> <argument index="0" name="array" type="PoolIntArray"> </argument> <description> - Append a [PoolIntArray] at the end of this array. + Appends a [PoolIntArray] at the end of this array. </description> </method> <method name="insert"> @@ -40,33 +41,33 @@ <argument index="1" name="integer" type="int"> </argument> <description> - Insert a new int at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new int at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> <argument index="0" name="integer" type="int"> </argument> <description> - Append a value to the array. + Appends a value to the array. </description> </method> <method name="remove"> <argument index="0" name="idx" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="set"> @@ -75,7 +76,7 @@ <argument index="1" name="integer" type="int"> </argument> <description> - Change the int at the given index. + Changes the int at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/PoolRealArray.xml b/doc/classes/PoolRealArray.xml index c5f6062175..7eaec82338 100644 --- a/doc/classes/PoolRealArray.xml +++ b/doc/classes/PoolRealArray.xml @@ -4,7 +4,8 @@ A pooled [Array] of reals ([float]). </brief_description> <description> - An [Array] specifically designed to hold floating point values ([float]). Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold floating-point values ([float]). Optimized for memory usage, does not fragment the memory. + [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -15,21 +16,21 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [PoolRealArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PoolRealArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> <argument index="0" name="value" type="float"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> <argument index="0" name="array" type="PoolRealArray"> </argument> <description> - Append a [PoolRealArray] at the end of this array. + Appends a [PoolRealArray] at the end of this array. </description> </method> <method name="insert"> @@ -40,33 +41,33 @@ <argument index="1" name="value" type="float"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> <argument index="0" name="value" type="float"> </argument> <description> - Append an element at the end of the array. + Appends an element at the end of the array. </description> </method> <method name="remove"> <argument index="0" name="idx" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="set"> @@ -75,7 +76,7 @@ <argument index="1" name="value" type="float"> </argument> <description> - Change the float at the given index. + Changes the float at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/PoolStringArray.xml b/doc/classes/PoolStringArray.xml index 01dca93be3..a408a18b19 100644 --- a/doc/classes/PoolStringArray.xml +++ b/doc/classes/PoolStringArray.xml @@ -4,7 +4,8 @@ A pooled [Array] of [String]. </brief_description> <description> - An [Array] specifically designed to hold [String]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [String]s. Optimized for memory usage, does not fragment the memory. + [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -15,21 +16,21 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [PoolStringArray]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PoolStringArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> <argument index="0" name="string" type="String"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> <argument index="0" name="array" type="PoolStringArray"> </argument> <description> - Append a [PoolStringArray] at the end of this array. + Appends a [PoolStringArray] at the end of this array. </description> </method> <method name="insert"> @@ -40,12 +41,12 @@ <argument index="1" name="string" type="String"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="join"> @@ -61,21 +62,21 @@ <argument index="0" name="string" type="String"> </argument> <description> - Append a string element at end of the array. + Appends a string element at end of the array. </description> </method> <method name="remove"> <argument index="0" name="idx" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="set"> @@ -84,7 +85,7 @@ <argument index="1" name="string" type="String"> </argument> <description> - Change the [String] at the given index. + Changes the [String] at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/PoolVector2Array.xml b/doc/classes/PoolVector2Array.xml index 45f619dc5d..623247e639 100644 --- a/doc/classes/PoolVector2Array.xml +++ b/doc/classes/PoolVector2Array.xml @@ -4,7 +4,8 @@ A pooled [Array] of [Vector2]. </brief_description> <description> - An [Array] specifically designed to hold [Vector2]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [Vector2]. Optimized for memory usage, does not fragment the memory. + [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -15,21 +16,21 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [PoolVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PoolVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> <argument index="0" name="vector2" type="Vector2"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> <argument index="0" name="array" type="PoolVector2Array"> </argument> <description> - Append a [PoolVector2Array] at the end of this array. + Appends a [PoolVector2Array] at the end of this array. </description> </method> <method name="insert"> @@ -40,33 +41,33 @@ <argument index="1" name="vector2" type="Vector2"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> <argument index="0" name="vector2" type="Vector2"> </argument> <description> - Insert a [Vector2] at the end. + Inserts a [Vector2] at the end. </description> </method> <method name="remove"> <argument index="0" name="idx" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="set"> @@ -75,7 +76,7 @@ <argument index="1" name="vector2" type="Vector2"> </argument> <description> - Change the [Vector2] at the given index. + Changes the [Vector2] at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/PoolVector3Array.xml b/doc/classes/PoolVector3Array.xml index 0a682e2baf..adc28b46cb 100644 --- a/doc/classes/PoolVector3Array.xml +++ b/doc/classes/PoolVector3Array.xml @@ -4,7 +4,8 @@ A pooled [Array] of [Vector3]. </brief_description> <description> - An [Array] specifically designed to hold [Vector3]. Optimized for memory usage, does not fragment the memory. Note that this type is passed by value and not by reference. + An [Array] specifically designed to hold [Vector3]. Optimized for memory usage, does not fragment the memory. + [b]Note:[/b] This type is passed by value and not by reference. </description> <tutorials> </tutorials> @@ -15,21 +16,21 @@ <argument index="0" name="from" type="Array"> </argument> <description> - Construct a new [PoolVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. + Constructs a new [PoolVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> <argument index="0" name="vector3" type="Vector3"> </argument> <description> - Append an element at the end of the array (alias of [method push_back]). + Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> <argument index="0" name="array" type="PoolVector3Array"> </argument> <description> - Append a [PoolVector3Array] at the end of this array. + Appends a [PoolVector3Array] at the end of this array. </description> </method> <method name="insert"> @@ -40,33 +41,33 @@ <argument index="1" name="vector3" type="Vector3"> </argument> <description> - Insert a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="invert"> <description> - Reverse the order of the elements in the array. + Reverses the order of the elements in the array. </description> </method> <method name="push_back"> <argument index="0" name="vector3" type="Vector3"> </argument> <description> - Insert a [Vector3] at the end. + Inserts a [Vector3] at the end. </description> </method> <method name="remove"> <argument index="0" name="idx" type="int"> </argument> <description> - Remove an element from the array by index. + Removes an element from the array by index. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size. + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="set"> @@ -75,7 +76,7 @@ <argument index="1" name="vector3" type="Vector3"> </argument> <description> - Change the [Vector3] at the given index. + Changes the [Vector3] at the given index. </description> </method> <method name="size"> diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index e1b51463b2..1e24aadfd9 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -24,7 +24,7 @@ <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> - Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by "size". + Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by [code]size[/code]. </description> </method> <method name="popup_centered_clamped"> @@ -58,19 +58,19 @@ </method> </methods> <members> - <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive"> + <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false"> If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event. </member> </members> <signals> <signal name="about_to_show"> <description> - This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context). + Emitted when a popup is about to be shown. This is often used in [PopupMenu] to clear the list of options then create a new one according to the current context. </description> </signal> <signal name="popup_hide"> <description> - This signal is emitted when a popup is hidden. + Emitted when a popup is hidden. </description> </signal> </signals> diff --git a/doc/classes/PopupDialog.xml b/doc/classes/PopupDialog.xml index b510208ae2..d85f568abf 100644 --- a/doc/classes/PopupDialog.xml +++ b/doc/classes/PopupDialog.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PopupDialog" inherits="Popup" category="Core" version="3.2"> <brief_description> - Base class for Popup Dialogs. + Base class for popup dialogs. </brief_description> <description> PopupDialog is a base class for popup dialogs, along with [WindowDialog]. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index d6249f73aa..a05aff9a59 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -4,7 +4,7 @@ PopupMenu displays a list of options. </brief_description> <description> - PopupMenu is the typical Control that displays a list of options. They are popular in toolbars or context menus. + [PopupMenu] is a [Control] that displays a list of options. They are popular in toolbars or context menus. </description> <tutorials> </tutorials> @@ -19,7 +19,9 @@ <argument index="2" name="accel" type="int" default="0"> </argument> <description> - Add a new checkable item with text "label". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + Adds a new checkable item with text [code]label[/code]. + An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> <method name="add_check_shortcut"> @@ -32,6 +34,9 @@ <argument index="2" name="global" type="bool" default="false"> </argument> <description> + Adds a new checkable item and assigns the specified [ShortCut] to it. Sets the label of the checkbox to the [ShortCut]'s name. + An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> <method name="add_icon_check_item"> @@ -46,8 +51,9 @@ <argument index="3" name="accel" type="int" default="0"> </argument> <description> - Add a new checkable item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator. If no id is provided, one will be - created from the index. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + Adds a new checkable item with text [code]label[/code] and icon [code]texture[/code]. + An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> <method name="add_icon_check_shortcut"> @@ -62,6 +68,9 @@ <argument index="3" name="global" type="bool" default="false"> </argument> <description> + Adds a new checkable item and assigns the specified [ShortCut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [ShortCut]'s name. + An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> <method name="add_icon_item"> @@ -76,7 +85,8 @@ <argument index="3" name="accel" type="int" default="0"> </argument> <description> - Add a new item with text "label" and icon "texture". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. + Adds a new item with text [code]label[/code] and icon [code]texture[/code]. + An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. </description> </method> <method name="add_icon_shortcut"> @@ -91,6 +101,8 @@ <argument index="3" name="global" type="bool" default="false"> </argument> <description> + Adds a new item and assigns the specified [ShortCut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [ShortCut]'s name. + An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. </description> </method> <method name="add_item"> @@ -103,7 +115,8 @@ <argument index="2" name="accel" type="int" default="0"> </argument> <description> - Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. + Adds a new item with text [code]label[/code]. + An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. </description> </method> <method name="add_radio_check_item"> @@ -116,7 +129,9 @@ <argument index="2" name="accel" type="int" default="0"> </argument> <description> - The same as [method add_check_item] but the inserted item will look as a radio button. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. + Adds a new radio button with text [code]label[/code]. + An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. + [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> <method name="add_radio_check_shortcut"> @@ -129,6 +144,9 @@ <argument index="2" name="global" type="bool" default="false"> </argument> <description> + Adds a new radio check button and assigns a [ShortCut] to it. Sets the label of the checkbox to the [ShortCut]'s name. + An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. + [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method set_item_checked] for more info on how to control it. </description> </method> <method name="add_separator"> @@ -137,7 +155,7 @@ <argument index="0" name="label" type="String" default=""""> </argument> <description> - Add a separator between items. Separators also occupy an index. + Adds a separator between items. Separators also occupy an index. </description> </method> <method name="add_shortcut"> @@ -150,6 +168,8 @@ <argument index="2" name="global" type="bool" default="false"> </argument> <description> + Adds a [ShortCut]. + An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. </description> </method> <method name="add_submenu_item"> @@ -162,14 +182,15 @@ <argument index="2" name="id" type="int" default="-1"> </argument> <description> - Adds an item with a submenu. The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. An id can optionally be provided, but if is isn't provided, one will be created from the index. + Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [code]submenu[/code] argument is the name of the child [PopupMenu] node that will be shown when the item is clicked. + An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. </description> </method> <method name="clear"> <return type="void"> </return> <description> - Clear the popup menu, in effect removing all items. + Removes all items from the [PopupMenu]. </description> </method> <method name="get_item_accelerator" qualifiers="const"> @@ -178,14 +199,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. + Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. </description> </method> <method name="get_item_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the amount of items. + Returns the number of items in the [PopupMenu]. </description> </method> <method name="get_item_icon" qualifiers="const"> @@ -194,7 +215,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the icon of the item at index "idx". + Returns the icon of the item at index [code]idx[/code]. </description> </method> <method name="get_item_id" qualifiers="const"> @@ -203,7 +224,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the id of the item at index "idx". + Returns the id of the item at index [code]idx[/code]. [code]id[/code] can be manually assigned, while index can not. </description> </method> <method name="get_item_index" qualifiers="const"> @@ -212,7 +233,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Find and return the index of the item containing a given id. + Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine. Index can not be set manualy. </description> </method> <method name="get_item_metadata" qualifiers="const"> @@ -221,7 +242,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the metadata of an item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items. + Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items. </description> </method> <method name="get_item_shortcut" qualifiers="const"> @@ -230,6 +251,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [ShortCut] associated with the specified [code]idx[/code] item. </description> </method> <method name="get_item_submenu" qualifiers="const"> @@ -238,7 +260,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the submenu name of the item at index "idx". + Returns the submenu name of the item at index [code]idx[/code]. See [method add_submenu_item] for more info on how to add a submenu. </description> </method> <method name="get_item_text" qualifiers="const"> @@ -247,7 +269,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns the text of the item at index "idx". + Returns the text of the item at index [code]idx[/code]. </description> </method> <method name="get_item_tooltip" qualifiers="const"> @@ -256,12 +278,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the tooltip associated with the specified index index [code]idx[/code]. </description> </method> <method name="is_hide_on_window_lose_focus" qualifiers="const"> <return type="bool"> </return> <description> + Returns whether the popup will be hidden when the window loses focus or not. </description> </method> <method name="is_item_checkable" qualifiers="const"> @@ -270,7 +294,8 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the item at index "idx" is checkable in some way, i.e., whether has a checkbox or radio button. Note that checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. + Returns [code]true[/code] if the item at index [code]idx[/code] is checkable in some way, i.e. if it has a checkbox or radio button. + [b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> <method name="is_item_checked" qualifiers="const"> @@ -279,7 +304,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the item at index "idx" is checked. + Returns [code]true[/code] if the item at index [code]idx[/code] is checked. </description> </method> <method name="is_item_disabled" qualifiers="const"> @@ -288,7 +313,8 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked. + Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. When it is disabled it can't be selected, or its action invoked. + See [method set_item_disabled] for more info on how to disable an item. </description> </method> <method name="is_item_radio_checkable" qualifiers="const"> @@ -297,7 +323,8 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the item at index "idx" has radio-button-style checkability. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. + Returns [code]true[/code] if the item at index [code]idx[/code] has radio button-style checkability. + [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. </description> </method> <method name="is_item_separator" qualifiers="const"> @@ -306,7 +333,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the item is a separator. If it is, it would be displayed as a line. + Returns [code]true[/code] if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator. </description> </method> <method name="is_item_shortcut_disabled" qualifiers="const"> @@ -315,6 +342,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns whether the shortcut of the specified item [code]idx[/code] is disabled or not. </description> </method> <method name="remove_item"> @@ -323,7 +351,8 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one. + Removes the item at index [code]idx[/code] from the menu. + [b]Note:[/b] The indices of items after the removed item will be shifted by one. </description> </method> <method name="set_hide_on_window_lose_focus"> @@ -332,6 +361,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> + Hides the [PopupMenu] when the window loses focus. </description> </method> <method name="set_item_accelerator"> @@ -342,7 +372,7 @@ <argument index="1" name="accel" type="int"> </argument> <description> - Set the accelerator of the item at index "idx". Accelerators are special combinations of keys that activate the item, no matter which control is focused. + Sets the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. </description> </method> <method name="set_item_as_checkable"> @@ -353,7 +383,8 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + Sets whether the item at index [code]idx[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text. + [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> <method name="set_item_as_radio_checkable"> @@ -364,8 +395,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - The same as [method set_item_as_checkable] but placing a radio button in case of enabling. If used for disabling, it's the same. - Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. + Sets the type of the item at the specified index [code]idx[/code] to radio button. If false, sets the type of the item to plain text. </description> </method> <method name="set_item_as_separator"> @@ -376,7 +406,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Mark the item at index "idx" as a separator, which means that it would be displayed as a line. + Mark the item at index [code]idx[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text. </description> </method> <method name="set_item_checked"> @@ -387,7 +417,7 @@ <argument index="1" name="checked" type="bool"> </argument> <description> - Set the checkstate status of the item at index "idx". + Sets the checkstate status of the item at index [code]idx[/code]. </description> </method> <method name="set_item_disabled"> @@ -398,7 +428,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - Sets whether the item at index "idx" is disabled or not. When it is disabled it can't be selected, or its action invoked. + Sets whether the item at index [code]idx[/code] is disabled or not. When it is disabled, it can't be selected and its action can't be invoked. </description> </method> <method name="set_item_icon"> @@ -409,6 +439,7 @@ <argument index="1" name="icon" type="Texture"> </argument> <description> + Replaces the [Texture] icon of the specified [code]idx[/code]. </description> </method> <method name="set_item_id"> @@ -419,7 +450,7 @@ <argument index="1" name="id" type="int"> </argument> <description> - Set the id of the item at index "idx". + Sets the [code]id[/code] of the item at index [code]idx[/code]. </description> </method> <method name="set_item_metadata"> @@ -430,7 +461,7 @@ <argument index="1" name="metadata" type="Variant"> </argument> <description> - Sets the metadata of an item, which might be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items. + Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items. </description> </method> <method name="set_item_multistate"> @@ -453,6 +484,7 @@ <argument index="2" name="global" type="bool" default="false"> </argument> <description> + Sets a [ShortCut] for the specified item [code]idx[/code]. </description> </method> <method name="set_item_shortcut_disabled"> @@ -463,6 +495,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> + Disables the [ShortCut] of the specified index [code]idx[/code]. </description> </method> <method name="set_item_submenu"> @@ -473,7 +506,7 @@ <argument index="1" name="submenu" type="String"> </argument> <description> - Sets the submenu of the item at index "idx". The submenu is the name of a child PopupMenu node that would be shown when the item is clicked. + Sets the submenu of the item at index [code]idx[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked. </description> </method> <method name="set_item_text"> @@ -484,7 +517,7 @@ <argument index="1" name="text" type="String"> </argument> <description> - Set the text of the item at index "idx". + Sets the text of the item at index [code]idx[/code]. </description> </method> <method name="set_item_tooltip"> @@ -495,6 +528,7 @@ <argument index="1" name="tooltip" type="String"> </argument> <description> + Sets the [String] tooltip of the item at the specified index [code]idx[/code]. </description> </method> <method name="toggle_item_checked"> @@ -503,6 +537,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Toggles the check state of the item of the specified index [code]idx[/code]. </description> </method> <method name="toggle_item_multistate"> @@ -515,17 +550,20 @@ </method> </methods> <members> - <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search"> - If [code]true[/code], allows to navigate [PopupMenu] with letter keys. Default value: [code]false[/code]. + <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="false"> + If [code]true[/code], allows to navigate [PopupMenu] with letter keys. </member> - <member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection"> + <member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true"> + If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected. </member> - <member name="hide_on_item_selection" type="bool" setter="set_hide_on_item_selection" getter="is_hide_on_item_selection"> + <member name="hide_on_item_selection" type="bool" setter="set_hide_on_item_selection" getter="is_hide_on_item_selection" default="true"> + If [code]true[/code], hides the [PopupMenu] when an item is selected. </member> - <member name="hide_on_state_item_selection" type="bool" setter="set_hide_on_state_item_selection" getter="is_hide_on_state_item_selection"> + <member name="hide_on_state_item_selection" type="bool" setter="set_hide_on_state_item_selection" getter="is_hide_on_state_item_selection" default="false"> + If [code]true[/code], hides the [PopupMenu] when a state item is selected. </member> - <member name="submenu_popup_delay" type="float" setter="set_submenu_popup_delay" getter="get_submenu_popup_delay"> - Sets the delay time for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. Default value: [code]0.3[/code] seconds. + <member name="submenu_popup_delay" type="float" setter="set_submenu_popup_delay" getter="get_submenu_popup_delay" default="0.3"> + Sets the delay time in seconds for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. </member> </members> <signals> @@ -533,21 +571,21 @@ <argument index="0" name="id" type="int"> </argument> <description> - This event is emitted when user navigated to an item of some id using [code]ui_up[/code] or [code]ui_down[/code] action. + Emitted when user navigated to an item of some [code]id[/code] using [code]ui_up[/code] or [code]ui_down[/code] action. </description> </signal> <signal name="id_pressed"> <argument index="0" name="id" type="int"> </argument> <description> - This event is emitted when an item of some id is pressed or its accelerator is activated. + Emitted when an item of some [code]id[/code] is pressed or its accelerator is activated. </description> </signal> <signal name="index_pressed"> <argument index="0" name="index" type="int"> </argument> <description> - This event is emitted when an item of some index is pressed or its accelerator is activated. + Emitted when an item of some [code]index[/code] is pressed or its accelerator is activated. </description> </signal> </signals> @@ -555,40 +593,55 @@ </constants> <theme_items> <theme_item name="checked" type="Texture"> + Sets a custom [Texture] icon for [code]checked[/code] state of checkbox items. </theme_item> <theme_item name="font" type="Font"> + Sets a custom [Font]. </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + Sets a custom [Color] for the [Font]. </theme_item> - <theme_item name="font_color_accel" type="Color"> + <theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )"> + Sets a custom [Color] for disabled text. </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> + Sets a custom [Color] for the hovered text. </theme_item> <theme_item name="hover" type="StyleBox"> + Sets a custom [StyleBox] when the [PopupMenu] is hovered. </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> + Sets the horizontal space separation between each item. </theme_item> <theme_item name="labeled_separator_left" type="StyleBox"> </theme_item> <theme_item name="labeled_separator_right" type="StyleBox"> </theme_item> <theme_item name="panel" type="StyleBox"> + Sets a custom [StyleBox] for the panel of the [PopupMenu]. </theme_item> <theme_item name="panel_disabled" type="StyleBox"> + Sets a custom [StyleBox] for the panel of the [PopupMenu], when the panel is disabled. </theme_item> <theme_item name="radio_checked" type="Texture"> + Sets a custom [Texture] icon for [code]checked[/code] of radio button items. </theme_item> <theme_item name="radio_unchecked" type="Texture"> + Sets a custom [Texture] icon for [code]unchecked[/code] of radio button items. </theme_item> <theme_item name="separator" type="StyleBox"> + Sets a custom [StyleBox] for separator's. </theme_item> <theme_item name="submenu" type="Texture"> + Sets a custom [Texture] for submenu's. </theme_item> <theme_item name="unchecked" type="Texture"> + Sets a custom [Texture] icon for [code]unchecked[/code] of checkbox items. </theme_item> - <theme_item name="vseparation" type="int"> + <theme_item name="vseparation" type="int" default="4"> + Sets the vertical space separation between each item. </theme_item> </theme_items> </class> diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml index 916bd99131..ccadee6018 100644 --- a/doc/classes/Position2D.xml +++ b/doc/classes/Position2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Position2D" inherits="Node2D" category="Core" version="3.2"> <brief_description> - Generic 2D Position hint for editing. + Generic 2D position hint for editing. </brief_description> <description> - Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times. You can set visual size of the cross by changing Gizmo Extents in the inspector. + Generic 2D position hint for editing. It's just like a plain [Node2D], but it displays as a cross in the 2D editor at all times. You can set cross' visual size by using the gizmo in the 2D editor while the node is selected. </description> <tutorials> </tutorials> diff --git a/doc/classes/Position3D.xml b/doc/classes/Position3D.xml index 247f1fb6a3..4d43a6729d 100644 --- a/doc/classes/Position3D.xml +++ b/doc/classes/Position3D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Position3D" inherits="Spatial" category="Core" version="3.2"> <brief_description> - Generic 3D Position hint for editing. + Generic 3D position hint for editing. </brief_description> <description> - Generic 3D Position hint for editing. It's just like a plain [Spatial] but displays as a cross in the 3D-Editor at all times. + Generic 3D position hint for editing. It's just like a plain [Spatial], but it displays as a cross in the 3D editor at all times. </description> <tutorials> </tutorials> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index 2214357308..83d4dea5b1 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -13,18 +13,18 @@ <return type="Array"> </return> <description> - Returns mesh arrays used to constitute surface of [Mesh]. Mesh array can be used with [ArrayMesh] to create new surface. + Returns mesh arrays used to constitute surface of [Mesh]. Mesh arrays can be used with [ArrayMesh] to create new surfaces. </description> </method> </methods> <members> - <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb"> + <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. </member> - <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces"> - If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial]. Default is false. + <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. Result is the same as using *CULL_BACK* in [SpatialMaterial]. </member> - <member name="material" type="Material" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> The current [Material] of the primitive mesh. </member> </members> diff --git a/doc/classes/PrismMesh.xml b/doc/classes/PrismMesh.xml index 62f1278bba..1d4e5ddab7 100644 --- a/doc/classes/PrismMesh.xml +++ b/doc/classes/PrismMesh.xml @@ -11,20 +11,20 @@ <methods> </methods> <members> - <member name="left_to_right" type="float" setter="set_left_to_right" getter="get_left_to_right"> - Displacement of the upper edge along the X axis. 0.0 positions edge straight above the bottom-left edge. Defaults to 0.5 (positioned on the midpoint). + <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"> - Size of the prism. Defaults to (2.0, 2.0, 2.0). + <member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3( 2, 2, 2 )"> + Size of the prism. </member> - <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth"> - Number of added edge loops along the Z axis. Defaults to 0. + <member name="subdivide_depth" type="int" setter="set_subdivide_depth" getter="get_subdivide_depth" default="0"> + Number of added edge loops along the Z axis. </member> - <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height"> - Number of added edge loops along the Y axis. Defaults to 0. + <member name="subdivide_height" type="int" setter="set_subdivide_height" getter="get_subdivide_height" default="0"> + Number of added edge loops along the Y axis. </member> - <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width"> - Number of added edge loops along the X axis. Defaults to 0. + <member name="subdivide_width" type="int" setter="set_subdivide_width" getter="get_subdivide_width" default="0"> + Number of added edge loops along the X axis. </member> </members> <constants> diff --git a/doc/classes/ProceduralSky.xml b/doc/classes/ProceduralSky.xml index 68deb5aff4..9ffca20081 100644 --- a/doc/classes/ProceduralSky.xml +++ b/doc/classes/ProceduralSky.xml @@ -4,60 +4,60 @@ Type of [Sky] that is generated procedurally based on user input parameters. </brief_description> <description> - ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. - The ProceduralSky is updated on the CPU after the parameters change and stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for realtime updates during gameplay. But with a small texture size it is still feasible to update relatively frequently because it is updated on a background thread when multi-threading is available. + ProceduralSky provides a way to create an effective background quickly by defining procedural parameters for the sun, the sky and the ground. The sky and ground are very similar, they are defined by a color at the horizon, another color, and finally an easing curve to interpolate between these two colors. Similarly, the sun is described by a position in the sky, a color, and an easing curve. However, the sun also defines a minimum and maximum angle, these two values define at what distance the easing curve begins and ends from the sun, and thus end up defining the size of the sun in the sky. + The ProceduralSky is updated on the CPU after the parameters change. It is stored in a texture and then displayed as a background in the scene. This makes it relatively unsuitable for real-time updates during gameplay. However, with a small enough texture size, it can still be updated relatively frequently, as it is updated on a background thread when multi-threading is available. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color"> + <member name="ground_bottom_color" type="Color" setter="set_ground_bottom_color" getter="get_ground_bottom_color" default="Color( 0.156863, 0.184314, 0.211765, 1 )"> Color of the ground at the bottom. </member> - <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve"> + <member name="ground_curve" type="float" setter="set_ground_curve" getter="get_ground_curve" default="0.02"> How quickly the [member ground_horizon_color] fades into the [member ground_bottom_color]. </member> - <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy"> + <member name="ground_energy" type="float" setter="set_ground_energy" getter="get_ground_energy" default="1.0"> Amount of energy contribution from the ground. </member> - <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color"> + <member name="ground_horizon_color" type="Color" setter="set_ground_horizon_color" getter="get_ground_horizon_color" default="Color( 0.423529, 0.396078, 0.372549, 1 )"> Color of the ground at the horizon. </member> - <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve"> + <member name="sky_curve" type="float" setter="set_sky_curve" getter="get_sky_curve" default="0.09"> How quickly the [member sky_horizon_color] fades into the [member sky_top_color]. </member> - <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy"> + <member name="sky_energy" type="float" setter="set_sky_energy" getter="get_sky_energy" default="1.0"> Amount of energy contribution from the sky. </member> - <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color"> + <member name="sky_horizon_color" type="Color" setter="set_sky_horizon_color" getter="get_sky_horizon_color" default="Color( 0.839216, 0.917647, 0.980392, 1 )"> Color of the sky at the horizon. </member> - <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color"> + <member name="sky_top_color" type="Color" setter="set_sky_top_color" getter="get_sky_top_color" default="Color( 0.647059, 0.839216, 0.945098, 1 )"> Color of the sky at the top. </member> - <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max"> + <member name="sun_angle_max" type="float" setter="set_sun_angle_max" getter="get_sun_angle_max" default="100.0"> Distance from center of sun where it fades out completely. </member> - <member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min"> + <member name="sun_angle_min" type="float" setter="set_sun_angle_min" getter="get_sun_angle_min" default="1.0"> Distance from sun where it goes from solid to starting to fade. </member> - <member name="sun_color" type="Color" setter="set_sun_color" getter="get_sun_color"> - Color of the sun. + <member name="sun_color" type="Color" setter="set_sun_color" getter="get_sun_color" default="Color( 1, 1, 1, 1 )"> + The sun's color. </member> - <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve"> + <member name="sun_curve" type="float" setter="set_sun_curve" getter="get_sun_curve" default="0.05"> How quickly the sun fades away between [member sun_angle_min] and [member sun_angle_max]. </member> - <member name="sun_energy" type="float" setter="set_sun_energy" getter="get_sun_energy"> + <member name="sun_energy" type="float" setter="set_sun_energy" getter="get_sun_energy" default="1.0"> Amount of energy contribution from the sun. </member> - <member name="sun_latitude" type="float" setter="set_sun_latitude" getter="get_sun_latitude"> - The suns height using polar coordinates. + <member name="sun_latitude" type="float" setter="set_sun_latitude" getter="get_sun_latitude" default="35.0"> + The sun's height using polar coordinates. </member> - <member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude"> + <member name="sun_longitude" type="float" setter="set_sun_longitude" getter="get_sun_longitude" default="0.0"> The direction of the sun using polar coordinates. </member> - <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize"> + <member name="texture_size" type="int" setter="set_texture_size" getter="get_texture_size" enum="ProceduralSky.TextureSize" default="2"> Size of [Texture] that the ProceduralSky will generate. The size is set using [enum TextureSize]. </member> </members> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 98d7e5c128..a8168958cf 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ProgressBar" inherits="Range" category="Core" version="3.2"> <brief_description> - General purpose progress bar. + General-purpose progress bar. </brief_description> <description> - General purpose progress bar. Shows fill percentage from right to left. + General-purpose progress bar. Shows fill percentage from right to left. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="percent_visible" type="bool" setter="set_percent_visible" getter="is_percent_visible"> - If [code]true[/code], the fill percentage is displayed on the bar. Default value: [code]true[/code]. + <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> @@ -24,9 +24,9 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_shadow" type="Color"> + <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> </theme_items> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 316f948778..3e9e063c0c 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -15,8 +15,8 @@ <argument index="0" name="hint" type="Dictionary"> </argument> <description> - Adds a custom property info to a property. The dictionary must contain: name:[String](the property's name) and type:[int](see TYPE_* in [@GlobalScope]), and optionally hint:[int](see PROPERTY_HINT_* in [@GlobalScope]), hint_string:[String]. - Example: + Adds a custom property info to a property. The dictionary must contain: name:[String](the property's name) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + [b]Example:[/b] [codeblock] ProjectSettings.set("category/property_name", 0) @@ -82,7 +82,7 @@ </argument> <description> Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success. - Note: If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code]. + [b]Note:[/b] If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code]. </description> </method> <method name="localize_path" qualifiers="const"> @@ -161,686 +161,751 @@ </method> </methods> <members> - <member name="android/modules" type="String" setter="" getter=""> + <member name="android/modules" type="String" setter="" getter="" default=""""> Comma-separated list of custom Android modules (which must have been built in the Android export templates) using their Java package path, e.g. [code]org/godotengine/org/GodotPaymentV3,org/godotengine/godot/MyCustomSingleton"[/code]. </member> - <member name="application/boot_splash/bg_color" type="Color" setter="" getter=""> + <member name="application/boot_splash/bg_color" type="Color" setter="" getter="" default="Color( 0.137255, 0.137255, 0.137255, 1 )"> Background color for the boot splash. </member> - <member name="application/boot_splash/fullsize" type="bool" setter="" getter=""> + <member name="application/boot_splash/fullsize" type="bool" setter="" getter="" default="true"> If [code]true[/code], scale the boot splash image to the full window length when engine starts. If [code]false[/code], the engine will leave it at the default pixel size. </member> - <member name="application/boot_splash/image" type="String" setter="" getter=""> + <member name="application/boot_splash/image" type="String" setter="" getter="" default=""""> Path to an image used as the boot splash. </member> - <member name="application/boot_splash/use_filter" type="bool" setter="" getter=""> + <member name="application/boot_splash/use_filter" type="bool" setter="" getter="" default="true"> If [code]true[/code], applies linear filtering when scaling the image (recommended for high resolution artwork). If [code]false[/code], uses nearest-neighbor interpolation (recommended for pixel art). </member> - <member name="application/config/custom_user_dir_name" type="String" setter="" getter=""> + <member name="application/config/custom_user_dir_name" type="String" setter="" getter="" default=""""> This user directory is used for storing persistent data ([code]user://[/code] filesystem). If left empty, [code]user://[/code] resolves to a project-specific folder in Godot's own configuration folder (see [method OS.get_user_data_dir]). If a custom directory name is defined, this name will be used instead and appended to the system-specific user data directory (same parent folder as the Godot configuration folder documented in [method OS.get_user_data_dir]). The [member application/config/use_custom_user_dir] setting must be enabled for this to take effect. </member> - <member name="application/config/icon" type="String" setter="" getter=""> + <member name="application/config/icon" type="String" setter="" getter="" default=""""> Icon used for the project, set when project loads. Exporters will also use this icon when possible. </member> - <member name="application/config/macos_native_icon" type="String" setter="" getter=""> + <member name="application/config/macos_native_icon" type="String" setter="" getter="" default=""""> </member> - <member name="application/config/name" type="String" setter="" getter=""> + <member name="application/config/name" type="String" setter="" getter="" default=""""> The project's name. It is used both by the Project Manager and by exporters. The project name can be translated by translating its value in localization files. </member> - <member name="application/config/project_settings_override" type="String" setter="" getter=""> + <member name="application/config/project_settings_override" type="String" setter="" getter="" default=""""> Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. </member> - <member name="application/config/use_custom_user_dir" type="bool" setter="" getter=""> + <member name="application/config/use_custom_user_dir" type="bool" setter="" getter="" default="false"> If [code]true[/code], the project will save user data to its own user directory (see [member application/config/custom_user_dir_name]). This setting is only effective on desktop platforms. A name must be set in the [member application/config/custom_user_dir_name] setting for this to take effect. If [code]false[/code], the project will save user data to [code](OS user data directory)/Godot/app_userdata/(project name)[/code]. </member> - <member name="application/config/windows_native_icon" type="String" setter="" getter=""> + <member name="application/config/windows_native_icon" type="String" setter="" getter="" default=""""> </member> - <member name="application/run/disable_stderr" type="bool" setter="" getter=""> + <member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false"> If [code]true[/code], disables printing to standard error in an exported build. </member> - <member name="application/run/disable_stdout" type="bool" setter="" getter=""> + <member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false"> If [code]true[/code], disables printing to standard output in an exported build. </member> - <member name="application/run/frame_delay_msec" type="int" setter="" getter=""> + <member name="application/run/frame_delay_msec" type="int" setter="" getter="" default="0"> Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization. </member> - <member name="application/run/low_processor_mode" type="bool" setter="" getter=""> + <member name="application/run/low_processor_mode" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables low-processor usage mode. This setting only works on desktop platforms. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games. </member> - <member name="application/run/low_processor_mode_sleep_usec" type="int" setter="" getter=""> + <member name="application/run/low_processor_mode_sleep_usec" type="int" setter="" getter="" default="6900"> Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. </member> - <member name="application/run/main_scene" type="String" setter="" getter=""> + <member name="application/run/main_scene" type="String" setter="" getter="" default=""""> Path to the main scene file that will be loaded when the project runs. </member> - <member name="audio/channel_disable_threshold_db" type="float" setter="" getter=""> + <member name="audio/channel_disable_threshold_db" type="float" setter="" getter="" default="-60.0"> Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. </member> - <member name="audio/channel_disable_time" type="float" setter="" getter=""> + <member name="audio/channel_disable_time" type="float" setter="" getter="" default="2.0"> Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. </member> - <member name="audio/default_bus_layout" type="String" setter="" getter=""> + <member name="audio/default_bus_layout" type="String" setter="" getter="" default=""res://default_bus_layout.tres""> </member> - <member name="audio/driver" type="String" setter="" getter=""> + <member name="audio/driver" type="String" setter="" getter="" default=""PulseAudio""> Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. </member> - <member name="audio/enable_audio_input" type="bool" setter="" getter=""> + <member name="audio/enable_audio_input" type="bool" setter="" getter="" default="false"> If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. </member> - <member name="audio/mix_rate" type="int" setter="" getter=""> + <member name="audio/mix_rate" type="int" setter="" getter="" default="44100"> Mixing rate used for audio. In general, it's better to not touch this and leave it to the host operating system. </member> - <member name="audio/output_latency" type="int" setter="" getter=""> + <member name="audio/output_latency" type="int" setter="" getter="" default="15"> Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware. </member> - <member name="audio/video_delay_compensation_ms" type="int" setter="" getter=""> + <member name="audio/video_delay_compensation_ms" type="int" setter="" getter="" default="0"> Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing. </member> - <member name="compression/formats/gzip/compression_level" type="int" setter="" getter=""> + <member name="compression/formats/gzip/compression_level" type="int" setter="" getter="" default="-1"> Default compression level for gzip. Affects compressed scenes and resources. </member> - <member name="compression/formats/zlib/compression_level" type="int" setter="" getter=""> + <member name="compression/formats/zlib/compression_level" type="int" setter="" getter="" default="-1"> Default compression level for Zlib. Affects compressed scenes and resources. </member> - <member name="compression/formats/zstd/compression_level" type="int" setter="" getter=""> + <member name="compression/formats/zstd/compression_level" type="int" setter="" getter="" default="3"> Default compression level for Zstandard. Affects compressed scenes and resources. </member> - <member name="compression/formats/zstd/long_distance_matching" type="bool" setter="" getter=""> + <member name="compression/formats/zstd/long_distance_matching" type="bool" setter="" getter="" default="false"> Enables long-distance matching in Zstandard. </member> - <member name="compression/formats/zstd/window_log_size" type="int" setter="" getter=""> + <member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27"> </member> - <member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter=""> + <member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter="" default="false"> If [code]true[/code], displays getters and setters in autocompletion results in the script editor. This setting is meant to be used when porting old projects (Godot 2), as using member variables is the preferred style from Godot 3 onwards. </member> - <member name="debug/gdscript/warnings/constant_used_as_function" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/constant_used_as_function" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a constant is used as a function. </member> - <member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/deprecated_keyword" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when deprecated keywords such as [code]slave[/code] are used. </member> - <member name="debug/gdscript/warnings/enable" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/enable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables specific GDScript warnings (see [code]debug/gdscript/warnings/*[/code] settings). If [code]false[/code], disables all GDScript warnings. </member> - <member name="debug/gdscript/warnings/function_conflicts_constant" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/function_conflicts_constant" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a function is declared with the same name as a constant. </member> - <member name="debug/gdscript/warnings/function_conflicts_variable" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/function_conflicts_variable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a function is declared with the same name as a variable. This will turn into an error in a future version when first-class functions become supported in GDScript. </member> - <member name="debug/gdscript/warnings/function_may_yield" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/function_may_yield" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a function assigned to a variable may yield and return a function state instead of a value. </member> - <member name="debug/gdscript/warnings/function_used_as_property" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/function_used_as_property" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when using a function as if it was a property. </member> - <member name="debug/gdscript/warnings/incompatible_ternary" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/incompatible_ternary" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a ternary operator may emit values with incompatible types. </member> - <member name="debug/gdscript/warnings/integer_division" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/integer_division" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when dividing an integer by another integer (the decimal part will be discarded). </member> - <member name="debug/gdscript/warnings/narrowing_conversion" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/narrowing_conversion" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when passing a floating-point value to a function that expects an integer (it will be converted and lose precision). </member> - <member name="debug/gdscript/warnings/property_used_as_function" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/property_used_as_function" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when using a property as if it was a function. </member> - <member name="debug/gdscript/warnings/return_value_discarded" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/return_value_discarded" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when calling a function without using its return value (by assigning it to a variable or using it as a function argument). Such return values are sometimes used to denote possible errors using the [enum Error] enum. </member> - <member name="debug/gdscript/warnings/shadowed_variable" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/shadowed_variable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when defining a local or subclass member variable that would shadow a variable at an upper level (such as a member variable). </member> - <member name="debug/gdscript/warnings/standalone_expression" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/standalone_expression" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. </member> - <member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/treat_warnings_as_errors" type="bool" setter="" getter="" default="false"> If [code]true[/code], all warnings will be reported as if they were errors. </member> - <member name="debug/gdscript/warnings/unassigned_variable" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unassigned_variable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when using a variable that wasn't previously assigned. </member> - <member name="debug/gdscript/warnings/unassigned_variable_op_assign" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unassigned_variable_op_assign" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when assigning a variable using an assignment operator like [code]+=[/code] if the variable wasn't previously assigned. </member> - <member name="debug/gdscript/warnings/unreachable_code" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unreachable_code" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when unreachable code is detected (such as after a [code]return[/code] statement that will always be executed). </member> - <member name="debug/gdscript/warnings/unsafe_call_argument" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unsafe_call_argument" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when using an expression whose type may not be compatible with the function parameter expected. </member> - <member name="debug/gdscript/warnings/unsafe_cast" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unsafe_cast" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when performing an unsafe cast. </member> - <member name="debug/gdscript/warnings/unsafe_method_access" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unsafe_method_access" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when calling a method whose presence is not guaranteed at compile-time in the class. </member> - <member name="debug/gdscript/warnings/unsafe_property_access" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unsafe_property_access" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when accessing a property whose presence is not guaranteed at compile-time in the class. </member> - <member name="debug/gdscript/warnings/unused_argument" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unused_argument" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a function parameter is unused. </member> - <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a member variable is unused. </member> - <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a signal is unused. </member> - <member name="debug/gdscript/warnings/unused_variable" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/unused_variable" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a local variable is unused. </member> - <member name="debug/gdscript/warnings/variable_conflicts_function" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/variable_conflicts_function" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a variable is declared with the same name as a function. This will turn into an error in a future version when first-class functions become supported in GDScript. </member> - <member name="debug/gdscript/warnings/void_assignment" type="bool" setter="" getter=""> + <member name="debug/gdscript/warnings/void_assignment" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when assigning the result of a function that returns [code]void[/code] to a variable. </member> - <member name="debug/settings/crash_handler/message" type="String" setter="" getter=""> + <member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default=""Please include this when reporting the bug on https://github.com/godotengine/godot/issues""> Message to be displayed before the backtrace when the engine crashes. </member> - <member name="debug/settings/fps/force_fps" type="int" setter="" getter=""> + <member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0"> </member> - <member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter=""> + <member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024"> Maximum call stack allowed for debugging GDScript. </member> - <member name="debug/settings/profiler/max_functions" type="int" setter="" getter=""> + <member name="debug/settings/profiler/max_functions" type="int" setter="" getter="" default="16384"> Maximum amount of functions per frame allowed when profiling. </member> - <member name="debug/settings/stdout/print_fps" type="bool" setter="" getter=""> + <member name="debug/settings/stdout/print_fps" type="bool" setter="" getter="" default="false"> Print frames per second to standard output every second. </member> - <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter=""> + <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false"> Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. </member> - <member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter=""> + <member name="debug/settings/visual_script/max_call_stack" type="int" setter="" getter="" default="1024"> Maximum call stack in visual scripting, to avoid infinite recursion. </member> - <member name="display/mouse_cursor/custom_image" type="String" setter="" getter=""> - Custom image for the mouse cursor (limited to 256x256). + <member name="display/mouse_cursor/custom_image" type="String" setter="" getter="" default=""""> + Custom image for the mouse cursor (limited to 256×256). </member> - <member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter=""> + <member name="display/mouse_cursor/custom_image_hotspot" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> Hotspot for the custom mouse cursor image. </member> - <member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter=""> + <member name="display/mouse_cursor/tooltip_position_offset" type="Vector2" setter="" getter="" default="Vector2( 10, 10 )"> Position offset for tooltips, relative to the mouse cursor's hotspot. </member> - <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter=""> + <member name="display/window/dpi/allow_hidpi" type="bool" setter="" getter="" default="false"> If [code]true[/code], allows HiDPI display on Windows and macOS. This setting has no effect on desktop Linux, as DPI-awareness fallbacks are not supported there. </member> - <member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter=""> + <member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true"> If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. </member> - <member name="display/window/handheld/orientation" type="String" setter="" getter=""> + <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> Default orientation on mobile devices. </member> - <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter=""> + <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false"> If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it. </member> - <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter=""> - Set the window background to transparent when it starts. + <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter="" default="false"> + Sets the window background to transparent when it starts. </member> - <member name="display/window/size/always_on_top" type="bool" setter="" getter=""> + <member name="display/window/size/always_on_top" type="bool" setter="" getter="" default="false"> Force the window to be always on top. </member> - <member name="display/window/size/borderless" type="bool" setter="" getter=""> + <member name="display/window/size/borderless" type="bool" setter="" getter="" default="false"> Force the window to be borderless. </member> - <member name="display/window/size/fullscreen" type="bool" setter="" getter=""> - Set the window to full screen when it starts. + <member name="display/window/size/fullscreen" type="bool" setter="" getter="" default="false"> + Sets the window to full screen when it starts. </member> - <member name="display/window/size/height" type="int" setter="" getter=""> - Set the main window height. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled. + <member name="display/window/size/height" type="int" setter="" getter="" default="600"> + Sets the main window height. On desktop, this is the default window size. Stretch mode settings use this also as a reference when enabled. </member> - <member name="display/window/size/resizable" type="bool" setter="" getter=""> + <member name="display/window/size/resizable" type="bool" setter="" getter="" default="true"> Allows the window to be resizable by default. </member> - <member name="display/window/size/test_height" type="int" setter="" getter=""> + <member name="display/window/size/test_height" type="int" setter="" getter="" default="0"> If greater than zero, uses a different height for the window when running from the editor. The main use for this is to test with stretch modes. </member> - <member name="display/window/size/test_width" type="int" setter="" getter=""> + <member name="display/window/size/test_width" type="int" setter="" getter="" default="0"> If greater than zero, uses a different width for the window when running from the editor. The main use for this is to test with stretch modes. </member> - <member name="display/window/size/width" type="int" setter="" getter=""> + <member name="display/window/size/width" type="int" setter="" getter="" default="1024"> Sets the main window width. On desktop platforms, this is the default window size. Stretch mode settings use this also as a reference when enabled. </member> - <member name="display/window/vsync/use_vsync" type="bool" setter="" getter=""> + <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5). </member> - <member name="editor/active" type="bool" setter="" getter=""> + <member name="editor/active" type="bool" setter="" getter="" default="false"> Internal editor setting, don't touch. </member> - <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter=""> + <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( "gd", "shader" )"> </member> - <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter=""> + <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0"> </member> - <member name="gui/common/swap_ok_cancel" type="bool" setter="" getter=""> + <member name="gui/common/swap_ok_cancel" type="bool" setter="" getter="" default="false"> If [code]true[/code], swaps OK and Cancel buttons in dialogs on Windows and UWP to follow interface conventions. </member> - <member name="gui/theme/custom" type="String" setter="" getter=""> + <member name="gui/theme/custom" type="String" setter="" getter="" default=""""> Use a custom theme resource, set a path to it here. </member> - <member name="gui/theme/custom_font" type="String" setter="" getter=""> + <member name="gui/theme/custom_font" type="String" setter="" getter="" default=""""> Use a custom default font resource, set a path to it here. </member> - <member name="gui/theme/use_hidpi" type="bool" setter="" getter=""> + <member name="gui/theme/use_hidpi" type="bool" setter="" getter="" default="false"> If [code]true[/code], makes sure the theme used works with HiDPI. </member> - <member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter=""> + <member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000"> Timer setting for incremental search in Tree, IntemList, etc. controls (in milliseconds). </member> - <member name="gui/timers/text_edit_idle_detect_sec" type="float" setter="" getter=""> + <member name="gui/timers/text_edit_idle_detect_sec" type="float" setter="" getter="" default="3"> Timer for detecting idle in the editor (in seconds). </member> - <member name="input/ui_accept" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_cancel" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_down" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_end" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_focus_next" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_focus_prev" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_home" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_left" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_page_down" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_page_up" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_right" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_select" type="Dictionary" setter="" getter=""> - </member> - <member name="input/ui_up" type="Dictionary" setter="" getter=""> - </member> - <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter=""> + <member name="input/ui_accept" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777222,"unicode":0,"echo":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) + ] +}"> + </member> + <member name="input/ui_cancel" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":1,"pressure":0.0,"pressed":false,"script":null) + ] +}"> + </member> + <member name="input/ui_down" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) + ] +}"> + </member> + <member name="input/ui_end" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777230,"unicode":0,"echo":false,"script":null) + ] +}"> + </member> + <member name="input/ui_focus_next" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) + ] +}"> + </member> + <member name="input/ui_focus_prev" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":true,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777218,"unicode":0,"echo":false,"script":null) + ] +}"> + </member> + <member name="input/ui_home" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777229,"unicode":0,"echo":false,"script":null) + ] +}"> + </member> + <member name="input/ui_left" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) + ] +}"> + </member> + <member name="input/ui_page_down" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777236,"unicode":0,"echo":false,"script":null) + ] +}"> + </member> + <member name="input/ui_page_up" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777235,"unicode":0,"echo":false,"script":null) + ] +}"> + </member> + <member name="input/ui_right" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) + ] +}"> + </member> + <member name="input/ui_select" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":3,"pressure":0.0,"pressed":false,"script":null) + ] +}"> + </member> + <member name="input/ui_up" type="Dictionary" setter="" getter="" default="{ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) + ] +}"> + </member> + <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true"> If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen. </member> - <member name="input_devices/pointing/emulate_touch_from_mouse" type="bool" setter="" getter=""> + <member name="input_devices/pointing/emulate_touch_from_mouse" type="bool" setter="" getter="" default="false"> If [code]true[/code], sends touch input events when clicking or dragging the mouse. </member> - <member name="layer_names/2d_physics/layer_1" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_10" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_10" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_11" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_11" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_12" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_12" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_13" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_13" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_14" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_14" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_15" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_15" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_16" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_16" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_17" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_17" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_18" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_18" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_19" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_19" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_2" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_2" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_20" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_20" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_3" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_3" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_4" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_4" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_5" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_5" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_6" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_6" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_7" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_7" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_8" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_8" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_physics/layer_9" type="String" setter="" getter=""> + <member name="layer_names/2d_physics/layer_9" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_1" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_1" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_10" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_10" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_11" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_11" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_12" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_12" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_13" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_13" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_14" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_14" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_15" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_15" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_16" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_16" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_17" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_17" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_18" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_18" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_19" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_19" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_2" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_2" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_20" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_20" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_3" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_3" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_4" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_4" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_5" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_5" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_6" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_6" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_7" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_7" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_8" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_8" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/2d_render/layer_9" type="String" setter="" getter=""> + <member name="layer_names/2d_render/layer_9" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_1" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_1" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_10" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_10" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_11" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_11" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_12" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_12" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_13" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_13" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_14" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_14" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_15" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_15" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_16" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_16" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_17" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_17" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_18" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_18" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_19" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_19" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_2" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_2" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_20" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_20" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_3" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_3" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_4" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_4" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_5" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_5" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_6" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_6" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_7" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_7" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_8" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_8" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_physics/layer_9" type="String" setter="" getter=""> + <member name="layer_names/3d_physics/layer_9" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_1" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_1" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_10" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_10" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_11" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_11" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_12" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_12" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_13" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_13" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_14" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_14" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_15" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_15" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_16" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_16" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_17" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_17" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_18" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_18" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_19" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_19" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_2" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_2" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_20" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_20" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_3" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_3" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_4" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_4" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_5" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_5" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_6" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_6" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_7" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_7" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_8" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_8" type="String" setter="" getter="" default=""""> </member> - <member name="layer_names/3d_render/layer_9" type="String" setter="" getter=""> + <member name="layer_names/3d_render/layer_9" type="String" setter="" getter="" default=""""> </member> - <member name="locale/fallback" type="String" setter="" getter=""> + <member name="locale/fallback" type="String" setter="" getter="" default=""en""> The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used. </member> - <member name="locale/test" type="String" setter="" getter=""> + <member name="locale/test" type="String" setter="" getter="" default=""""> If non-empty, this locale will be used when running the project from the editor. </member> - <member name="logging/file_logging/enable_file_logging" type="bool" setter="" getter=""> + <member name="logging/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false"> If [code]true[/code], logs all output to files. </member> - <member name="logging/file_logging/log_path" type="String" setter="" getter=""> + <member name="logging/file_logging/log_path" type="String" setter="" getter="" default=""user://logs/log.txt""> Path to logs within the project. Using an [code]user://[/code] path is recommended. </member> - <member name="logging/file_logging/max_log_files" type="int" setter="" getter=""> + <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="10"> Specifies the maximum amount of log files allowed (used for rotation). </member> - <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter=""> + <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="1024"> Godot uses a message queue to defer some function calls. If you run out of space on it (you will see an error), you can increase the size here. </member> - <member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter=""> + <member name="memory/limits/multithreaded_server/rid_pool_prealloc" type="int" setter="" getter="" default="60"> This is used by servers when used in multi-threading mode (servers and visual). RIDs are preallocated to avoid stalling the server requesting them on threads. If servers get stalled too often when loading resources in a thread, increase this number. </member> - <member name="network/limits/debugger_stdout/max_chars_per_second" type="int" setter="" getter=""> + <member name="network/limits/debugger_stdout/max_chars_per_second" type="int" setter="" getter="" default="2048"> Maximum amount of characters allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> - <member name="network/limits/debugger_stdout/max_errors_per_frame" type="int" setter="" getter=""> + <member name="network/limits/debugger_stdout/max_errors_per_frame" type="int" setter="" getter="" default="10"> Maximum amount of errors allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> - <member name="network/limits/debugger_stdout/max_messages_per_frame" type="int" setter="" getter=""> + <member name="network/limits/debugger_stdout/max_messages_per_frame" type="int" setter="" getter="" default="10"> Maximum amount of messages allowed to send as output from the debugger. Over this value, content is dropped. This helps not to stall the debugger connection. </member> - <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter=""> + <member name="network/limits/packet_peer_stream/max_buffer_po2" type="int" setter="" getter="" default="16"> Default size of packet peer stream for deserializing Godot data. Over this size, data is dropped. </member> - <member name="network/limits/websocket_client/max_in_buffer_kb" type="int" setter="" getter=""> + <member name="network/limits/websocket_client/max_in_buffer_kb" type="int" setter="" getter="" default="64"> </member> - <member name="network/limits/websocket_client/max_in_packets" type="int" setter="" getter=""> + <member name="network/limits/websocket_client/max_in_packets" type="int" setter="" getter="" default="1024"> </member> - <member name="network/limits/websocket_client/max_out_buffer_kb" type="int" setter="" getter=""> + <member name="network/limits/websocket_client/max_out_buffer_kb" type="int" setter="" getter="" default="64"> </member> - <member name="network/limits/websocket_client/max_out_packets" type="int" setter="" getter=""> + <member name="network/limits/websocket_client/max_out_packets" type="int" setter="" getter="" default="1024"> </member> - <member name="network/limits/websocket_server/max_in_buffer_kb" type="int" setter="" getter=""> + <member name="network/limits/websocket_server/max_in_buffer_kb" type="int" setter="" getter="" default="64"> </member> - <member name="network/limits/websocket_server/max_in_packets" type="int" setter="" getter=""> + <member name="network/limits/websocket_server/max_in_packets" type="int" setter="" getter="" default="1024"> </member> - <member name="network/limits/websocket_server/max_out_buffer_kb" type="int" setter="" getter=""> + <member name="network/limits/websocket_server/max_out_buffer_kb" type="int" setter="" getter="" default="64"> </member> - <member name="network/limits/websocket_server/max_out_packets" type="int" setter="" getter=""> + <member name="network/limits/websocket_server/max_out_packets" type="int" setter="" getter="" default="1024"> </member> - <member name="network/remote_fs/page_read_ahead" type="int" setter="" getter=""> + <member name="network/remote_fs/page_read_ahead" type="int" setter="" getter="" default="4"> Amount of read ahead used by remote filesystem. Higher values decrease the effects of latency at the cost of higher bandwidth usage. </member> - <member name="network/remote_fs/page_size" type="int" setter="" getter=""> + <member name="network/remote_fs/page_size" type="int" setter="" getter="" default="65536"> Page size used by remote filesystem (in bytes). </member> - <member name="node/name_casing" type="int" setter="" getter=""> + <member name="node/name_casing" type="int" setter="" getter="" default="0"> When creating node names automatically, set the type of casing in this project. This is mostly an editor setting. </member> - <member name="node/name_num_separator" type="int" setter="" getter=""> + <member name="node/name_num_separator" type="int" setter="" getter="" default="0"> What to use to separate node name from number. This is mostly an editor setting. </member> - <member name="physics/2d/physics_engine" type="String" setter="" getter=""> + <member name="physics/2d/default_gravity" type="int" setter="" getter="" default="98"> + </member> + <member name="physics/2d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> </member> - <member name="physics/2d/thread_model" type="int" setter="" getter=""> + <member name="physics/2d/thread_model" type="int" setter="" getter="" default="1"> Sets whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process. </member> - <member name="physics/3d/active_soft_world" type="bool" setter="" getter=""> + <member name="physics/3d/active_soft_world" type="bool" setter="" getter="" default="true"> + </member> + <member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8"> </member> - <member name="physics/3d/physics_engine" type="String" setter="" getter=""> + <member name="physics/3d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use. </member> - <member name="physics/common/physics_fps" type="int" setter="" getter=""> + <member name="physics/common/physics_fps" type="int" setter="" getter="" default="60"> Frames per second used in the physics. Physics always needs a fixed amount of frames per second. </member> - <member name="physics/common/physics_jitter_fix" type="float" setter="" getter=""> + <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS. </member> - <member name="rendering/environment/default_clear_color" type="Color" setter="" getter=""> + <member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )"> Default background clear color. Overriddable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method VisualServer.set_default_clear_color]. </member> - <member name="rendering/limits/buffers/blend_shape_max_buffer_size_kb" type="int" setter="" getter=""> + <member name="rendering/limits/buffers/blend_shape_max_buffer_size_kb" type="int" setter="" getter="" default="4096"> Max buffer size for blend shapes. Any blend shape bigger than this will not work. </member> - <member name="rendering/limits/buffers/canvas_polygon_buffer_size_kb" type="int" setter="" getter=""> + <member name="rendering/limits/buffers/canvas_polygon_buffer_size_kb" type="int" setter="" getter="" default="128"> Max buffer size for drawing polygons. Any polygon bigger than this will not work. </member> - <member name="rendering/limits/buffers/canvas_polygon_index_buffer_size_kb" type="int" setter="" getter=""> + <member name="rendering/limits/buffers/canvas_polygon_index_buffer_size_kb" type="int" setter="" getter="" default="128"> Max index buffer size for drawing polygons. Any polygon bigger than this will not work. </member> - <member name="rendering/limits/buffers/immediate_buffer_size_kb" type="int" setter="" getter=""> + <member name="rendering/limits/buffers/immediate_buffer_size_kb" type="int" setter="" getter="" default="2048"> Max buffer size for drawing immediate objects (ImmediateGeometry nodes). Nodes using more than this size will not work. </member> - <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter=""> + <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="65536"> Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves. </member> - <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter=""> + <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600"> Shaders have a time variable that constantly increases. At some point, it needs to be rolled back to zero to avoid precision errors on shader animations. This setting specifies when (in seconds). </member> - <member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter=""> + <member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter="" default="false"> Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details. If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend (so the bug stays if you use GLES3), and only desktop platforms. </member> - <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter=""> + <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter="" default="false"> If [code]true[/code], forces snapping of polygons to pixels in 2D rendering. May help in some pixel art styles. </member> - <member name="rendering/quality/depth_prepass/disable_for_vendors" type="String" setter="" getter=""> - Disable depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. + <member name="rendering/quality/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default=""PowerVR,Mali,Adreno,Apple""> + Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. </member> - <member name="rendering/quality/depth_prepass/enable" type="bool" setter="" getter=""> + <member name="rendering/quality/depth_prepass/enable" type="bool" setter="" getter="" default="true"> If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used. </member> - <member name="rendering/quality/directional_shadow/size" type="int" setter="" getter=""> + <member name="rendering/quality/directional_shadow/size" type="int" setter="" getter="" default="4096"> The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. </member> - <member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter=""> + <member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048"> </member> - <member name="rendering/quality/driver/driver_name" type="String" setter="" getter=""> + <member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default=""GLES3""> The video driver to use ("GLES2" or "GLES3"). - Note that the backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument, or by the [member rendering/quality/driver/fallback_to_gles2] option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time. + [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--video-driver[/code] command line argument, or by the [member rendering/quality/driver/fallback_to_gles2] option if the target system does not support GLES3 and falls back to GLES2. In such cases, this property is not updated, so use [method OS.get_current_video_driver] to query it at run-time. </member> - <member name="rendering/quality/driver/fallback_to_gles2" type="bool" setter="" getter=""> + <member name="rendering/quality/driver/fallback_to_gles2" type="bool" setter="" getter="" default="false"> If [code]true[/code], allows falling back to the GLES2 driver if the GLES3 driver is not supported. - Note that the two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the data pack's size. + [b]Note:[/b] The two video drivers are not drop-in replacements for each other, so a game designed for GLES3 might not work properly when falling back to GLES2. In particular, some features of the GLES3 backend are not available in GLES2. Enabling this setting also means that both ETC and ETC2 VRAM-compressed textures will be exported on Android and iOS, increasing the data pack's size. </member> - <member name="rendering/quality/filters/anisotropic_filter_level" type="int" setter="" getter=""> + <member name="rendering/quality/filters/anisotropic_filter_level" type="int" setter="" getter="" default="4"> Maximum anisotropic filter level used for textures with anisotropy enabled. Higher values will result in sharper textures when viewed from oblique angles, at the cost of performance. Only power-of-two values are valid (2, 4, 8, 16). </member> - <member name="rendering/quality/filters/use_nearest_mipmap_filter" type="bool" setter="" getter=""> + <member name="rendering/quality/filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used. </member> - <member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter=""> + <member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2"> Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). </member> - <member name="rendering/quality/intended_usage/framebuffer_allocation.mobile" type="int" setter="" getter=""> + <member name="rendering/quality/intended_usage/framebuffer_allocation.mobile" type="int" setter="" getter="" default="3"> </member> - <member name="rendering/quality/reflections/high_quality_ggx" type="bool" setter="" getter=""> + <member name="rendering/quality/reflections/high_quality_ggx" type="bool" setter="" getter="" default="true"> If [code]true[/code], uses a high amount of samples to create blurred variants of reflection probes and panorama backgrounds (sky). Those blurred variants are used by rough materials. </member> - <member name="rendering/quality/reflections/high_quality_ggx.mobile" type="bool" setter="" getter=""> + <member name="rendering/quality/reflections/high_quality_ggx.mobile" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter=""> + <member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter="" default="true"> If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise on reflections, but costs more performance and memory. </member> - <member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter=""> + <member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/quality/shading/force_blinn_over_ggx" type="bool" setter="" getter=""> + <member name="rendering/quality/shading/force_blinn_over_ggx" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model. </member> - <member name="rendering/quality/shading/force_blinn_over_ggx.mobile" type="bool" setter="" getter=""> + <member name="rendering/quality/shading/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true"> </member> - <member name="rendering/quality/shading/force_lambert_over_burley" type="bool" setter="" getter=""> + <member name="rendering/quality/shading/force_lambert_over_burley" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley. </member> - <member name="rendering/quality/shading/force_lambert_over_burley.mobile" type="bool" setter="" getter=""> + <member name="rendering/quality/shading/force_lambert_over_burley.mobile" type="bool" setter="" getter="" default="true"> </member> - <member name="rendering/quality/shading/force_vertex_shading" type="bool" setter="" getter=""> + <member name="rendering/quality/shading/force_vertex_shading" type="bool" setter="" getter="" default="false"> If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices. </member> - <member name="rendering/quality/shading/force_vertex_shading.mobile" type="bool" setter="" getter=""> + <member name="rendering/quality/shading/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true"> </member> - <member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter=""> + <member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="1"> Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/quality/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter=""> + <member name="rendering/quality/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2"> Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/quality/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter=""> + <member name="rendering/quality/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3"> Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/quality/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter=""> + <member name="rendering/quality/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4"> Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/quality/shadow_atlas/size" type="int" setter="" getter=""> + <member name="rendering/quality/shadow_atlas/size" type="int" setter="" getter="" default="4096"> Size for shadow atlas (used for OmniLights and SpotLights). See documentation. </member> - <member name="rendering/quality/shadow_atlas/size.mobile" type="int" setter="" getter=""> + <member name="rendering/quality/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048"> </member> - <member name="rendering/quality/shadows/filter_mode" type="int" setter="" getter=""> + <member name="rendering/quality/shadows/filter_mode" type="int" setter="" getter="" default="1"> Shadow filter mode. Higher-quality settings result in smoother shadows that flicker less when moving. "Disabled" is the fastest option, but also has the lowest quality. "PCF5" is smoother but is also slower. "PCF13" is the smoothest option, but is also the slowest. </member> - <member name="rendering/quality/shadows/filter_mode.mobile" type="int" setter="" getter=""> + <member name="rendering/quality/shadows/filter_mode.mobile" type="int" setter="" getter="" default="0"> </member> - <member name="rendering/quality/subsurface_scattering/follow_surface" type="bool" setter="" getter=""> + <member name="rendering/quality/subsurface_scattering/follow_surface" type="bool" setter="" getter="" default="false"> Improves quality of subsurface scattering, but cost significantly increases. </member> - <member name="rendering/quality/subsurface_scattering/quality" type="int" setter="" getter=""> + <member name="rendering/quality/subsurface_scattering/quality" type="int" setter="" getter="" default="1"> Quality setting for subsurface scaterring (samples taken). </member> - <member name="rendering/quality/subsurface_scattering/scale" type="int" setter="" getter=""> + <member name="rendering/quality/subsurface_scattering/scale" type="int" setter="" getter="" default="1.0"> </member> - <member name="rendering/quality/subsurface_scattering/weight_samples" type="bool" setter="" getter=""> + <member name="rendering/quality/subsurface_scattering/weight_samples" type="bool" setter="" getter="" default="true"> Weight subsurface scattering samples. Helps to avoid reading samples from unrelated parts of the screen. </member> - <member name="rendering/quality/voxel_cone_tracing/high_quality" type="bool" setter="" getter=""> + <member name="rendering/quality/voxel_cone_tracing/high_quality" type="bool" setter="" getter="" default="true"> Use high-quality voxel cone tracing. This results in better-looking reflections, but is much more expensive on the GPU. </member> - <member name="rendering/threads/thread_model" type="int" setter="" getter=""> + <member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1"> Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter. </member> - <member name="rendering/vram_compression/import_bptc" type="bool" setter="" getter=""> + <member name="rendering/vram_compression/import_bptc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the GLES3 renderer. </member> - <member name="rendering/vram_compression/import_etc" type="bool" setter="" getter=""> + <member name="rendering/vram_compression/import_etc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures. </member> - <member name="rendering/vram_compression/import_etc2" type="bool" setter="" getter=""> + <member name="rendering/vram_compression/import_etc2" type="bool" setter="" getter="" default="true"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the GLES3 renderer. </member> - <member name="rendering/vram_compression/import_pvrtc" type="bool" setter="" getter=""> + <member name="rendering/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS. </member> - <member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter=""> + <member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles. </member> - <member name="script" type="Script" setter="" getter=""> + <member name="script" type="Script" setter="" getter="" default="null"> </member> </members> <constants> diff --git a/doc/classes/ProximityGroup.xml b/doc/classes/ProximityGroup.xml index ad4cb682cb..3c081bf91f 100644 --- a/doc/classes/ProximityGroup.xml +++ b/doc/classes/ProximityGroup.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ProximityGroup" inherits="Spatial" category="Core" version="3.2"> <brief_description> - General purpose proximity-detection node. + General-purpose proximity detection node. </brief_description> <description> - General purpose proximity-detection node. + General-purpose proximity detection node. </description> <tutorials> </tutorials> @@ -21,11 +21,11 @@ </method> </methods> <members> - <member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup.DispatchMode"> + <member name="dispatch_mode" type="int" setter="set_dispatch_mode" getter="get_dispatch_mode" enum="ProximityGroup.DispatchMode" default="0"> </member> - <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius"> + <member name="grid_radius" type="Vector3" setter="set_grid_radius" getter="get_grid_radius" default="Vector3( 1, 1, 1 )"> </member> - <member name="group_name" type="String" setter="set_group_name" getter="get_group_name"> + <member name="group_name" type="String" setter="set_group_name" getter="get_group_name" default=""""> </member> </members> <signals> diff --git a/doc/classes/ProxyTexture.xml b/doc/classes/ProxyTexture.xml index a36f670c42..d403196022 100644 --- a/doc/classes/ProxyTexture.xml +++ b/doc/classes/ProxyTexture.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="base" type="Texture" setter="set_base" getter="get_base"> + <member name="base" type="Texture" setter="set_base" getter="get_base" default="null"> </member> </members> <constants> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index cf7e56f895..209e91eef2 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -11,8 +11,8 @@ <methods> </methods> <members> - <member name="size" type="Vector2" setter="set_size" getter="get_size"> - Size in the X and Y axes. Default is [code]Vector2(1, 1)[/code]. + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 1, 1 )"> + Size on the X and Y axes. </member> </members> <constants> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index 3ef65e1edb..9d163e926c 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -5,7 +5,7 @@ </brief_description> <description> A unit quaternion used for representing 3D rotations. - It is similar to [Basis], which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. But due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating point errors. + It is similar to [Basis], which implements matrix representation of rotations, and can be parametrized using both an axis-angle pair or Euler angles. But due to its compactness and the way it is stored in memory, certain operations (obtaining axis-angle and performing SLERP, in particular) are more efficient and robust against floating-point errors. Quaternions need to be (re)normalized. </description> <tutorials> @@ -27,7 +27,7 @@ <argument index="0" name="euler" type="Vector3"> </argument> <description> - Returns a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X-angle, Y-angle, Z-angle). + Returns a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). </description> </method> <method name="Quat"> @@ -84,7 +84,7 @@ <return type="Vector3"> </return> <description> - Returns Euler angles (in the YXZ convention: first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X-angle, Y-angle, Z-angle). + Returns Euler angles (in the YXZ convention: first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). </description> </method> <method name="inverse"> @@ -128,14 +128,14 @@ <argument index="1" name="angle" type="float"> </argument> <description> - Set the quaternion to a rotation which rotates around axis by the specified angle, in radians. The axis must be a normalized vector. + Sets the quaternion to a rotation which rotates around axis by the specified angle, in radians. The axis must be a normalized vector. </description> </method> <method name="set_euler"> <argument index="0" name="euler" type="Vector3"> </argument> <description> - Set the quaternion to a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X-angle, Y-angle, Z-angle). + Sets the quaternion to a rotation specified by Euler angles (in the YXZ convention: first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). </description> </method> <method name="slerp"> @@ -171,17 +171,17 @@ </method> </methods> <members> - <member name="w" type="float" setter="" getter=""> - W component of the quaternion. Default value: [code]1[/code] + <member name="w" type="float" setter="" getter="" default="1.0"> + W component of the quaternion. </member> - <member name="x" type="float" setter="" getter=""> - X component of the quaternion. Default value: [code]0[/code] + <member name="x" type="float" setter="" getter="" default="0.0"> + X component of the quaternion. </member> - <member name="y" type="float" setter="" getter=""> - Y component of the quaternion. Default value: [code]0[/code] + <member name="y" type="float" setter="" getter="" default="0.0"> + Y component of the quaternion. </member> - <member name="z" type="float" setter="" getter=""> - Z component of the quaternion. Default value: [code]0[/code] + <member name="z" type="float" setter="" getter="" default="0.0"> + Z component of the quaternion. </member> </members> <constants> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index 89778e1c8b..5edef100c5 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -4,7 +4,7 @@ Handle for a [Resource]'s unique ID. </brief_description> <description> - The RID type is used to access the unique integer ID of a resource. They are opaque, so they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer]. + The RID type is used to access the unique integer ID of a resource. They are opaque, which means they do not grant access to the associated resource by themselves. They are used by and with the low-level Server classes such as [VisualServer]. </description> <tutorials> </tutorials> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index be7bcc9c35..9054e2fa88 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -4,7 +4,15 @@ A class for generating pseudo-random numbers. </brief_description> <description> - RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses PCG32. The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. + RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses [url=http://www.pcg-random.org/]PCG32[/url]. + [b]Note:[/b] The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. + To generate a random float number (within a given range) based on a time-dependant seed: + [codeblock] + var rng = RandomNumberGenerator.new() + func _ready(): + rng.randomize() + var my_random_number = rng.randf_range(-10.0, 10.0) + [/codeblock] </description> <tutorials> </tutorials> @@ -13,7 +21,7 @@ <return type="float"> </return> <description> - Generates pseudo-random float between '0.0' and '1.0', inclusive. + Generates a pseudo-random float between [code]0.0[/code] and [code]1.0[/code] (inclusive). </description> </method> <method name="randf_range"> @@ -24,7 +32,7 @@ <argument index="1" name="to" type="float"> </argument> <description> - Generates pseudo-random float between [code]from[/code] and [code]to[/code], inclusive. + Generates a pseudo-random float between [code]from[/code] and [code]to[/code] (inclusive). </description> </method> <method name="randfn"> @@ -35,14 +43,14 @@ <argument index="1" name="deviation" type="float" default="1.0"> </argument> <description> - Generates normally(gaussian) distributed pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. + Generates a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution. </description> </method> <method name="randi"> <return type="int"> </return> <description> - Generates pseudo-random 32-bit unsigned integer between '0' and '4294967295', inclusive. + Generates a pseudo-random 32-bit unsigned integer between [code]0[/code] and [code]4294967295[/code] (inclusive). </description> </method> <method name="randi_range"> @@ -53,7 +61,7 @@ <argument index="1" name="to" type="int"> </argument> <description> - Generates pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive). + Generates a pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive). </description> </method> <method name="randomize"> @@ -65,7 +73,7 @@ </method> </methods> <members> - <member name="seed" type="int" setter="set_seed" getter="get_seed"> + <member name="seed" type="int" setter="set_seed" getter="get_seed" default="-6398989897141750821"> The seed used by the random number generator. A given seed will give a reproducible sequence of pseudo-random numbers. [b]Note:[/b] The RNG does not have an avalanche effect, and can output similar random streams given similar seeds. Consider using a hash function to improve your seed quality if they're sourced externally. </member> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 3c7317bf85..82fffd0cb8 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -4,7 +4,7 @@ Abstract base class for range-based controls. </brief_description> <description> - Range is a base class for [Control] nodes that change a floating point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar]. + Range is a base class for [Control] nodes that change a floating-point [i]value[/i] between a [i]minimum[/i] and a [i]maximum[/i], using [i]step[/i] and [i]page[/i], for example a [ScrollBar]. </description> <tutorials> </tutorials> @@ -22,39 +22,39 @@ <return type="void"> </return> <description> - Stop range from sharing its member variables with any other. + Stops range from sharing its member variables with any other. </description> </method> </methods> <members> - <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed"> - If [code]true[/code], [member value] may be greater than [member max_value]. Default value: [code]false[/code]. + <member name="allow_greater" type="bool" setter="set_allow_greater" getter="is_greater_allowed" default="false"> + If [code]true[/code], [member value] may be greater than [member max_value]. </member> - <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed"> - If [code]true[/code], [member value] may be less than [member min_value]. Default value: [code]false[/code]. + <member name="allow_lesser" type="bool" setter="set_allow_lesser" getter="is_lesser_allowed" default="false"> + If [code]true[/code], [member value] may be less than [member min_value]. </member> - <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp"> + <member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp" default="false"> If [code]true[/code], and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly. </member> - <member name="max_value" type="float" setter="set_max" getter="get_max"> - Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. Default value: [code]100[/code]. + <member name="max_value" type="float" setter="set_max" getter="get_max" default="100.0"> + Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. </member> - <member name="min_value" type="float" setter="set_min" getter="get_min"> - Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code]. Default value: [code]0[/code]. + <member name="min_value" type="float" setter="set_min" getter="get_min" default="0.0"> + Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code]. </member> - <member name="page" type="float" setter="set_page" getter="get_page"> + <member name="page" type="float" setter="set_page" getter="get_page" default="0.0"> Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code]. </member> <member name="ratio" type="float" setter="set_as_ratio" getter="get_as_ratio"> The value mapped between 0 and 1. </member> - <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values"> - If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. Default value: [code]false[/code]. + <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values" default="false"> + If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. </member> - <member name="step" type="float" setter="set_step" getter="get_step"> + <member name="step" type="float" setter="set_step" getter="get_step" default="1.0"> If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. </member> - <member name="value" type="float" setter="set_value" getter="get_value"> + <member name="value" type="float" setter="set_value" getter="get_value" default="0.0"> Range's current value. </member> </members> diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml index 1368143b67..19f62a57bd 100644 --- a/doc/classes/RayCast.xml +++ b/doc/classes/RayCast.xml @@ -43,7 +43,8 @@ </return> <description> Updates the collision information for the ray. - Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. + Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. + [b]Note:[/b] [code]enabled == true[/code] is not required for this to work. </description> </method> <method name="get_collider" qualifiers="const"> @@ -66,7 +67,8 @@ <argument index="0" name="bit" type="int"> </argument> <description> - Returns [code]true[/code] if the bit index passed is turned on. Note that bit indexes range from 0-19. + Returns [code]true[/code] if the bit index passed is turned on. + [b]Note:[/b] Bit indices range from 0-19. </description> </method> <method name="get_collision_normal" qualifiers="const"> @@ -80,7 +82,8 @@ <return type="Vector3"> </return> <description> - Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. + Returns the collision point at which the ray intersects the closest object. + [b]Note:[/b] This point is in the [b]global[/b] coordinate system. </description> </method> <method name="is_colliding" qualifiers="const"> @@ -116,28 +119,29 @@ <argument index="1" name="value" type="bool"> </argument> <description> - Sets the bit index passed to the [code]value[/code] passed. Note that bit indexes range from 0-19. + Sets the bit index passed to the [code]value[/code] passed. + [b]Note:[/b] Bit indexes range from 0-19. </description> </method> </methods> <members> - <member name="cast_to" type="Vector3" setter="set_cast_to" getter="get_cast_to"> + <member name="cast_to" type="Vector3" setter="set_cast_to" getter="get_cast_to" default="Vector3( 0, -1, 0 )"> The ray's destination point, relative to the RayCast's [code]position[/code]. </member> - <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled"> - If [code]true[/code], collision with [Area]s will be reported. Default value: [code]false[/code]. + <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], collision with [Area]s will be reported. </member> - <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled"> - If [code]true[/code], collision with [PhysicsBody]s will be reported. Default value: [code]true[/code]. + <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> + If [code]true[/code], collision with [PhysicsBody]s will be reported. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. </member> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> - If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="false"> + If [code]true[/code], collisions will be reported. </member> - <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body"> - If [code]true[/code], collisions will be ignored for this RayCast's immediate parent. Default value: [code]true[/code]. + <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true"> + If [code]true[/code], collisions will be ignored for this RayCast's immediate parent. </member> </members> <constants> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index 90e0178ddb..81d66ef496 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -42,7 +42,8 @@ <return type="void"> </return> <description> - Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. Note: [code]enabled == true[/code] is not required for this to work. + Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. + [b]Note:[/b] [code]enabled == true[/code] is not required for this to work. </description> </method> <method name="get_collider" qualifiers="const"> @@ -79,7 +80,8 @@ <return type="Vector2"> </return> <description> - Returns the collision point at which the ray intersects the closest object. Note: this point is in the [b]global[/b] coordinate system. + Returns the collision point at which the ray intersects the closest object. + [b]Note:[/b] this point is in the [b]global[/b] coordinate system. </description> </method> <method name="is_colliding" qualifiers="const"> @@ -115,28 +117,28 @@ <argument index="1" name="value" type="bool"> </argument> <description> - Set/clear individual bits on the collision mask. This makes selecting the areas scanned easier. + Sets or clears individual bits on the collision mask. This makes selecting the areas scanned easier. </description> </method> </methods> <members> - <member name="cast_to" type="Vector2" setter="set_cast_to" getter="get_cast_to"> + <member name="cast_to" type="Vector2" setter="set_cast_to" getter="get_cast_to" default="Vector2( 0, 50 )"> The ray's destination point, relative to the RayCast's [code]position[/code]. </member> - <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled"> - If [code]true[/code], collision with [Area2D]s will be reported. Default value: [code]false[/code]. + <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], collision with [Area2D]s will be reported. </member> - <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled"> - If [code]true[/code], collision with [PhysicsBody2D]s will be reported. Default value: [code]true[/code]. + <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> + If [code]true[/code], collision with [PhysicsBody2D]s will be reported. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. </member> - <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled"> - If [code]true[/code], collisions will be reported. Default value: [code]false[/code]. + <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="false"> + If [code]true[/code], collisions will be reported. </member> - <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body"> - If [code]true[/code], the parent node will be excluded from collision detection. Default value: [code]true[/code]. + <member name="exclude_parent" type="bool" setter="set_exclude_parent_body" getter="get_exclude_parent_body" default="true"> + If [code]true[/code], the parent node will be excluded from collision detection. </member> </members> <constants> diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml index 69b159fa97..3f5859714e 100644 --- a/doc/classes/RayShape.xml +++ b/doc/classes/RayShape.xml @@ -4,18 +4,18 @@ Ray shape for 3D collisions. </brief_description> <description> - Ray shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + Ray shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="length" type="float" setter="set_length" getter="get_length"> + <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> The ray's length. </member> - <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope"> - If [code]true[/code], allow the shape to return the correct normal. Default value: [code]false[/code]. + <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> + If [code]true[/code], allow the shape to return the correct normal. </member> </members> <constants> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml index e0ef01bd2a..377a19e8da 100644 --- a/doc/classes/RayShape2D.xml +++ b/doc/classes/RayShape2D.xml @@ -4,18 +4,18 @@ Ray shape for 2D collisions. </brief_description> <description> - Ray shape for 2D collisions. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="length" type="float" setter="set_length" getter="get_length"> + <member name="length" type="float" setter="set_length" getter="get_length" default="20.0"> The ray's length. </member> - <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope"> - If [code]true[/code], allow the shape to return the correct normal. Default value: [code]false[/code]. + <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> + If [code]true[/code], allow the shape to return the correct normal. </member> </members> <constants> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index c4f7844a03..9d6bfbf398 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Rect2" category="Built-In Types" version="3.2"> <brief_description> - 2D Axis-aligned bounding box. + 2D axis-aligned bounding box. </brief_description> <description> Rect2 consists of a position, a size, and several utility functions. It is typically used for fast overlap tests. @@ -148,13 +148,13 @@ </method> </methods> <members> - <member name="end" type="Vector2" setter="" getter=""> + <member name="end" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> Ending corner. </member> - <member name="position" type="Vector2" setter="" getter=""> + <member name="position" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> Position (starting corner). </member> - <member name="size" type="Vector2" setter="" getter=""> + <member name="size" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> Size from position to end. </member> </members> diff --git a/doc/classes/RectangleShape2D.xml b/doc/classes/RectangleShape2D.xml index 62ead5598b..d55324c98f 100644 --- a/doc/classes/RectangleShape2D.xml +++ b/doc/classes/RectangleShape2D.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="extents" type="Vector2" setter="set_extents" getter="get_extents"> + <member name="extents" type="Vector2" setter="set_extents" getter="get_extents" default="Vector2( 10, 10 )"> The rectangle's half extents. The width and height of this shape is twice the half extents. </member> </members> diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml index 9e6c403873..70d41b665a 100644 --- a/doc/classes/Reference.xml +++ b/doc/classes/Reference.xml @@ -24,7 +24,7 @@ </return> <description> Increments the internal reference counter. Use this only if you really know what you are doing. - Returns whether the increment was successful. + Returns [code]true[/code] if the increment was successful, [code]false[/code] otherwise. </description> </method> <method name="unreference"> @@ -32,7 +32,7 @@ </return> <description> Decrements the internal reference counter. Use this only if you really know what you are doing. - Returns whether the decrement was successful. + Returns [code]true[/code] if the decrement was successful, [code]false[/code] otherwise. </description> </method> </methods> diff --git a/doc/classes/ReferenceRect.xml b/doc/classes/ReferenceRect.xml index f6025fe2f9..393a72cf60 100644 --- a/doc/classes/ReferenceRect.xml +++ b/doc/classes/ReferenceRect.xml @@ -4,15 +4,18 @@ Reference frame for GUI. </brief_description> <description> - Reference frame for GUI. It's just like an empty control, except an outline border [member border_color] is displayed while editing around its size at all times. + A rectangle box that displays only a [member border_color] border color around its rectangle. [ReferenceRect] has no fill [Color]. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color"> - Determines the border [Color] of the [ReferenceRect]. + <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color( 1, 0, 0, 1 )"> + Sets the border [Color] of the [ReferenceRect]. + </member> + <member name="editor_only" type="bool" setter="set_editor_only" getter="get_editor_only" default="true"> + If set to [code]true[/code], the [ReferenceRect] will only be visible while in editor. Otherwise, [ReferenceRect] will be visible in game. </member> </members> <constants> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index 3268e9f8e5..68b9110b50 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -10,29 +10,29 @@ <methods> </methods> <members> - <member name="box_projection" type="bool" setter="set_enable_box_projection" getter="is_box_projection_enabled"> + <member name="box_projection" type="bool" setter="set_enable_box_projection" getter="is_box_projection_enabled" default="false"> </member> - <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask"> + <member name="cull_mask" type="int" setter="set_cull_mask" getter="get_cull_mask" default="1048575"> </member> - <member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled"> + <member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" default="false"> </member> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents"> + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3( 1, 1, 1 )"> </member> - <member name="intensity" type="float" setter="set_intensity" getter="get_intensity"> + <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0"> </member> - <member name="interior_ambient_color" type="Color" setter="set_interior_ambient" getter="get_interior_ambient"> + <member name="interior_ambient_color" type="Color" setter="set_interior_ambient" getter="get_interior_ambient" default="Color( 0, 0, 0, 1 )"> </member> - <member name="interior_ambient_contrib" type="float" setter="set_interior_ambient_probe_contribution" getter="get_interior_ambient_probe_contribution"> + <member name="interior_ambient_contrib" type="float" setter="set_interior_ambient_probe_contribution" getter="get_interior_ambient_probe_contribution" default="0.0"> </member> - <member name="interior_ambient_energy" type="float" setter="set_interior_ambient_energy" getter="get_interior_ambient_energy"> + <member name="interior_ambient_energy" type="float" setter="set_interior_ambient_energy" getter="get_interior_ambient_energy" default="1.0"> </member> - <member name="interior_enable" type="bool" setter="set_as_interior" getter="is_set_as_interior"> + <member name="interior_enable" type="bool" setter="set_as_interior" getter="is_set_as_interior" default="false"> </member> - <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance"> + <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0"> </member> - <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset"> + <member name="origin_offset" type="Vector3" setter="set_origin_offset" getter="get_origin_offset" default="Vector3( 0, 0, 0 )"> </member> - <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode"> + <member name="update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="ReflectionProbe.UpdateMode" default="0"> </member> </members> <constants> diff --git a/doc/classes/RemoteTransform.xml b/doc/classes/RemoteTransform.xml index 17ee7bf123..4628ef8519 100644 --- a/doc/classes/RemoteTransform.xml +++ b/doc/classes/RemoteTransform.xml @@ -12,20 +12,20 @@ <methods> </methods> <members> - <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node"> + <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node" default="NodePath("")"> The [NodePath] to the remote node, relative to the RemoteTransform's position in the scene. </member> - <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position"> - If [code]true[/code], the remote node's position is updated. Default value: [code]true[/code]. + <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position" default="true"> + If [code]true[/code], the remote node's position is updated. </member> - <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation"> - If [code]true[/code], the remote node's rotation is updated. Default value: [code]true[/code]. + <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation" default="true"> + If [code]true[/code], the remote node's rotation is updated. </member> - <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale"> - If [code]true[/code], the remote node's scale is updated. Default value: [code]true[/code]. + <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale" default="true"> + If [code]true[/code], the remote node's scale is updated. </member> - <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates"> - If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. Default value: [code]true[/code]. + <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates" default="true"> + If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. </member> </members> <constants> diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml index b8eb7c6f13..6a317724a0 100644 --- a/doc/classes/RemoteTransform2D.xml +++ b/doc/classes/RemoteTransform2D.xml @@ -12,20 +12,20 @@ <methods> </methods> <members> - <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node"> + <member name="remote_path" type="NodePath" setter="set_remote_node" getter="get_remote_node" default="NodePath("")"> The [NodePath] to the remote node, relative to the RemoteTransform2D's position in the scene. </member> - <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position"> - If [code]true[/code], the remote node's position is updated. Default value: [code]true[/code]. + <member name="update_position" type="bool" setter="set_update_position" getter="get_update_position" default="true"> + If [code]true[/code], the remote node's position is updated. </member> - <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation"> - If [code]true[/code], the remote node's rotation is updated. Default value: [code]true[/code]. + <member name="update_rotation" type="bool" setter="set_update_rotation" getter="get_update_rotation" default="true"> + If [code]true[/code], the remote node's rotation is updated. </member> - <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale"> - If [code]true[/code], the remote node's scale is updated. Default value: [code]true[/code]. + <member name="update_scale" type="bool" setter="set_update_scale" getter="get_update_scale" default="true"> + If [code]true[/code], the remote node's scale is updated. </member> - <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates"> - If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. Default value: [code]true[/code]. + <member name="use_global_coordinates" type="bool" setter="set_use_global_coordinates" getter="get_use_global_coordinates" default="true"> + If [code]true[/code], global coordinates are used. If [code]false[/code], local coordinates are used. </member> </members> <constants> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index d2315275b1..a50f5c97d1 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -37,7 +37,7 @@ <return type="RID"> </return> <description> - Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high level abstractions of resources stored in a server, so this function will return the original RID. + Returns the RID of the resource (or an empty RID). Many resources (such as [Texture], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID. </description> </method> <method name="setup_local_to_scene"> @@ -59,13 +59,13 @@ </method> </methods> <members> - <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene"> + <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" default="false"> If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene. </member> - <member name="resource_name" type="String" setter="set_name" getter="get_name"> + <member name="resource_name" type="String" setter="set_name" getter="get_name" default=""""> The name of the resource. This is an optional identifier. </member> - <member name="resource_path" type="String" setter="set_path" getter="get_path"> + <member name="resource_path" type="String" setter="set_path" getter="get_path" default=""""> The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index. </member> </members> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index ef44a826b9..ce37691e0a 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -6,7 +6,7 @@ <description> Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine. Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver]. - Note: You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card. + [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card. </description> <tutorials> </tutorials> @@ -19,7 +19,8 @@ <argument index="1" name="add_types" type="String"> </argument> <description> - If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. + If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. + [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> <method name="get_recognized_extensions" qualifiers="virtual"> @@ -35,7 +36,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return [code]""[/code]. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. + Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return [code]""[/code]. + [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> <method name="handles_type" qualifiers="virtual"> @@ -44,7 +46,8 @@ <argument index="0" name="typename" type="String"> </argument> <description> - Tells which resource class this loader can load. Note that custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them. + Tells which resource class this loader can load. + [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them. </description> </method> <method name="load" qualifiers="virtual"> diff --git a/doc/classes/ResourceInteractiveLoader.xml b/doc/classes/ResourceInteractiveLoader.xml index 3c09959ff7..df552d3656 100644 --- a/doc/classes/ResourceInteractiveLoader.xml +++ b/doc/classes/ResourceInteractiveLoader.xml @@ -4,7 +4,7 @@ Interactive [Resource] loader. </brief_description> <description> - Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying loading bars/percentages. + Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages. </description> <tutorials> </tutorials> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 558852704e..31bba18171 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -47,7 +47,7 @@ <argument index="0" name="path" type="String"> </argument> <description> - Deprecated method. Use [method has_cached] or [method exists] instead. + [i]Deprecated method.[/i] Use [method has_cached] or [method exists] instead. </description> </method> <method name="has_cached"> @@ -95,7 +95,7 @@ <argument index="0" name="abort" type="bool"> </argument> <description> - Change the behavior on missing sub-resources. Default is to abort load. + Changes the behavior on missing sub-resources. The default behavior is to abort loading. </description> </method> </methods> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index 57d5bfae2f..f12d26d4b9 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -43,7 +43,7 @@ Bundles external resources. </constant> <constant name="FLAG_CHANGE_PATH" value="4" enum="SaverFlags"> - Change the [member Resource.resource_path] of the saved resource to match its new location. + Changes the [member Resource.resource_path] of the saved resource to match its new location. </constant> <constant name="FLAG_OMIT_EDITOR_PROPERTIES" value="8" enum="SaverFlags"> Do not save editor-specific metadata (identified by their [code]__editor[/code] prefix). diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index a097e2076f..405eb59563 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -5,7 +5,7 @@ </brief_description> <description> Rich text can contain custom text, fonts, images and some basic formatting. The label manages these as an internal tag stack. It also adapts itself to given width/heights. - Note that assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods. + [b]Note:[/b] Assignments to [member bbcode_text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member bbcode_text] will erase previous edits made from other manual sources such as [method append_bbcode] and the [code]push_*[/code] / [method pop] methods. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> @@ -26,7 +26,7 @@ <argument index="0" name="text" type="String"> </argument> <description> - Adds raw non-bbcode-parsed text to the tag stack. + Adds raw non-BBCode-parsed text to the tag stack. </description> </method> <method name="append_bbcode"> @@ -63,7 +63,7 @@ <return type="int"> </return> <description> - Returns the total number of characters from text tags. Does not include bbcodes. + Returns the total number of characters from text tags. Does not include BBCodes. </description> </method> <method name="get_v_scroll"> @@ -100,7 +100,7 @@ <return type="void"> </return> <description> - Terminates the current tag. Use after [code]push_*[/code] methods to close bbcodes manually. Does not need to follow [code]add_*[/code] methods. + Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods. </description> </method> <method name="push_align"> @@ -109,7 +109,7 @@ <argument index="0" name="align" type="int" enum="RichTextLabel.Align"> </argument> <description> - Adds an alignment tag based on the given [code]align[/code] value. See [enum Align] for possible values. + Adds an [code][align][/code] tag based on the given [code]align[/code] value. See [enum Align] for possible values. </description> </method> <method name="push_cell"> @@ -152,7 +152,7 @@ <argument index="0" name="type" type="int" enum="RichTextLabel.ListType"> </argument> <description> - Adds a list tag to the tag stack. Similar to the bbcodes [code][ol][/code] or [code][ul][/code], but supports more list types. Not fully implemented! + Adds a [code][list][/code] tag to the tag stack. Similar to the BBCodes [code][ol][/code] or [code][ul][/code], but supports more list types. Not fully implemented! </description> </method> <method name="push_meta"> @@ -161,7 +161,7 @@ <argument index="0" name="data" type="Variant"> </argument> <description> - Adds a meta tag to the tag stack. Similar to the bbcode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types. + Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types. </description> </method> <method name="push_strikethrough"> @@ -215,46 +215,46 @@ <argument index="2" name="ratio" type="int"> </argument> <description> - Edits the selected columns expansion options. If [code]expand[/code] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios. + Edits the selected column's expansion options. If [code]expand[/code] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. - Columns with a [code]false[/code] expand will not contribute to the total ratio. + If [code]expand[/code] is [code]false[/code], the column will not contribute to the total ratio. </description> </method> </methods> <members> - <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode"> - If [code]true[/code], the label uses BBCode formatting. Default value: [code]false[/code]. + <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode" default="false"> + If [code]true[/code], the label uses BBCode formatting. </member> - <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode"> + <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default=""""> The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. </member> - <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined"> - If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. Default value: [code]true[/code]. + <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true"> + If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. </member> - <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color"> - If [code]true[/code], the label uses the custom font color. Default value: [code]false[/code]. + <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> + If [code]true[/code], the label uses the custom font color. </member> - <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible"> + <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0"> The text's visibility, as a [float] between 0.0 and 1.0. </member> - <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active"> - If [code]true[/code], the scrollbar is visible. Does not block scrolling completely. See [method scroll_to_line]. Default value: [code]true[/code]. + <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true"> + If [code]true[/code], the scrollbar is visible. Does not block scrolling completely. See [method scroll_to_line]. </member> - <member name="scroll_following" type="bool" setter="set_scroll_follow" getter="is_scroll_following"> - If [code]true[/code], the window scrolls down to display new content automatically. Default value: [code]false[/code]. + <member name="scroll_following" type="bool" setter="set_scroll_follow" getter="is_scroll_following" default="false"> + If [code]true[/code], the window scrolls down to display new content automatically. </member> - <member name="selection_enabled" type="bool" setter="set_selection_enabled" getter="is_selection_enabled"> + <member name="selection_enabled" type="bool" setter="set_selection_enabled" getter="is_selection_enabled" default="false"> If [code]true[/code], the label allows text selection. </member> - <member name="tab_size" type="int" setter="set_tab_size" getter="get_tab_size"> - The number of spaces associated with a single tab length. Does not affect "\t" in text tags, only indent tags. + <member name="tab_size" type="int" setter="set_tab_size" getter="get_tab_size" default="4"> + The number of spaces associated with a single tab length. Does not affect [code]\t[/code] in text tags, only indent tags. </member> - <member name="text" type="String" setter="set_text" getter="get_text"> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> The raw text of the label. - When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse bbcodes. Does not modify [member bbcode_text]. + When set, clears the tag stack and adds a raw text tag to the top of it. Does not parse BBCodes. Does not modify [member bbcode_text]. </member> - <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters"> - The restricted number of characters to display in the label. + <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> + The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed. </member> </members> <signals> @@ -327,17 +327,17 @@ </theme_item> <theme_item name="bold_italics_font" type="Font"> </theme_item> - <theme_item name="default_color" type="Color"> + <theme_item name="default_color" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> - <theme_item name="font_color_selected" type="Color"> + <theme_item name="font_color_selected" type="Color" default="Color( 0.490196, 0.490196, 0.490196, 1 )"> </theme_item> - <theme_item name="font_color_shadow" type="Color"> + <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )"> </theme_item> <theme_item name="italics_font" type="Font"> </theme_item> - <theme_item name="line_separation" type="int"> + <theme_item name="line_separation" type="int" default="1"> </theme_item> <theme_item name="mono_font" type="Font"> </theme_item> @@ -345,17 +345,17 @@ </theme_item> <theme_item name="normal_font" type="Font"> </theme_item> - <theme_item name="selection_color" type="Color"> + <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> </theme_item> - <theme_item name="shadow_as_outline" type="int"> + <theme_item name="shadow_as_outline" type="int" default="0"> </theme_item> - <theme_item name="shadow_offset_x" type="int"> + <theme_item name="shadow_offset_x" type="int" default="1"> </theme_item> - <theme_item name="shadow_offset_y" type="int"> + <theme_item name="shadow_offset_y" type="int" default="1"> </theme_item> - <theme_item name="table_hseparation" type="int"> + <theme_item name="table_hseparation" type="int" default="3"> </theme_item> - <theme_item name="table_vseparation" type="int"> + <theme_item name="table_vseparation" type="int" default="3"> </theme_item> </theme_items> </class> diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 8dadca49e1..a705789413 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -4,10 +4,10 @@ Physics Body whose position is determined through physics simulation in 3D space. </brief_description> <description> - This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. + This is the node that implements full 3D physics. This means that you do not control a RigidBody directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. A RigidBody has 4 behavior [member mode]s: Rigid, Static, Character, and Kinematic. - [b]Note:[/b] Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop will yield strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. - If you need to override the default physics behavior, you can write a custom force integration. See [member custom_integrator]. + [b]Note:[/b] Don't change a RigidBody's position every frame or very often. Sporadic changes work fine, but physics runs at a different granularity (fixed Hz) than usual rendering (process callback) and maybe even in a separate thread, so changing this from a process loop may result in strange behavior. If you need to directly affect the body's state, use [method _integrate_forces], which allows you to directly access the physics state. + If you need to override the default physics behavior, you can write a custom force integration function. See [member custom_integrator]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> @@ -70,7 +70,7 @@ <argument index="1" name="impulse" type="Vector3"> </argument> <description> - Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. + Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> @@ -79,14 +79,15 @@ <argument index="0" name="impulse" type="Vector3"> </argument> <description> - Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the passed in vector. + Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed. </description> </method> <method name="get_colliding_bodies" qualifiers="const"> <return type="Array"> </return> <description> - Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + Returns a list of the bodies colliding with this one. By default, number of max contacts reported is at 0, see the [member contacts_reported] property to increase it. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_axis_velocity"> @@ -100,74 +101,76 @@ </method> </methods> <members> - <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp"> + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> Damps RigidBody's rotational forces. </member> - <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity"> + <member name="angular_velocity" type="Vector3" setter="set_angular_velocity" getter="get_angular_velocity" default="Vector3( 0, 0, 0 )"> RigidBody's rotational velocity. </member> - <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's rotation in the x-axis. + <member name="axis_lock_angular_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the X axis. </member> - <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's rotation in the y-axis. + <member name="axis_lock_angular_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the Y axis. </member> - <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's rotation in the z-axis. + <member name="axis_lock_angular_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's rotation in the Z axis. </member> - <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the x-axis. + <member name="axis_lock_linear_x" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's movement in the X axis. </member> - <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the y-axis. + <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's movement in the Y axis. </member> - <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the z-axis. + <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock" default="false"> + Lock the body's movement in the Z axis. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - RigidBody's bounciness. + The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). + Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. </member> - <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep"> + <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the RigidBody will not calculate forces and will act as a static body while there is no movement. It will wake up when forces are applied through other collisions or when the [code]apply_impulse[/code] method is used. </member> - <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled"> + <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> If [code]true[/code], the RigidBody will emit signals when it collides with another RigidBody. </member> - <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported"> + <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> The maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. </member> - <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection"> + <member name="continuous_cd" type="bool" setter="set_use_continuous_collision_detection" getter="is_using_continuous_collision_detection" default="false"> If [code]true[/code], continuous collision detection is used. - Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses less impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. + Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. Continuous collision detection is more precise, and misses fewer impacts by small, fast-moving objects. Not using continuous collision detection is faster to compute, but can miss small, fast-moving objects. </member> - <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator"> + <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false"> If [code]true[/code], internal force integration will be disabled (like gravity or air friction) for this body. Other than collision response, the body will only move as determined by the [method _integrate_forces] function, if defined. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> The body's friction, from 0 (frictionless) to 1 (max friction). + Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. </member> - <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale"> - This is multiplied by the global 3D gravity setting found in "Project > Project Settings > Physics > 3d" to produce RigidBody's gravity. E.g. a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. + <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> + This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce RigidBody's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. </member> - <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> - The body's linear damp. Default value: -1, cannot be less than -1. If this value is different from -1, any linear damp derived from the world or areas will be overridden. + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> + The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden. </member> - <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity"> - The body's linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. + <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3( 0, 0, 0 )"> + The body's linear velocity. Can be used sporadically, but [b]don't set this every frame[/b], because physics may run in another thread and runs at a different granularity. Use [method _integrate_forces] as your process loop for precise control of the body state. </member> - <member name="mass" type="float" setter="set_mass" getter="get_mass"> + <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> The body's mass. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody.Mode"> - The body mode from the MODE_* enum. Modes include: MODE_STATIC, MODE_KINEMATIC, MODE_RIGID, and MODE_CHARACTER. + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody.Mode" default="0"> + The body mode. See [enum Mode] for possible values. </member> - <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override" default="null"> </member> - <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping"> + <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false"> If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or the [code]apply_impulse[/code] method. </member> - <member name="weight" type="float" setter="set_weight" getter="get_weight"> - The body's weight based on its mass and the global 3D gravity. Global values are set in "Project > Project Settings > Physics > 3d". + <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8"> + The body's weight based on its mass and the global 3D gravity. Global values are set in [b]Project > Project Settings > Physics > 3d[/b]. </member> </members> <signals> @@ -196,7 +199,7 @@ </argument> <description> Emitted when a body enters into contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that collided with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body collided with. + This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with. </description> </signal> <signal name="body_shape_exited"> @@ -210,7 +213,7 @@ </argument> <description> Emitted when a body shape exits contact with this one. Contact monitor and contacts reported must be enabled for this to work. - This signal not only receives the body that stopped colliding with this one, but also its [RID] (body_id), the shape index from the colliding body (body_shape), and the shape index from this body (local_shape) the other body stopped colliding with. + This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with. </description> </signal> <signal name="sleeping_state_changed"> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 3fdc367cc5..907a82d51d 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -68,7 +68,7 @@ <argument index="1" name="impulse" type="Vector2"> </argument> <description> - Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. + Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> @@ -84,7 +84,8 @@ <return type="Array"> </return> <description> - Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code]. Note that the result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. + Returns a list of the bodies colliding with this one. Use [member contacts_reported] to set the maximum number reported. You must also set [member contact_monitor] to [code]true[/code]. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_axis_velocity"> @@ -113,65 +114,67 @@ </method> </methods> <members> - <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp"> - Damps the body's [member angular_velocity]. If [code]-1[/code] the body will use the "Default Angular Damp" in "Project > Project Settings > Physics > 2d". Default value: [code]-1[/code]. + <member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp" default="-1.0"> + Damps the body's [member angular_velocity]. If [code]-1[/code], the body will use the [b]Default Angular Damp[/b] defined in [b]Project > Project Settings > Physics > 2d[/b]. </member> - <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity"> + <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity" default="0.0"> The body's rotational velocity. </member> - <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force"> + <member name="applied_force" type="Vector2" setter="set_applied_force" getter="get_applied_force" default="Vector2( 0, 0 )"> The body's total applied force. </member> - <member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque"> + <member name="applied_torque" type="float" setter="set_applied_torque" getter="get_applied_torque" default="0.0"> The body's total applied torque. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - The body's bounciness. Default value: [code]0[/code]. + The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). + Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. </member> - <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep"> - If [code]true[/code], the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force]. Default value: [code]true[/code]. + <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> + If [code]true[/code], the body will not calculate forces and will act as a static body if there is no movement. The body will wake up when other forces are applied via collisions or by using [method apply_impulse] or [method add_force]. </member> - <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled"> - If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. Default value: [code]false[/code]. + <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> + If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. </member> - <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported"> - The maximum number of contacts to report. Default value: [code]0[/code]. + <member name="contacts_reported" type="int" setter="set_max_contacts_reported" getter="get_max_contacts_reported" default="0"> + The maximum number of contacts to report. </member> - <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode"> - Continuous collision detection mode. Default value: [constant CCD_MODE_DISABLED]. + <member name="continuous_cd" type="int" setter="set_continuous_collision_detection_mode" getter="get_continuous_collision_detection_mode" enum="RigidBody2D.CCDMode" default="0"> + Continuous collision detection mode. Continuous collision detection tries to predict where a moving body will collide instead of moving it and correcting its movement after collision. Continuous collision detection is slower, but more precise and misses fewer collisions with small, fast-moving objects. Raycasting and shapecasting methods are available. See [enum CCDMode] for details. </member> - <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator"> + <member name="custom_integrator" type="bool" setter="set_use_custom_integrator" getter="is_using_custom_integrator" default="false"> If [code]true[/code], internal force integration is disabled for this body. Aside from collision response, the body will only move as determined by the [method _integrate_forces] function. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> - The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). Default value: [code]1[/code]. + The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). + Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. </member> - <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale"> - Multiplies the gravity applied to the body. The body's gravity is calculated from the "Default Gravity" value in "Project > Project Settings > Physics > 2d" and/or any additional gravity vector applied by [Area2D]s. Default value: [code]1[/code]. + <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> + Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project > Project Settings > Physics > 2d[/b] and/or any additional gravity vector applied by [Area2D]s. </member> <member name="inertia" type="float" setter="set_inertia" getter="get_inertia"> The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 (or negative) inertia to return to automatically computing it. </member> - <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp"> - Damps the body's [member linear_velocity]. If [code]-1[/code] the body will use the "Default Linear Damp" in "Project > Project Settings > Physics > 2d". Default value: [code]-1[/code]. + <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> + Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project > Project Settings > Physics > 2d[/b]. </member> - <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity"> + <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2( 0, 0 )"> The body's linear velocity. </member> - <member name="mass" type="float" setter="set_mass" getter="get_mass"> - The body's mass. Default value: [code]1[/code]. + <member name="mass" type="float" setter="set_mass" getter="get_mass" default="1.0"> + The body's mass. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode"> - The body's mode. See [code]MODE_*[/code] constants. Default value: [constant MODE_RIGID]. + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode" default="0"> + The body's mode. See [enum Mode] for possible values. </member> - <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override" default="null"> </member> - <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping"> + <member name="sleeping" type="bool" setter="set_sleeping" getter="is_sleeping" default="false"> If [code]true[/code], the body is sleeping and will not calculate forces until woken up by a collision or by using [method apply_impulse] or [method add_force]. </member> - <member name="weight" type="float" setter="set_weight" getter="get_weight"> - The body's weight based on its mass and the "Default Gravity" value in "Project > Project Settings > Physics > 2d". + <member name="weight" type="float" setter="set_weight" getter="get_weight" default="9.8"> + The body's weight based on its mass and the [b]Default Gravity[/b] value in [b]Project > Project Settings > Physics > 2d[/b]. </member> </members> <signals> diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index 8cbc582bf5..3bd958bfd4 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -202,10 +202,12 @@ If passed to [method PackedScene.instance], blocks edits to the scene state. </constant> <constant name="GEN_EDIT_STATE_INSTANCE" value="1" enum="GenEditState"> - If passed to [method PackedScene.instance], provides inherited scene resources to the local scene. Requires tools compiled. + If passed to [method PackedScene.instance], provides inherited scene resources to the local scene. + [b]Note:[/b] Only available in editor builds. </constant> <constant name="GEN_EDIT_STATE_MAIN" value="2" enum="GenEditState"> - If passed to [method PackedScene.instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state. Requires tools compiled. + If passed to [method PackedScene.instance], provides local scene resources to the local scene. Only the main scene should receive the main edit state. + [b]Note:[/b] Only available in editor builds. </constant> </constants> </class> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 25c129d1d4..1302c1e6bf 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -203,7 +203,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code], the application automatically accepts quitting. Defaults to [code]true[/code]. + If [code]true[/code], the application automatically accepts quitting. Enabled by default. </description> </method> <method name="set_group"> @@ -247,7 +247,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code], the application quits automatically on going back (e.g. on Android). Defaults to [code]true[/code]. + If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default. </description> </method> <method name="set_screen_stretch"> @@ -270,10 +270,10 @@ <member name="current_scene" type="Node" setter="set_current_scene" getter="get_current_scene"> The current scene. </member> - <member name="debug_collisions_hint" type="bool" setter="set_debug_collisions_hint" getter="is_debugging_collisions_hint"> + <member name="debug_collisions_hint" type="bool" setter="set_debug_collisions_hint" getter="is_debugging_collisions_hint" default="false"> If [code]true[/code], collision shapes will be visible when running the game from the editor for debugging purposes. </member> - <member name="debug_navigation_hint" type="bool" setter="set_debug_navigation_hint" getter="is_debugging_navigation_hint"> + <member name="debug_navigation_hint" type="bool" setter="set_debug_navigation_hint" getter="is_debugging_navigation_hint" default="false"> If [code]true[/code], navigation polygons will be visible when running the game from the editor for debugging purposes. </member> <member name="edited_scene_root" type="Node" setter="set_edited_scene_root" getter="get_edited_scene_root"> @@ -282,25 +282,25 @@ <member name="multiplayer" type="MultiplayerAPI" setter="set_multiplayer" getter="get_multiplayer"> The default [MultiplayerAPI] instance for this [SceneTree]. </member> - <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled"> - If [code]true[/code] (default value), enable the automatic polling of the [MultiplayerAPI] for this [SceneTree] during [signal idle_frame]. - When [code]false[/code] you need to manually call [method MultiplayerAPI.poll] for processing network packets and delivering RPCs/RSETs. This allows to run RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. + <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled" default="true"> + If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal idle_frame]. + If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see NETWORK_MODE_* constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. </member> - <member name="paused" type="bool" setter="set_pause" getter="is_paused"> + <member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false"> If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior: - 2D and 3D physics will be stopped. - [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes. </member> - <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections"> + <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections. </member> <member name="root" type="Viewport" setter="" getter="get_root"> The [SceneTree]'s root [Viewport]. </member> - <member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling"> + <member name="use_font_oversampling" type="bool" setter="set_use_font_oversampling" getter="is_using_font_oversampling" default="false"> If [code]true[/code], font oversampling is used. </member> </members> @@ -354,7 +354,7 @@ <argument index="0" name="node" type="Node"> </argument> <description> - Emitted when a node's configuration changed. Only emitted in tool mode. + Emitted when a node's configuration changed. Only emitted in [code]tool[/code] mode. </description> </signal> <signal name="node_removed"> @@ -378,7 +378,7 @@ </signal> <signal name="screen_resized"> <description> - Emitted whenever the screen resolution (fullscreen) or window size (windowed) changes. + Emitted when the screen resolution (fullscreen) or window size (windowed) changes. </description> </signal> <signal name="server_disconnected"> @@ -415,10 +415,10 @@ Keep the specified display resolution. No interpolation. Content may appear pixelated. </constant> <constant name="STRETCH_ASPECT_IGNORE" value="0" enum="StretchAspect"> - Fill the window with the content stretched to cover excessive space. Content may appear elongated. + Fill the window with the content stretched to cover excessive space. Content may appear stretched. </constant> <constant name="STRETCH_ASPECT_KEEP" value="1" enum="StretchAspect"> - Retain the same aspect ratio by padding with black bars in either axes. No expansion of content. + Retain the same aspect ratio by padding with black bars on either axis. This prevents distortion. </constant> <constant name="STRETCH_ASPECT_KEEP_WIDTH" value="2" enum="StretchAspect"> Expand vertically. Left/right black bars may appear if the window is too wide. @@ -427,7 +427,7 @@ Expand horizontally. Top/bottom black bars may appear if the window is too tall. </constant> <constant name="STRETCH_ASPECT_EXPAND" value="4" enum="StretchAspect"> - Expand in both directions, retaining the same aspect ratio. No black bars. + Expand in both directions, retaining the same aspect ratio. This prevents distortion while avoiding black bars. </constant> </constants> </class> diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index b2c2d0f060..def2fa944a 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -7,8 +7,8 @@ The [ScriptCreateDialog] creates script files according to a given template for a given scripting language. The standard use is to configure its fields prior to calling one of the [method Popup.popup] methods. [codeblock] func _ready(): - dialog.config("Node", "res://new_node.gd") # for in-engine types - dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # for script types + dialog.config("Node", "res://new_node.gd") # For in-engine types + dialog.config("\"res://base_node.gd\"", "res://derived_node.gd") # For script types dialog.popup_centered() [/codeblock] </description> diff --git a/doc/classes/ScrollBar.xml b/doc/classes/ScrollBar.xml index 8b8314d2c8..29bc85cc56 100644 --- a/doc/classes/ScrollBar.xml +++ b/doc/classes/ScrollBar.xml @@ -4,20 +4,20 @@ Base class for scroll bars. </brief_description> <description> - Scrollbars are a [Range] based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available. + Scrollbars are a [Range]-based [Control], that display a draggable area (the size of the page). Horizontal ([HScrollBar]) and Vertical ([VScrollBar]) versions are available. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step"> + <member name="custom_step" type="float" setter="set_custom_step" getter="get_custom_step" default="-1.0"> </member> </members> <signals> <signal name="scrolling"> <description> - Emitted whenever the scrollbar is being scrolled. + Emitted when the scrollbar is being scrolled. </description> </signal> </signals> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 7d7dfe167a..59e8d566cf 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ScrollContainer" inherits="Container" category="Core" version="3.2"> <brief_description> - A helper node for displaying scrollable elements (e.g. lists). + A helper node for displaying scrollable elements such as lists. </brief_description> <description> - A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the minimum_size of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set EXPAND on children size flags, so they will upscale to ScrollContainer size if ScrollContainer size is bigger (scroll is invisible for chosen dimension). + A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.rect_min_size] of the Control relative to the ScrollContainer. Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). </description> <tutorials> </tutorials> @@ -23,30 +23,30 @@ </method> </methods> <members> - <member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone"> + <member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0"> </member> - <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll"> + <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> The current horizontal scroll value. </member> - <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled"> + <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" default="true"> If [code]true[/code], enables horizontal scrolling. </member> - <member name="scroll_vertical" type="int" setter="set_v_scroll" getter="get_v_scroll"> + <member name="scroll_vertical" type="int" setter="set_v_scroll" getter="get_v_scroll" default="0"> The current vertical scroll value. </member> - <member name="scroll_vertical_enabled" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled"> + <member name="scroll_vertical_enabled" type="bool" setter="set_enable_v_scroll" getter="is_v_scroll_enabled" default="true"> If [code]true[/code], enables vertical scrolling. </member> </members> <signals> <signal name="scroll_ended"> <description> - Emitted whenever scrolling stops. + Emitted when scrolling stops. </description> </signal> <signal name="scroll_started"> <description> - Emitted whenever scrolling is started. + Emitted when scrolling is started. </description> </signal> </signals> diff --git a/doc/classes/SegmentShape2D.xml b/doc/classes/SegmentShape2D.xml index af2392787c..e9e9d01a42 100644 --- a/doc/classes/SegmentShape2D.xml +++ b/doc/classes/SegmentShape2D.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="a" type="Vector2" setter="set_a" getter="get_a"> + <member name="a" type="Vector2" setter="set_a" getter="get_a" default="Vector2( 0, 0 )"> The segment's first point position. </member> - <member name="b" type="Vector2" setter="set_b" getter="get_b"> + <member name="b" type="Vector2" setter="set_b" getter="get_b" default="Vector2( 0, 10 )"> The segment's second point position. </member> </members> diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index 412913807d..7aee5c2951 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Semaphore" inherits="Reference" category="Core" version="3.2"> <brief_description> - A synchronization Semaphore. + A synchronization semaphore. </brief_description> <description> - A synchronization Semaphore. Element used to synchronize multiple [Thread]s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see [Mutex]. + A synchronization semaphore which can be used to synchronize multiple [Thread]s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see [Mutex]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index b14351ee28..be9509fda5 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -45,7 +45,7 @@ </method> </methods> <members> - <member name="code" type="String" setter="set_code" getter="get_code"> + <member name="code" type="String" setter="set_code" getter="get_code" default=""""> </member> </members> <constants> diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index ef355c4417..01d9055569 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -48,7 +48,7 @@ </method> </methods> <members> - <member name="shader" type="Shader" setter="set_shader" getter="get_shader"> + <member name="shader" type="Shader" setter="set_shader" getter="get_shader" default="null"> The [Shader] program used to render this material. </member> </members> diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml index d622ff1cf2..ce5947bc06 100644 --- a/doc/classes/Shape.xml +++ b/doc/classes/Shape.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="margin" type="float" setter="set_margin" getter="get_margin"> + <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> </member> </members> <constants> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index c887e23de0..2c3120f04d 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Shape2D" inherits="Resource" category="Core" version="3.2"> <brief_description> - Base class for all 2D Shapes. + Base class for all 2D shapes. </brief_description> <description> - Base class for all 2D Shapes. All 2D shape types inherit from this. + Base class for all 2D shapes. All 2D shape types inherit from this. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> @@ -76,7 +76,7 @@ </method> </methods> <members> - <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias"> + <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0"> </member> </members> <constants> diff --git a/doc/classes/ShortCut.xml b/doc/classes/ShortCut.xml index 4c5dc0e77b..44a10ba598 100644 --- a/doc/classes/ShortCut.xml +++ b/doc/classes/ShortCut.xml @@ -35,7 +35,7 @@ </method> </methods> <members> - <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut"> + <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut" default="null"> The shortcut's [InputEvent]. Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent]. </member> diff --git a/doc/classes/Skeleton.xml b/doc/classes/Skeleton.xml index b693ee0a5e..b1e71ee924 100644 --- a/doc/classes/Skeleton.xml +++ b/doc/classes/Skeleton.xml @@ -17,7 +17,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Add a bone, with name "name". [method get_bone_count] will become the bone index. + Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index. </description> </method> <method name="bind_child_node_to_bone"> @@ -28,7 +28,7 @@ <argument index="1" name="node" type="Node"> </argument> <description> - Deprecated soon. + [i]Deprecated soon.[/i] </description> </method> <method name="clear_bones"> @@ -44,7 +44,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Returns the bone index that matches "name" as its name. + Returns the bone index that matches [code]name[/code] as its name. </description> </method> <method name="get_bone_count" qualifiers="const"> @@ -78,7 +78,7 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> - Returns the name of the bone at index "index". + Returns the name of the bone at index [code]index[/code]. </description> </method> <method name="get_bone_parent" qualifiers="const"> @@ -87,7 +87,8 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> - Returns the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx". + Returns the bone index which is the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. + [b]Note:[/b] The parent bone returned will always be less than [code]bone_idx[/code]. </description> </method> <method name="get_bone_pose" qualifiers="const"> @@ -105,7 +106,7 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> - Returns the rest transform for a bone "bone_idx". + Returns the rest transform for a bone [code]bone_idx[/code]. </description> </method> <method name="get_bone_transform" qualifiers="const"> @@ -123,7 +124,7 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> - Deprecated soon. + [i]Deprecated soon.[/i] </description> </method> <method name="is_bone_rest_disabled" qualifiers="const"> @@ -218,7 +219,8 @@ <argument index="1" name="parent_idx" type="int"> </argument> <description> - Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx". + Sets the bone index [code]parent_idx[/code] as the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. + [b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code]. </description> </method> <method name="set_bone_pose"> @@ -229,7 +231,7 @@ <argument index="1" name="pose" type="Transform"> </argument> <description> - Returns the pose transform for bone "bone_idx". + Returns the pose transform for bone [code]bone_idx[/code]. </description> </method> <method name="set_bone_rest"> @@ -240,7 +242,7 @@ <argument index="1" name="rest" type="Transform"> </argument> <description> - Set the rest transform for bone "bone_idx" + Sets the rest transform for bone [code]bone_idx[/code]. </description> </method> <method name="unbind_child_node_from_bone"> @@ -251,7 +253,7 @@ <argument index="1" name="node" type="Node"> </argument> <description> - Deprecated soon. + [i]Deprecated soon.[/i] </description> </method> <method name="unparent_bone_and_rest"> @@ -264,7 +266,7 @@ </method> </methods> <members> - <member name="bones_in_world_transform" type="bool" setter="set_use_bones_in_world_transform" getter="is_using_bones_in_world_transform"> + <member name="bones_in_world_transform" type="bool" setter="set_use_bones_in_world_transform" getter="is_using_bones_in_world_transform" default="false"> </member> </members> <constants> diff --git a/doc/classes/SkeletonIK.xml b/doc/classes/SkeletonIK.xml index 42c7759c1f..2f35826cc7 100644 --- a/doc/classes/SkeletonIK.xml +++ b/doc/classes/SkeletonIK.xml @@ -35,25 +35,25 @@ </method> </methods> <members> - <member name="interpolation" type="float" setter="set_interpolation" getter="get_interpolation"> + <member name="interpolation" type="float" setter="set_interpolation" getter="get_interpolation" default="1.0"> </member> - <member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position"> + <member name="magnet" type="Vector3" setter="set_magnet_position" getter="get_magnet_position" default="Vector3( 0, 0, 0 )"> </member> - <member name="max_iterations" type="int" setter="set_max_iterations" getter="get_max_iterations"> + <member name="max_iterations" type="int" setter="set_max_iterations" getter="get_max_iterations" default="10"> </member> - <member name="min_distance" type="float" setter="set_min_distance" getter="get_min_distance"> + <member name="min_distance" type="float" setter="set_min_distance" getter="get_min_distance" default="0.01"> </member> - <member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis"> + <member name="override_tip_basis" type="bool" setter="set_override_tip_basis" getter="is_override_tip_basis" default="true"> </member> - <member name="root_bone" type="String" setter="set_root_bone" getter="get_root_bone"> + <member name="root_bone" type="String" setter="set_root_bone" getter="get_root_bone" default=""""> </member> - <member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform"> + <member name="target" type="Transform" setter="set_target_transform" getter="get_target_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> - <member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node"> + <member name="target_node" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> </member> - <member name="tip_bone" type="String" setter="set_tip_bone" getter="get_tip_bone"> + <member name="tip_bone" type="String" setter="set_tip_bone" getter="get_tip_bone" default=""""> </member> - <member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet"> + <member name="use_magnet" type="bool" setter="set_use_magnet" getter="is_using_magnet" default="false"> </member> </members> <constants> diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml index a5e065203e..398a988d9e 100644 --- a/doc/classes/Sky.xml +++ b/doc/classes/Sky.xml @@ -11,33 +11,32 @@ <methods> </methods> <members> - <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize"> - The [Sky]'s radiance map size. - The higher the radiance map size, the more detailed the lighting from the [Sky] will be. - See [enum RadianceSize] constants for values. Default size is [constant RADIANCE_SIZE_512]. + <member name="radiance_size" type="int" setter="set_radiance_size" getter="get_radiance_size" enum="Sky.RadianceSize" default="2"> + The [Sky]'s radiance map size. The higher the radiance map size, the more detailed the lighting from the [Sky] will be. + See [enum RadianceSize] constants for values. </member> </members> <constants> <constant name="RADIANCE_SIZE_32" value="0" enum="RadianceSize"> - Radiance texture size is 32x32 pixels. + Radiance texture size is 32×32 pixels. </constant> <constant name="RADIANCE_SIZE_64" value="1" enum="RadianceSize"> - Radiance texture size is 64x64 pixels. + Radiance texture size is 64×64 pixels. </constant> <constant name="RADIANCE_SIZE_128" value="2" enum="RadianceSize"> - Radiance texture size is 128x128 pixels. + Radiance texture size is 128×128 pixels. </constant> <constant name="RADIANCE_SIZE_256" value="3" enum="RadianceSize"> - Radiance texture size is 256x256 pixels. + Radiance texture size is 256×256 pixels. </constant> <constant name="RADIANCE_SIZE_512" value="4" enum="RadianceSize"> - Radiance texture size is 512x512 pixels. + Radiance texture size is 512×512 pixels. </constant> <constant name="RADIANCE_SIZE_1024" value="5" enum="RadianceSize"> - Radiance texture size is 1024x1024 pixels. + Radiance texture size is 1024×1024 pixels. </constant> <constant name="RADIANCE_SIZE_2048" value="6" enum="RadianceSize"> - Radiance texture size is 2048x2048 pixels. + Radiance texture size is 2048×2048 pixels. </constant> <constant name="RADIANCE_SIZE_MAX" value="7" enum="RadianceSize"> Represents the size of the [enum RadianceSize] enum. diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml index 8fdf2bc848..24ddb95c96 100644 --- a/doc/classes/Slider.xml +++ b/doc/classes/Slider.xml @@ -1,28 +1,28 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Slider" inherits="Range" category="Core" version="3.2"> <brief_description> - Base class for GUI Sliders. + Base class for GUI sliders. </brief_description> <description> - Base class for GUI Sliders. + Base class for GUI sliders. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="editable" type="bool" setter="set_editable" getter="is_editable"> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> If [code]true[/code], the slider can be interacted with. If [code]false[/code], the value can be changed only by code. </member> - <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode"> + <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="2"> </member> - <member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable"> + <member name="scrollable" type="bool" setter="set_scrollable" getter="is_scrollable" default="true"> If [code]true[/code], the value can be changed using the mouse wheel. </member> - <member name="tick_count" type="int" setter="set_ticks" getter="get_ticks"> + <member name="tick_count" type="int" setter="set_ticks" getter="get_ticks" default="0"> Number of ticks displayed on the slider, including border ticks. Ticks are uniformly-distributed value markers. </member> - <member name="ticks_on_borders" type="bool" setter="set_ticks_on_borders" getter="get_ticks_on_borders"> + <member name="ticks_on_borders" type="bool" setter="set_ticks_on_borders" getter="get_ticks_on_borders" default="false"> If [code]true[/code], the slider will display ticks for minimum and maximum values. </member> </members> diff --git a/doc/classes/SliderJoint.xml b/doc/classes/SliderJoint.xml index 75406df39f..a91f67f107 100644 --- a/doc/classes/SliderJoint.xml +++ b/doc/classes/SliderJoint.xml @@ -4,89 +4,89 @@ Piston kind of slider between two bodies in 3D. </brief_description> <description> - Slides across the x-axis of the pivot object. + Slides across the X axis of the pivot object. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="angular_limit/damping" type="float" setter="set_param" getter="get_param"> + <member name="angular_limit/damping" type="float" setter="set_param" getter="get_param" default="0.0"> The amount of damping of the rotation when the limit is surpassed. A lower damping value allows a rotation initiated by body A to travel to body B slower. </member> - <member name="angular_limit/lower_angle" type="float" setter="_set_lower_limit_angular" getter="_get_lower_limit_angular"> + <member name="angular_limit/lower_angle" type="float" setter="_set_lower_limit_angular" getter="_get_lower_limit_angular" default="0.0"> The lower limit of rotation in the slider. </member> - <member name="angular_limit/restitution" type="float" setter="set_param" getter="get_param"> + <member name="angular_limit/restitution" type="float" setter="set_param" getter="get_param" default="0.7"> The amount of restitution of the rotation when the limit is surpassed. Does not affect damping. </member> - <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param"> + <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="1.0"> A factor applied to the all rotation once the limit is surpassed. Makes all rotation slower when between 0 and 1. </member> - <member name="angular_limit/upper_angle" type="float" setter="_set_upper_limit_angular" getter="_get_upper_limit_angular"> + <member name="angular_limit/upper_angle" type="float" setter="_set_upper_limit_angular" getter="_get_upper_limit_angular" default="0.0"> The upper limit of rotation in the slider. </member> - <member name="angular_motion/damping" type="float" setter="set_param" getter="get_param"> + <member name="angular_motion/damping" type="float" setter="set_param" getter="get_param" default="1.0"> The amount of damping of the rotation in the limits. </member> - <member name="angular_motion/restitution" type="float" setter="set_param" getter="get_param"> + <member name="angular_motion/restitution" type="float" setter="set_param" getter="get_param" default="0.7"> The amount of restitution of the rotation in the limits. </member> - <member name="angular_motion/softness" type="float" setter="set_param" getter="get_param"> + <member name="angular_motion/softness" type="float" setter="set_param" getter="get_param" default="1.0"> A factor applied to the all rotation in the limits. </member> - <member name="angular_ortho/damping" type="float" setter="set_param" getter="get_param"> + <member name="angular_ortho/damping" type="float" setter="set_param" getter="get_param" default="1.0"> The amount of damping of the rotation across axes orthogonal to the slider. </member> - <member name="angular_ortho/restitution" type="float" setter="set_param" getter="get_param"> + <member name="angular_ortho/restitution" type="float" setter="set_param" getter="get_param" default="0.7"> The amount of restitution of the rotation across axes orthogonal to the slider. </member> - <member name="angular_ortho/softness" type="float" setter="set_param" getter="get_param"> + <member name="angular_ortho/softness" type="float" setter="set_param" getter="get_param" default="1.0"> A factor applied to the all rotation across axes orthogonal to the slider. </member> - <member name="linear_limit/damping" type="float" setter="set_param" getter="get_param"> + <member name="linear_limit/damping" type="float" setter="set_param" getter="get_param" default="1.0"> The amount of damping that happens once the limit defined by [member linear_limit/lower_distance] and [member linear_limit/upper_distance] is surpassed. </member> - <member name="linear_limit/lower_distance" type="float" setter="set_param" getter="get_param"> - The minimum difference between the pivot points on their x-axis before damping happens. + <member name="linear_limit/lower_distance" type="float" setter="set_param" getter="get_param" default="-1.0"> + The minimum difference between the pivot points on their X axis before damping happens. </member> - <member name="linear_limit/restitution" type="float" setter="set_param" getter="get_param"> + <member name="linear_limit/restitution" type="float" setter="set_param" getter="get_param" default="0.7"> The amount of restitution once the limits are surpassed. The lower, the more velocity-energy gets lost. </member> - <member name="linear_limit/softness" type="float" setter="set_param" getter="get_param"> + <member name="linear_limit/softness" type="float" setter="set_param" getter="get_param" default="1.0"> A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. </member> - <member name="linear_limit/upper_distance" type="float" setter="set_param" getter="get_param"> - The maximum difference between the pivot points on their x-axis before damping happens. + <member name="linear_limit/upper_distance" type="float" setter="set_param" getter="get_param" default="1.0"> + The maximum difference between the pivot points on their X axis before damping happens. </member> - <member name="linear_motion/damping" type="float" setter="set_param" getter="get_param"> + <member name="linear_motion/damping" type="float" setter="set_param" getter="get_param" default="0.0"> The amount of damping inside the slider limits. </member> - <member name="linear_motion/restitution" type="float" setter="set_param" getter="get_param"> + <member name="linear_motion/restitution" type="float" setter="set_param" getter="get_param" default="0.7"> The amount of restitution inside the slider limits. </member> - <member name="linear_motion/softness" type="float" setter="set_param" getter="get_param"> + <member name="linear_motion/softness" type="float" setter="set_param" getter="get_param" default="1.0"> A factor applied to the movement across the slider axis as long as the slider is in the limits. The lower, the slower the movement. </member> - <member name="linear_ortho/damping" type="float" setter="set_param" getter="get_param"> + <member name="linear_ortho/damping" type="float" setter="set_param" getter="get_param" default="1.0"> The amount of damping when movement is across axes orthogonal to the slider. </member> - <member name="linear_ortho/restitution" type="float" setter="set_param" getter="get_param"> + <member name="linear_ortho/restitution" type="float" setter="set_param" getter="get_param" default="0.7"> The amount of restitution when movement is across axes orthogonal to the slider. </member> - <member name="linear_ortho/softness" type="float" setter="set_param" getter="get_param"> + <member name="linear_ortho/softness" type="float" setter="set_param" getter="get_param" default="1.0"> A factor applied to the movement across axes orthogonal to the slider. </member> </members> <constants> <constant name="PARAM_LINEAR_LIMIT_UPPER" value="0" enum="Param"> - The maximum difference between the pivot points on their x-axis before damping happens. + The maximum difference between the pivot points on their X axis before damping happens. </constant> <constant name="PARAM_LINEAR_LIMIT_LOWER" value="1" enum="Param"> - The minimum difference between the pivot points on their x-axis before damping happens. + The minimum difference between the pivot points on their X axis before damping happens. </constant> <constant name="PARAM_LINEAR_LIMIT_SOFTNESS" value="2" enum="Param"> A factor applied to the movement across the slider axis once the limits get surpassed. The lower, the slower the movement. diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody.xml index b235a26ad7..5cde31fa59 100644 --- a/doc/classes/SoftBody.xml +++ b/doc/classes/SoftBody.xml @@ -90,34 +90,34 @@ </method> </methods> <members> - <member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness"> + <member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness" default="0.5"> </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this area scans for collisions. </member> - <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient"> + <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> </member> - <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient"> + <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0"> </member> - <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness"> + <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5"> </member> - <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore"> + <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath("")"> </member> - <member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient"> + <member name="pose_matching_coefficient" type="float" setter="set_pose_matching_coefficient" getter="get_pose_matching_coefficient" default="0.0"> </member> - <member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient"> + <member name="pressure_coefficient" type="float" setter="set_pressure_coefficient" getter="get_pressure_coefficient" default="0.0"> </member> - <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision"> + <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5"> Increasing this value will improve the resulting simulation, but can affect performance. Use with care. </member> - <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass"> + <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0"> </member> - <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness"> + <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.5"> </member> </members> <constants> diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index f4c0134471..9f4118aa7b 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Spatial" inherits="Node" category="Core" version="3.2"> <brief_description> - Most basic 3D game object, parent of all 3D related nodes. + Most basic 3D game object, parent of all 3D-related nodes. </brief_description> <description> Most basic 3D game object, with a 3D [Transform] and visibility settings. All other 3D game objects inherit from Spatial. Use [Spatial] as a parent node to move, scale, rotate and show/hide children in a 3D project. - Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Spatial] object is set as top level. Affine operations in this coordinate system correspond to direct affine operations on the [Spatial]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Spatial] object itself is referred to as object-local coordinate system. + Affine operations (rotate, scale, translate) happen in parent's local coordinate system, unless the [Spatial] object is set as top-level. Affine operations in this coordinate system correspond to direct affine operations on the [Spatial]'s transform. The word local below refers to this coordinate system. The coordinate system that is attached to the [Spatial] object itself is referred to as object-local coordinate system. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/introduction_to_3d.html</link> @@ -161,7 +161,7 @@ <argument index="0" name="angle" type="float"> </argument> <description> - Rotates the local transformation around the X axis by angle in radians + Rotates the local transformation around the X axis by angle in radians. </description> </method> <method name="rotate_y"> @@ -212,7 +212,7 @@ <return type="void"> </return> <description> - Reset all transformations for this node. Set its [Transform] to identity matrix. + Reset all transformations for this node (sets its [Transform] to the identity matrix). </description> </method> <method name="set_ignore_transform_notification"> @@ -221,7 +221,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Set whether the node ignores notification that its transformation (global or local) changed. + Sets whether the node ignores notification that its transformation (global or local) changed. </description> </method> <method name="set_notify_local_transform"> @@ -230,7 +230,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Set whether the node notifies about its local transformation changes. [Spatial] will not propagate this by default. + Sets whether the node notifies about its local transformation changes. [Spatial] will not propagate this by default. </description> </method> <method name="set_notify_transform"> @@ -239,7 +239,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Set whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default. + Sets whether the node notifies about its global and local transformation changes. [Spatial] will not propagate this by default. </description> </method> <method name="show"> @@ -255,7 +255,7 @@ <argument index="0" name="local_point" type="Vector3"> </argument> <description> - Transforms [Vector3] "local_point" from this node's local space to world space. + Transforms [code]local_point[/code] from this node's local space to world space. </description> </method> <method name="to_local" qualifiers="const"> @@ -264,7 +264,7 @@ <argument index="0" name="global_point" type="Vector3"> </argument> <description> - Transforms [Vector3] "global_point" from world space to this node's local space. + Transforms [code]global_point[/code] from world space to this node's local space. </description> </method> <method name="translate"> @@ -300,23 +300,23 @@ World space (global) [Transform] of this node. </member> <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation"> - Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle). - Note that in the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. + Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). + [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. </member> - <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees"> - Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X-angle, Y-angle, Z-angle). + <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees" default="Vector3( 0, 0, 0 )"> + Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). </member> - <member name="scale" type="Vector3" setter="set_scale" getter="get_scale"> + <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3( 1, 1, 1 )"> Scale part of the local transformation. </member> - <member name="transform" type="Transform" setter="set_transform" getter="get_transform"> + <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> Local space [Transform] of this node, with respect to the parent node. </member> - <member name="translation" type="Vector3" setter="set_translation" getter="get_translation"> + <member name="translation" type="Vector3" setter="set_translation" getter="get_translation" default="Vector3( 0, 0, 0 )"> Local translation of this node. </member> - <member name="visible" type="bool" setter="set_visible" getter="is_visible"> - If [code]true[/code], this node is drawn. Default value: [code]true[/code]. + <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> + If [code]true[/code], this node is drawn. </member> </members> <signals> diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index 45d92aa0c3..5e18e72f90 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -12,20 +12,20 @@ <methods> </methods> <members> - <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo"> + <member name="albedo_color" type="Color" setter="set_albedo" getter="get_albedo" default="Color( 1, 1, 1, 1 )"> The material's base color. </member> - <member name="albedo_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="albedo_texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> </member> <member name="anisotropy" type="float" setter="set_anisotropy" getter="get_anisotropy"> The strength of the anisotropy effect. </member> - <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. Default value: [code]false[/code]. + <member name="anisotropy_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], anisotropy is enabled. Changes the shape of the specular blob and aligns it to tangent space. </member> <member name="anisotropy_flowmap" type="Texture" setter="set_texture" getter="get_texture"> </member> - <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature"> + <member name="ao_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], ambient occlusion is enabled. </member> <member name="ao_light_affect" type="float" setter="set_ao_light_affect" getter="get_ao_light_affect"> @@ -38,8 +38,8 @@ </member> <member name="clearcoat" type="float" setter="set_clearcoat" getter="get_clearcoat"> </member> - <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the material. Default value: [code]false[/code]. + <member name="clearcoat_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], clearcoat rendering is enabled. Adds a secondary transparent pass to the material. </member> <member name="clearcoat_gloss" type="float" setter="set_clearcoat_gloss" getter="get_clearcoat_gloss"> </member> @@ -47,8 +47,8 @@ </member> <member name="depth_deep_parallax" type="bool" setter="set_depth_deep_parallax" getter="is_depth_deep_parallax_enabled"> </member> - <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code], Depth mapping is enabled. See also [member normal_enabled]. + <member name="depth_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], depth mapping is enabled (also called "parallax mapping" or "height mapping"). See also [member normal_enabled]. </member> <member name="depth_flip_binormal" type="bool" setter="set_depth_deep_parallax_flip_binormal" getter="get_depth_deep_parallax_flip_binormal"> </member> @@ -66,7 +66,7 @@ </member> <member name="detail_blend_mode" type="int" setter="set_detail_blend_mode" getter="get_detail_blend_mode" enum="SpatialMaterial.BlendMode"> </member> - <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature"> + <member name="detail_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> </member> <member name="detail_mask" type="Texture" setter="set_texture" getter="get_texture"> </member> @@ -78,12 +78,12 @@ </member> <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance"> </member> - <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="SpatialMaterial.DistanceFadeMode"> + <member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="SpatialMaterial.DistanceFadeMode" default="0"> </member> <member name="emission" type="Color" setter="set_emission" getter="get_emission"> The emitted light's color. See [member emission_enabled]. </member> - <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature"> + <member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], the body emits light. </member> <member name="emission_energy" type="float" setter="set_emission_energy" getter="get_emission_energy"> @@ -95,50 +95,52 @@ </member> <member name="emission_texture" type="Texture" setter="set_texture" getter="get_texture"> </member> - <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag"> + <member name="flags_albedo_tex_force_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> - <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], the object receives no ambient light. Default value: [code]false[/code]. + <member name="flags_disable_ambient_light" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the object receives no ambient light. </member> - <member name="flags_do_not_receive_shadows" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. Default value: [code]false[/code]. + <member name="flags_do_not_receive_shadows" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the object receives no shadow that would otherwise be cast onto it. </member> - <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag"> + <member name="flags_ensure_correct_normals" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> - <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], the object is rendered at the same size regardless of distance. Default value: [code]false[/code]. + <member name="flags_fixed_size" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the object is rendered at the same size regardless of distance. </member> - <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag"> + <member name="flags_no_depth_test" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], depth testing is disabled and the object will be drawn in render order. </member> - <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code], transparency is enabled on the body. Default value: [code]false[/code]. See also [member params_blend_mode]. + <member name="flags_transparent" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], transparency is enabled on the body. See also [member params_blend_mode]. </member> - <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], the object is unaffected by lighting. Default value: [code]false[/code]. + <member name="flags_unshaded" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the object is unaffected by lighting. </member> - <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], render point size can be changed. Note: this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. + <member name="flags_use_point_size" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], render point size can be changed. + [b]Note:[/b] this is only effective for objects whose geometry is point-based rather than triangle-based. See also [member params_point_size]. </member> - <member name="flags_use_shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag"> + <member name="flags_use_shadow_to_opacity" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> - <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. Default value: [code]false[/code]. + <member name="flags_vertex_lighting" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], lighting is calculated per vertex rather than per pixel. This may increase performance on low-end devices. </member> - <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar]. Default value: [code]false[/code]. + <member name="flags_world_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], triplanar mapping is calculated in world space rather than object local space. See also [member uv1_triplanar]. </member> - <member name="metallic" type="float" setter="set_metallic" getter="get_metallic"> - The reflectivity of the object's surface. The higher the value the more light is reflected. + <member name="metallic" type="float" setter="set_metallic" getter="get_metallic" default="0.0"> + The reflectivity of the object's surface. The higher the value, the more light is reflected. </member> - <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular"> - General reflectivity amount. Note: unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness]. + <member name="metallic_specular" type="float" setter="set_specular" getter="get_specular" default="0.5"> + General reflectivity amount. + [b]Note:[/b] unlike [member metallic], this is not energy-conserving, so it should be left at [code]0.5[/code] in most cases. See also [member roughness]. </member> - <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="metallic_texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> </member> - <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel"> + <member name="metallic_texture_channel" type="int" setter="set_metallic_texture_channel" getter="get_metallic_texture_channel" enum="SpatialMaterial.TextureChannel" default="2"> </member> - <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature"> + <member name="normal_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], normal mapping is enabled. </member> <member name="normal_scale" type="float" setter="set_normal_scale" getter="get_normal_scale"> @@ -148,55 +150,56 @@ </member> <member name="params_alpha_scissor_threshold" type="float" setter="set_alpha_scissor_threshold" getter="get_alpha_scissor_threshold"> </member> - <member name="params_billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag"> + <member name="params_billboard_keep_scale" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> - <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode"> + <member name="params_billboard_mode" type="int" setter="set_billboard_mode" getter="get_billboard_mode" enum="SpatialMaterial.BillboardMode" default="0"> Controls how the object faces the camera. See [enum BillboardMode]. </member> - <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="SpatialMaterial.BlendMode"> - The material's blend mode. Note that values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode]. + <member name="params_blend_mode" type="int" setter="set_blend_mode" getter="get_blend_mode" enum="SpatialMaterial.BlendMode" default="0"> + The material's blend mode. + [b]Note:[/b] Values other than [code]Mix[/code] force the object into the transparent pipeline. See [enum BlendMode]. </member> - <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="SpatialMaterial.CullMode"> + <member name="params_cull_mode" type="int" setter="set_cull_mode" getter="get_cull_mode" enum="SpatialMaterial.CullMode" default="0"> Which side of the object is not drawn when backfaces are rendered. See [enum CullMode]. </member> - <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="SpatialMaterial.DepthDrawMode"> + <member name="params_depth_draw_mode" type="int" setter="set_depth_draw_mode" getter="get_depth_draw_mode" enum="SpatialMaterial.DepthDrawMode" default="0"> Determines when depth rendering takes place. See [enum DepthDrawMode]. See also [member flags_transparent]. </member> - <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="SpatialMaterial.DiffuseMode"> + <member name="params_diffuse_mode" type="int" setter="set_diffuse_mode" getter="get_diffuse_mode" enum="SpatialMaterial.DiffuseMode" default="0"> The algorithm used for diffuse light scattering. See [enum DiffuseMode]. </member> - <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled"> + <member name="params_grow" type="bool" setter="set_grow_enabled" getter="is_grow_enabled" default="false"> If [code]true[/code], enables the vertex grow setting. See [member params_grow_amount]. </member> <member name="params_grow_amount" type="float" setter="set_grow" getter="get_grow"> Grows object vertices in the direction of their normals. </member> - <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width"> + <member name="params_line_width" type="float" setter="set_line_width" getter="get_line_width" default="1.0"> </member> - <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size"> + <member name="params_point_size" type="float" setter="set_point_size" getter="get_point_size" default="1.0"> The point size in pixels. See [member flags_use_point_size]. </member> - <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="SpatialMaterial.SpecularMode"> + <member name="params_specular_mode" type="int" setter="set_specular_mode" getter="get_specular_mode" enum="SpatialMaterial.SpecularMode" default="0"> The method for rendering the specular blob. See [enum SpecularMode]. </member> - <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag"> + <member name="params_use_alpha_scissor" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> <member name="particles_anim_h_frames" type="int" setter="set_particles_anim_h_frames" getter="get_particles_anim_h_frames"> - The number of horizontal frames in the particle spritesheet. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. + The number of horizontal frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. </member> <member name="particles_anim_loop" type="bool" setter="set_particles_anim_loop" getter="get_particles_anim_loop"> - If [code]true[/code], particle animations are looped. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. + If [code]true[/code], particle animations are looped. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. </member> <member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames"> - The number of vertical frames in the particle spritesheet. Only enabled when using [code]BillboardMode.BILLBOARD_PARTICLES[/code]. See [member params_billboard_mode]. + The number of vertical frames in the particle sprite sheet. Only enabled when using [constant BILLBOARD_PARTICLES]. See [member params_billboard_mode]. </member> <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance"> </member> - <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled"> - If [code]true[/code], the proximity and distance fade effect is enabled. Default value: [code]false[/code]. + <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled" default="false"> + If [code]true[/code], the proximity and distance fade effect is enabled. </member> - <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object. Default value: [code]false[/code]. + <member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], the refraction effect is enabled. Distorts transparency based on light from behind the object. </member> <member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction"> The strength of the refraction effect. @@ -207,22 +210,22 @@ </member> <member name="rim" type="float" setter="set_rim" getter="get_rim"> </member> - <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code], rim effect is enabled. Default value: [code]false[/code]. + <member name="rim_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], rim effect is enabled. </member> <member name="rim_texture" type="Texture" setter="set_texture" getter="get_texture"> </member> <member name="rim_tint" type="float" setter="set_rim_tint" getter="get_rim_tint"> The amount of to blend light and albedo color when rendering rim effect. If [code]0[/code] the light color is used, while [code]1[/code] means albedo color is used. An intermediate value generally works best. </member> - <member name="roughness" type="float" setter="set_roughness" getter="get_roughness"> + <member name="roughness" type="float" setter="set_roughness" getter="get_roughness" default="1.0"> Surface reflection. A value of [code]0[/code] represents a perfect mirror while a value of [code]1[/code] completely blurs the reflection. See also [member metallic]. </member> - <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="roughness_texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> </member> - <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel"> + <member name="roughness_texture_channel" type="int" setter="set_roughness_texture_channel" getter="get_roughness_texture_channel" enum="SpatialMaterial.TextureChannel" default="1"> </member> - <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature"> + <member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. </member> <member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength"> @@ -233,32 +236,32 @@ <member name="transmission" type="Color" setter="set_transmission" getter="get_transmission"> The color used by the transmission effect. Represents the light passing through an object. </member> - <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature"> - If [code]true[/code], the transmission effect is enabled. Default value: [code]false[/code]. + <member name="transmission_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> + If [code]true[/code], the transmission effect is enabled. </member> <member name="transmission_texture" type="Texture" setter="set_texture" getter="get_texture"> </member> - <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset"> + <member name="uv1_offset" type="Vector3" setter="set_uv1_offset" getter="get_uv1_offset" default="Vector3( 0, 0, 0 )"> </member> - <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale"> + <member name="uv1_scale" type="Vector3" setter="set_uv1_scale" getter="get_uv1_scale" default="Vector3( 1, 1, 1 )"> </member> - <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag"> + <member name="uv1_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> - <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness"> + <member name="uv1_triplanar_sharpness" type="float" setter="set_uv1_triplanar_blend_sharpness" getter="get_uv1_triplanar_blend_sharpness" default="1.0"> </member> - <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset"> + <member name="uv2_offset" type="Vector3" setter="set_uv2_offset" getter="get_uv2_offset" default="Vector3( 0, 0, 0 )"> </member> - <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale"> + <member name="uv2_scale" type="Vector3" setter="set_uv2_scale" getter="get_uv2_scale" default="Vector3( 1, 1, 1 )"> </member> - <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag"> + <member name="uv2_triplanar" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> - <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness"> + <member name="uv2_triplanar_sharpness" type="float" setter="set_uv2_triplanar_blend_sharpness" getter="get_uv2_triplanar_blend_sharpness" default="1.0"> </member> - <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], the model's vertex colors are processed as sRGB mode. Default value: [code]false[/code]. + <member name="vertex_color_is_srgb" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the model's vertex colors are processed as sRGB mode. </member> - <member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag"> - If [code]true[/code], the vertex color is used as albedo color. Default value: [code]false[/code]. + <member name="vertex_color_use_as_albedo" type="bool" setter="set_flag" getter="get_flag" default="false"> + If [code]true[/code], the vertex color is used as albedo color. </member> </members> <constants> @@ -430,13 +433,13 @@ No specular blob. </constant> <constant name="BILLBOARD_DISABLED" value="0" enum="BillboardMode"> - Default value. + Billboard mode is disabled. </constant> <constant name="BILLBOARD_ENABLED" value="1" enum="BillboardMode"> - The object's z-axis will always face the camera. + The object's Z axis will always face the camera. </constant> <constant name="BILLBOARD_FIXED_Y" value="2" enum="BillboardMode"> - The object's x-axis will always face the camera. + The object's X axis will always face the camera. </constant> <constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode"> Used for particle systems. Enables particle animation options. diff --git a/doc/classes/SpatialVelocityTracker.xml b/doc/classes/SpatialVelocityTracker.xml index 45dd06e926..0dcd174a67 100644 --- a/doc/classes/SpatialVelocityTracker.xml +++ b/doc/classes/SpatialVelocityTracker.xml @@ -31,7 +31,7 @@ </method> </methods> <members> - <member name="track_physics_step" type="bool" setter="set_track_physics_step" getter="is_tracking_physics_step"> + <member name="track_physics_step" type="bool" setter="set_track_physics_step" getter="is_tracking_physics_step" default="false"> </member> </members> <constants> diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml index 4ebb2e919d..6d81d8ff82 100644 --- a/doc/classes/SphereMesh.xml +++ b/doc/classes/SphereMesh.xml @@ -11,20 +11,21 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height"> - Full height of the sphere. Defaults to 2.0. + <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> + Full height of the sphere. </member> - <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere"> - Determines whether a full sphere or a hemisphere is created. Attention: To get a regular hemisphere, the height and radius of the sphere have to equal. Defaults to [code]false[/code]. + <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" default="false"> + Determines whether a full sphere or a hemisphere is created. + [b]Note:[/b] To get a regular hemisphere, the height and radius of the sphere must be equal. </member> - <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments"> - Number of radial segments on the sphere. Defaults to 64. + <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"> - Radius of sphere. Defaults to 1.0. + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> + Radius of sphere. </member> - <member name="rings" type="int" setter="set_rings" getter="get_rings"> - Number of segments along the height of the sphere. Defaults to 32. + <member name="rings" type="int" setter="set_rings" getter="get_rings" default="32"> + Number of segments along the height of the sphere. </member> </members> <constants> diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml index 21309ae83e..616c3b3894 100644 --- a/doc/classes/SphereShape.xml +++ b/doc/classes/SphereShape.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> The sphere's radius. The shape's diameter is double the radius. </member> </members> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 8e2e2f1baa..bda0b1192d 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -5,6 +5,16 @@ </brief_description> <description> SpinBox is a numerical input text field. It allows entering integers and floats. + [b]Example:[/b] + [codeblock] + var spin_box = SpinBox.new() + add_child(spin_box) + var line_edit = spin_box.get_line_edit() + line_edit.context_menu_enabled = false + spin_box.align = LineEdit.ALIGN_RIGHT + [/codeblock] + The above code will create a [SpinBox], disable context menu on it and set the text alignment to right. + See [Range] class for more options over the [SpinBox]. </description> <tutorials> </tutorials> @@ -13,23 +23,29 @@ <return type="LineEdit"> </return> <description> + Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit]. </description> </method> </methods> <members> - <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align"> + <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0"> + Sets the text alignment of the [SpinBox]. </member> - <member name="editable" type="bool" setter="set_editable" getter="is_editable"> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> + If [code]true[/code], the [SpinBox] will be editable. Otherwise, it will be read only. </member> - <member name="prefix" type="String" setter="set_prefix" getter="get_prefix"> + <member name="prefix" type="String" setter="set_prefix" getter="get_prefix" default=""""> + Adds the specified [code]prefix[/code] string before the numerical value of the [SpinBox]. </member> - <member name="suffix" type="String" setter="set_suffix" getter="get_suffix"> + <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default=""""> + Adds the specified [code]prefix[/code] string after the numerical value of the [SpinBox]. </member> </members> <constants> </constants> <theme_items> <theme_item name="updown" type="Texture"> + Sets a custom [Texture] for up and down arrows of the [SpinBox]. </theme_item> </theme_items> </class> diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml index 5d9a233624..d756c17cef 100644 --- a/doc/classes/SplitContainer.xml +++ b/doc/classes/SplitContainer.xml @@ -17,12 +17,12 @@ </method> </methods> <members> - <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed"> + <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" default="false"> </member> - <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility"> + <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility" default="0"> Determines whether the dragger is visible. </member> - <member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset"> + <member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" default="0"> </member> </members> <signals> diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml index 7369189c72..93aee55b99 100644 --- a/doc/classes/SpotLight.xml +++ b/doc/classes/SpotLight.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SpotLight" inherits="Light" category="Core" version="3.2"> <brief_description> - Spotlight [Light], such as a reflector spotlight or a lantern. + A spotlight, such as a reflector spotlight or a lantern. </brief_description> <description> - A SpotLight light is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance and this attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. + A Spotlight is a type of [Light] node that emits lights in a specific direction, in the shape of a cone. The light is attenuated through the distance. This attenuation can be configured by changing the energy, radius and attenuation parameters of [Light]. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/3d/lights_and_shadows.html</link> @@ -12,13 +12,17 @@ <methods> </methods> <members> - <member name="spot_angle" type="float" setter="set_param" getter="get_param"> + <member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0"> + The spotlight's angle in degrees. </member> - <member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param"> + <member name="spot_angle_attenuation" type="float" setter="set_param" getter="get_param" default="1.0"> + The spotlight's angular attenuation curve. </member> - <member name="spot_attenuation" type="float" setter="set_param" getter="get_param"> + <member name="spot_attenuation" type="float" setter="set_param" getter="get_param" default="1.0"> + The spotlight's light energy attenuation curve. </member> - <member name="spot_range" type="float" setter="set_param" getter="get_param"> + <member name="spot_range" type="float" setter="set_param" getter="get_param" default="5.0"> + The maximal range that can be reached by the spotlight. </member> </members> <constants> diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm.xml index 50c6fef148..16b4b846e4 100644 --- a/doc/classes/SpringArm.xml +++ b/doc/classes/SpringArm.xml @@ -37,13 +37,13 @@ </method> </methods> <members> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> </member> - <member name="margin" type="float" setter="set_margin" getter="get_margin"> + <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.01"> </member> - <member name="shape" type="Shape" setter="set_shape" getter="get_shape"> + <member name="shape" type="Shape" setter="set_shape" getter="get_shape" default="null"> </member> - <member name="spring_length" type="float" setter="set_length" getter="get_length"> + <member name="spring_length" type="float" setter="set_length" getter="get_length" default="1.0"> </member> </members> <constants> diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml index 097a5f2ed2..c14ae43f66 100644 --- a/doc/classes/Sprite.xml +++ b/doc/classes/Sprite.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Sprite" inherits="Node2D" category="Core" version="3.2"> <brief_description> - General purpose Sprite node. + General-purpose sprite node. </brief_description> <description> A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. @@ -29,45 +29,45 @@ </argument> <description> Returns [code]true[/code], if the pixel at the given position is opaque and [code]false[/code] in other case. - Note: It also returns [code]false[/code], if the sprite's texture is null or if the given position is invalid. + [b]Note:[/b] It also returns [code]false[/code], if the sprite's texture is [code]null[/code] or if the given position is invalid. </description> </method> </methods> <members> - <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code], texture is centered. Default value: [code]true[/code]. + <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> + If [code]true[/code], texture is centered. </member> - <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. + <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false"> + If [code]true[/code], texture is flipped horizontally. </member> - <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. + <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false"> + If [code]true[/code], texture is flipped vertically. </member> - <member name="frame" type="int" setter="set_frame" getter="get_frame"> + <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. </member> - <member name="hframes" type="int" setter="set_hframes" getter="get_hframes"> + <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> The number of columns in the sprite sheet. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" default="null"> The normal map gives depth to the Sprite. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The texture's drawing offset. </member> - <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> - If [code]true[/code], texture is cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. + <member name="region_enabled" type="bool" setter="set_region" getter="is_region" default="false"> + If [code]true[/code], texture is cut from a larger atlas texture. See [member region_rect]. </member> - <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled"> + <member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled" default="false"> If [code]true[/code], the outermost pixels get blurred out. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> [Texture] object to draw. </member> - <member name="vframes" type="int" setter="set_vframes" getter="get_vframes"> + <member name="vframes" type="int" setter="set_vframes" getter="get_vframes" default="1"> The number of rows in the sprite sheet. </member> </members> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index 81fe182782..78004c60ee 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Sprite3D" inherits="SpriteBase3D" category="Core" version="3.2"> <brief_description> - 2D Sprite node in 3D world. + 2D sprite node in a 3D world. </brief_description> <description> A node that displays a 2D texture in a 3D environment. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation. @@ -11,22 +11,22 @@ <methods> </methods> <members> - <member name="frame" type="int" setter="set_frame" getter="get_frame"> + <member name="frame" type="int" setter="set_frame" getter="get_frame" default="0"> Current frame to display from sprite sheet. [member vframes] or [member hframes] must be greater than 1. </member> - <member name="hframes" type="int" setter="set_hframes" getter="get_hframes"> + <member name="hframes" type="int" setter="set_hframes" getter="get_hframes" default="1"> The number of columns in the sprite sheet. </member> - <member name="region_enabled" type="bool" setter="set_region" getter="is_region"> - If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect]. Default value: [code]false[/code]. + <member name="region_enabled" type="bool" setter="set_region" getter="is_region" default="false"> + If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect]. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> [Texture] object to draw. </member> - <member name="vframes" type="int" setter="set_vframes" getter="get_vframes"> + <member name="vframes" type="int" setter="set_vframes" getter="get_vframes" default="1"> The number of rows in the sprite sheet. </member> </members> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 237a8c9d12..9c5ed213a8 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SpriteBase3D" inherits="GeometryInstance" category="Core" version="3.2"> <brief_description> - 2D Sprite node in 3D environment. + 2D sprite node in 3D environment. </brief_description> <description> A node that displays 2D texture information in a 3D environment. @@ -23,48 +23,48 @@ </method> </methods> <members> - <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode"> + <member name="alpha_cut" type="int" setter="set_alpha_cut_mode" getter="get_alpha_cut_mode" enum="SpriteBase3D.AlphaCutMode" default="0"> </member> - <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis"> + <member name="axis" type="int" setter="set_axis" getter="get_axis" enum="Vector3.Axis" default="2"> The direction in which the front of the texture faces. </member> - <member name="centered" type="bool" setter="set_centered" getter="is_centered"> - If [code]true[/code], texture will be centered. Default value: [code]true[/code]. + <member name="centered" type="bool" setter="set_centered" getter="is_centered" default="true"> + If [code]true[/code], texture will be centered. </member> - <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code], texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. Default value: [code]true[/code]. + <member name="double_sided" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true"> + If [code]true[/code], texture can be seen from the back as well, if [code]false[/code], it is invisible when looking at it from behind. </member> - <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. + <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false"> + If [code]true[/code], texture is flipped horizontally. </member> - <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. + <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false"> + If [code]true[/code], texture is flipped vertically. </member> - <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate"> + <member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> A color value that gets multiplied on, could be used for mood-coloring or to simulate the color of light. </member> - <member name="offset" type="Vector2" setter="set_offset" getter="get_offset"> + <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The texture's drawing offset. </member> - <member name="opacity" type="float" setter="set_opacity" getter="get_opacity"> + <member name="opacity" type="float" setter="set_opacity" getter="get_opacity" default="1.0"> The objects visibility on a scale from [code]0[/code] fully invisible to [code]1[/code] fully visible. </member> - <member name="pixel_size" type="float" setter="set_pixel_size" getter="get_pixel_size"> - The size of one pixel's width on the Sprite to scale it in 3D. + <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="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code], the [Light] in the [Environment] has effects on the Sprite. Default value: [code]false[/code]. + <member name="shaded" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="false"> + If [code]true[/code], the [Light] in the [Environment] has effects on the sprite. </member> - <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag"> - If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the Sprite invisible. Default value: [code]true[/code]. + <member name="transparent" type="bool" setter="set_draw_flag" getter="get_draw_flag" default="true"> + If [code]true[/code], the texture's transparency and the opacity are used to make those parts of the sprite invisible. </member> </members> <constants> <constant name="FLAG_TRANSPARENT" value="0" enum="DrawFlags"> - If set, the texture's transparency and the opacity are used to make those parts of the Sprite invisible. + If set, the texture's transparency and the opacity are used to make those parts of the sprite invisible. </constant> <constant name="FLAG_SHADED" value="1" enum="DrawFlags"> - If set, the Light in the Environment has effects on the Sprite. + If set, lights in the environment affect the sprite. </constant> <constant name="FLAG_DOUBLE_SIDED" value="2" enum="DrawFlags"> If set, texture can be seen from the back as well, if not, it is invisible when looking at it from behind. diff --git a/doc/classes/StaticBody.xml b/doc/classes/StaticBody.xml index d2b7abebb1..878d76a2e3 100644 --- a/doc/classes/StaticBody.xml +++ b/doc/classes/StaticBody.xml @@ -4,8 +4,8 @@ Static body for 3D physics. </brief_description> <description> - Static body for 3D physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody] so they are great for scenario collision. - A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. + Static body for 3D physics. A static body is a simple body that is not intended to move. In contrast to [RigidBody], they don't consume any CPU resources as long as they don't move. + A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active, the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies. Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). </description> <tutorials> @@ -14,18 +14,20 @@ </methods> <members> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> - The body bounciness. + The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). + Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. </member> - <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity"> - The constant angular velocity for the body. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. + <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3( 0, 0, 0 )"> + The body's constant angular velocity. This does not rotate the body, but affects other bodies that touch it, as if it was in a state of rotation. </member> - <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity"> - The constant linear velocity for the body. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. + <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3( 0, 0, 0 )"> + The body's constant linear velocity. This does not move the body, but affects other bodies that touch it, as if it was in a state of movement. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> - The body friction, from 0 (frictionless) to 1 (full friction). + The body's friction, from 0 (frictionless) to 1 (full friction). + Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. </member> - <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override" default="null"> </member> </members> <constants> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 98b38e9e26..4522a50557 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StaticBody2D" inherits="PhysicsBody2D" category="Core" version="3.2"> <brief_description> - Static body for 2D Physics. + Static body for 2D physics. </brief_description> <description> - Static body for 2D Physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. + Static body for 2D physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms. Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt). </description> <tutorials> @@ -14,17 +14,19 @@ <members> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). + Deprecated, use [member PhysicsMaterial.bounce] instead via [member physics_material_override]. </member> - <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity"> - Constant angular velocity for the body. This does not rotate the body, but affects colliding bodies, as if it were rotating. + <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0"> + The body's constant angular velocity. This does not rotate the body, but affects colliding bodies, as if it were rotating. </member> - <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity"> - Constant linear velocity for the body. This does not move the body, but affects colliding bodies, as if it were moving. + <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2( 0, 0 )"> + The body's constant linear velocity. This does not move the body, but affects colliding bodies, as if it were moving. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction"> The body's friction. Values range from [code]0[/code] (no friction) to [code]1[/code] (full friction). + Deprecated, use [member PhysicsMaterial.friction] instead via [member physics_material_override]. </member> - <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> + <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override" default="null"> </member> </members> <constants> diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index d278312fc3..678c587f8d 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -4,7 +4,7 @@ Abstraction and base class for stream-based protocols. </brief_description> <description> - StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or Unix Sockets). It provides an API for sending and receiving data through streams as raw data or strings. + StreamPeer is an abstraction and base class for stream-based protocols (such as TCP or UNIX sockets). It provides an API for sending and receiving data through streams as raw data or strings. </description> <tutorials> </tutorials> @@ -13,28 +13,28 @@ <return type="int"> </return> <description> - Get a signed 16 bit value from the stream. + Gets a signed 16-bit value from the stream. </description> </method> <method name="get_32"> <return type="int"> </return> <description> - Get a signed 32 bit value from the stream. + Gets a signed 32-bit value from the stream. </description> </method> <method name="get_64"> <return type="int"> </return> <description> - Get a signed 64 bit value from the stream. + Gets a signed 64-bit value from the stream. </description> </method> <method name="get_8"> <return type="int"> </return> <description> - Get a signed byte from the stream. + Gets a signed byte from the stream. </description> </method> <method name="get_available_bytes" qualifiers="const"> @@ -50,21 +50,21 @@ <argument index="0" name="bytes" type="int"> </argument> <description> - Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array. + Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the [code]bytes[/code] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array. </description> </method> <method name="get_double"> <return type="float"> </return> <description> - Get a double-precision float from the stream. + Gets a double-precision float from the stream. </description> </method> <method name="get_float"> <return type="float"> </return> <description> - Get a single-precision float from the stream. + Gets a single-precision float from the stream. </description> </method> <method name="get_partial_data"> @@ -73,7 +73,7 @@ <argument index="0" name="bytes" type="int"> </argument> <description> - Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array. + Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array. </description> </method> <method name="get_string"> @@ -82,35 +82,35 @@ <argument index="0" name="bytes" type="int" default="-1"> </argument> <description> - Get a string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. + Gets a string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. </description> </method> <method name="get_u16"> <return type="int"> </return> <description> - Get an unsigned 16 bit value from the stream. + Gets an unsigned 16-bit value from the stream. </description> </method> <method name="get_u32"> <return type="int"> </return> <description> - Get an unsigned 32 bit value from the stream. + Gets an unsigned 32-bit value from the stream. </description> </method> <method name="get_u64"> <return type="int"> </return> <description> - Get an unsigned 64 bit value from the stream. + Gets an unsigned 64-bit value from the stream. </description> </method> <method name="get_u8"> <return type="int"> </return> <description> - Get an unsigned byte from the stream. + Gets an unsigned byte from the stream. </description> </method> <method name="get_utf8_string"> @@ -119,7 +119,7 @@ <argument index="0" name="bytes" type="int" default="-1"> </argument> <description> - Get a utf8 string with byte-length [code]bytes[/code] from the stream (this decodes the string sent as utf8). If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string]. + Gets an UTF-8 string with byte-length [code]bytes[/code] from the stream (this decodes the string sent as UTF-8). If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string]. </description> </method> <method name="get_var"> @@ -128,8 +128,8 @@ <argument index="0" name="allow_objects" type="bool" default="false"> </argument> <description> - Get a Variant from the stream. When [code]allow_objects[/code] is [code]true[/code] decoding objects is allowed. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). + Gets a Variant from the stream. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. + [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="put_16"> @@ -138,7 +138,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put a signed 16 bit value into the stream. + Puts a signed 16-bit value into the stream. </description> </method> <method name="put_32"> @@ -147,7 +147,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put a signed 32 bit value into the stream. + Puts a signed 32-bit value into the stream. </description> </method> <method name="put_64"> @@ -156,7 +156,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put a signed 64 bit value into the stream. + Puts a signed 64-bit value into the stream. </description> </method> <method name="put_8"> @@ -165,7 +165,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put a signed byte into the stream. + Puts a signed byte into the stream. </description> </method> <method name="put_data"> @@ -174,7 +174,7 @@ <argument index="0" name="data" type="PoolByteArray"> </argument> <description> - Send a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an Error code. + Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code. </description> </method> <method name="put_double"> @@ -183,7 +183,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Put a double-precision float into the stream. + Puts a double-precision float into the stream. </description> </method> <method name="put_float"> @@ -192,7 +192,7 @@ <argument index="0" name="value" type="float"> </argument> <description> - Put a single-precision float into the stream. + Puts a single-precision float into the stream. </description> </method> <method name="put_partial_data"> @@ -201,7 +201,7 @@ <argument index="0" name="data" type="PoolByteArray"> </argument> <description> - Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent. + Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent. </description> </method> <method name="put_string"> @@ -210,7 +210,7 @@ <argument index="0" name="value" type="String"> </argument> <description> - Put a zero-terminated ascii string into the stream prepended by a 32 bits unsigned integer representing its size. + Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. </description> </method> <method name="put_u16"> @@ -219,7 +219,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put an unsigned 16 bit value into the stream. + Puts an unsigned 16-bit value into the stream. </description> </method> <method name="put_u32"> @@ -228,7 +228,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put an unsigned 32 bit value into the stream. + Puts an unsigned 32-bit value into the stream. </description> </method> <method name="put_u64"> @@ -237,7 +237,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put an unsigned 64 bit value into the stream. + Puts an unsigned 64-bit value into the stream. </description> </method> <method name="put_u8"> @@ -246,7 +246,7 @@ <argument index="0" name="value" type="int"> </argument> <description> - Put an unsigned byte into the stream. + Puts an unsigned byte into the stream. </description> </method> <method name="put_utf8_string"> @@ -255,7 +255,7 @@ <argument index="0" name="value" type="String"> </argument> <description> - Put a zero-terminated utf8 string into the stream prepended by a 32 bits unsigned integer representing its size. + Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. </description> </method> <method name="put_var"> @@ -266,12 +266,12 @@ <argument index="1" name="full_objects" type="bool" default="false"> </argument> <description> - Put a Variant into the stream. When [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code). + Puts a Variant into the stream. If [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code). </description> </method> </methods> <members> - <member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian_enabled"> + <member name="big_endian" type="bool" setter="set_big_endian" getter="is_big_endian_enabled" default="false"> If [code]true[/code], this [StreamPeer] will using big-endian format for encoding and decoding. </member> </members> diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index de4603b7c0..30a220863d 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -49,7 +49,7 @@ </method> </methods> <members> - <member name="data_array" type="PoolByteArray" setter="set_data_array" getter="get_data_array"> + <member name="data_array" type="PoolByteArray" setter="set_data_array" getter="get_data_array" default="PoolByteArray( )"> </member> </members> <constants> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index f28e6e5544..9b5f4e7580 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StreamPeerSSL" inherits="StreamPeer" category="Core" version="3.2"> <brief_description> - SSL Stream peer. + SSL stream peer. </brief_description> <description> - SSL Stream peer. This object can be used to connect to SSL servers. + SSL stream peer. This object can be used to connect to SSL servers. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/networking/ssl_certificates.html</link> @@ -28,33 +28,33 @@ <argument index="2" name="for_hostname" type="String" default=""""> </argument> <description> - Connect to a peer using an underlying [StreamPeer] "stream", when "validate_certs" is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the "for_hostname". + Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code]. </description> </method> <method name="disconnect_from_stream"> <return type="void"> </return> <description> - Disconnect from host. + Disconnects from host. </description> </method> <method name="get_status" qualifiers="const"> <return type="int" enum="StreamPeerSSL.Status"> </return> <description> - Returns the status of the connection, one of STATUS_* enum. + Returns the status of the connection. See [enum Status] for values. </description> </method> <method name="poll"> <return type="void"> </return> <description> - Poll the connection to check for incoming bytes. Call this right before "get_available_bytes()" for it to work properly. + Poll the connection to check for incoming bytes. Call this right before [method StreamPeer.get_available_bytes] for it to work properly. </description> </method> </methods> <members> - <member name="blocking_handshake" type="bool" setter="set_blocking_handshake_enabled" getter="is_blocking_handshake_enabled"> + <member name="blocking_handshake" type="bool" setter="set_blocking_handshake_enabled" getter="is_blocking_handshake_enabled" default="true"> </member> </members> <constants> diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml index 49c6272606..bee026c851 100644 --- a/doc/classes/StreamPeerTCP.xml +++ b/doc/classes/StreamPeerTCP.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StreamPeerTCP" inherits="StreamPeer" category="Core" version="3.2"> <brief_description> - TCP Stream peer. + TCP stream peer. </brief_description> <description> - TCP Stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. + TCP stream peer. This object can be used to connect to TCP servers, or also is returned by a TCP server. </description> <tutorials> </tutorials> @@ -17,14 +17,14 @@ <argument index="1" name="port" type="int"> </argument> <description> - Connect to the specified host:port pair. A hostname will be resolved if valid. Returns [constant OK] on success or [constant FAILED] on failure. + Connects to the specified [code]host:port[/code] pair. A hostname will be resolved if valid. Returns [constant OK] on success or [constant FAILED] on failure. </description> </method> <method name="disconnect_from_host"> <return type="void"> </return> <description> - Disconnect from host. + Disconnects from host. </description> </method> <method name="get_connected_host" qualifiers="const"> @@ -61,14 +61,14 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - Disable Nagle algorithm to improve latency for small packets. - Note that for applications that send large packets, or need to transfer a lot of data, this can reduce total bandwidth. + Disables Nagle's algorithm to improve latency for small packets. + [b]Note:[/b] For applications that send large packets or need to transfer a lot of data, this can decrease the total available bandwidth. </description> </method> </methods> <constants> <constant name="STATUS_NONE" value="0" enum="Status"> - The initial status of the [StreamPeerTCP], also the status after a disconnect. + The initial status of the [StreamPeerTCP]. This is also the status after disconnecting. </constant> <constant name="STATUS_CONNECTING" value="1" enum="Status"> A status representing a [StreamPeerTCP] that is connecting to a host. diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture.xml index 1ff2500d1a..20cbadb5f0 100644 --- a/doc/classes/StreamTexture.xml +++ b/doc/classes/StreamTexture.xml @@ -1,18 +1,18 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StreamTexture" inherits="Texture" category="Core" version="3.2"> <brief_description> - A .stex texture. + A [code].stex[/code] texture. </brief_description> <description> - A texture that is loaded from a .stex file. + A texture that is loaded from a [code].stex[/code] file. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="load_path" type="String" setter="load" getter="get_load_path"> - The StreamTexture's filepath to a .stex file. + <member name="load_path" type="String" setter="load" getter="get_load_path" default=""""> + The StreamTexture's file path to a [code].stex[/code] file. </member> </members> <constants> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 6395fe2ce8..2b16bd2b33 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -260,7 +260,7 @@ <return type="String"> </return> <description> - Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code]. + Changes the case of some letters. Replaces underscores with spaces, converts all letters to lowercase, then capitalizes first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camelcase Mixed With Underscores[/code]. </description> </method> <method name="casecmp_to"> @@ -276,7 +276,7 @@ <return type="String"> </return> <description> - Removes indentation from string. + Returns a copy of the string with indentation (leading tabs and spaces) removed. </description> </method> <method name="empty"> @@ -471,7 +471,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if this string contains a valid color in HTML notation. + Returns [code]true[/code] if this string contains a valid color in hexadecimal HTML notation. Other HTML notations such as named colors or [code]hsl()[/code] colors aren't considered valid by this method and will return [code]false[/code]. </description> </method> <method name="is_valid_identifier"> @@ -533,7 +533,7 @@ <argument index="0" name="expr" type="String"> </argument> <description> - Does a simple expression match, where [code]*[/code] matches zero or more arbitrary characters and [code]?[/code] matches any single character except '.'. + Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). </description> </method> <method name="matchn"> @@ -542,7 +542,7 @@ <argument index="0" name="expr" type="String"> </argument> <description> - Does a simple case insensitive expression match, using [code]?[/code] and [code]*[/code] wildcards (see [method match]). + Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). </description> </method> <method name="md5_buffer"> @@ -626,7 +626,7 @@ <argument index="1" name="forwhat" type="String"> </argument> <description> - Replaces occurrences of a substring with the given one inside the string. + Replaces occurrences of a case-sensitive substring with the given one inside the string. </description> </method> <method name="replacen"> @@ -637,7 +637,7 @@ <argument index="1" name="forwhat" type="String"> </argument> <description> - Replaces occurrences of a substring with the given one inside the string. Ignores case. + Replaces occurrences of a case-insensitive substring with the given one inside the string. </description> </method> <method name="rfind"> @@ -648,7 +648,7 @@ <argument index="1" name="from" type="int" default="-1"> </argument> <description> - Performs a search for a substring, but starts from the end of the string instead of the beginning. + Performs a case-sensitive search for a substring, but starts from the end of the string instead of the beginning. </description> </method> <method name="rfindn"> @@ -659,7 +659,7 @@ <argument index="1" name="from" type="int" default="-1"> </argument> <description> - Performs a search for a substring, but starts from the end of the string instead of the beginning. Ignores case. + Performs a case-insensitive search for a substring, but starts from the end of the string instead of the beginning. </description> </method> <method name="right"> @@ -684,7 +684,7 @@ Splits the string by a [code]delimiter[/code] string and returns an array of the substrings, starting from right. The splits in the returned array are sorted in the same order as the original string, from left to right. If [code]maxsplit[/code] is specified, it defines the number of splits to do from the right up to [code]maxsplit[/code]. The default value of 0 means that all items are split, thus giving the same result as [method split]. - [b]Example:[/b] [code]"One,Two,Three,Four"[/code] will return [code]["Three","Four"][/code] if split by [code]","[/code] with [code]maxsplit[/code] of 2. + For example, [code]"One,Two,Three,Four"[/code] will return [code]["Three","Four"][/code] if split by [code]","[/code] with a [code]maxsplit[/code] value of 2. </description> </method> <method name="rstrip"> @@ -731,7 +731,7 @@ <description> Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of 0 means that all items are split. - [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two"][/code] if split by [code]","[/code] with [code]maxsplit[/code] of 2. + For example, [code]"One,Two,Three"[/code] will return [code]["One","Two"][/code] if split by [code]","[/code] with a [code]maxsplit[/code] value of 2. </description> </method> <method name="split_floats"> @@ -743,7 +743,7 @@ </argument> <description> Splits the string in floats by using a delimiter string and returns an array of the substrings. - [b]Example:[/b] [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. + For example, [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. </description> </method> <method name="strip_edges"> @@ -779,7 +779,7 @@ <return type="PoolByteArray"> </return> <description> - Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is sped up in comparison to [method to_utf8] with the assumption that all the characters the String contains are only ASCII characters. + Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters. </description> </method> <method name="to_float"> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index a156f134e7..6b8f076211 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -37,7 +37,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> - Returns the content margin offset for the specified margin + Returns the content margin offset for the specified margin. Positive values reduce size inwards, unlike [Control]'s margin values. </description> </method> @@ -52,7 +52,7 @@ <return type="Vector2"> </return> <description> - Returns the "offset" of a stylebox, this is a helper function, like writing [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code]. + Returns the "offset" of a stylebox. This helper function returns a value equivalent to [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code]. </description> </method> <method name="test_mask" qualifiers="const"> @@ -68,21 +68,21 @@ </method> </methods> <members> - <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin"> + <member name="content_margin_bottom" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> The bottom margin for the contents of this style box. Increasing this value reduces the space available to the contents from the bottom. If this value is negative, it is ignored and a child-specific margin is used instead. For example for [StyleBoxFlat] the border thickness (if any) is used instead. It is up to the code using this style box to decide what these contents are: for example, a [Button] respects this content margin for the textual contents of the button. [method get_margin] should be used to fetch this value as consumer instead of reading these properties directly. This is because it correctly respects negative values and the fallback mentioned above. </member> - <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin"> + <member name="content_margin_left" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> The left margin for the contents of this style box. Increasing this value reduces the space available to the contents from the left. Refer to [member content_margin_bottom] for extra considerations. </member> - <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin"> + <member name="content_margin_right" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> The right margin for the contents of this style box. Increasing this value reduces the space available to the contents from the right. Refer to [member content_margin_bottom] for extra considerations. </member> - <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin"> + <member name="content_margin_top" type="float" setter="set_default_margin" getter="get_default_margin" default="-1.0"> The top margin for the contents of this style box. Increasing this value reduces the space available to the contents from the top. Refer to [member content_margin_bottom] for extra considerations. </member> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index ffee7366a3..28f49f831c 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -9,7 +9,7 @@ - Border width (individual width for each border) - Rounded corners (individual radius for each corner) - Shadow - Setting corner radius to high values is allowed. As soon as corners would overlap the stylebox will switch to a relative system. Example: + Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: [codeblock] height = 30 corner_radius_top_left = 50 @@ -84,72 +84,71 @@ </method> </methods> <members> - <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased"> - Anti Aliasing draws a small ring around edges. This ring fades to transparent. As a result edges look much smoother. This is only noticeable when using rounded corners. + <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" default="true"> + 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. </member> - <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size"> + <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" default="1"> This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. </member> - <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color"> + <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0.6, 0.6, 0.6, 1 )"> The background color of the stylebox. </member> - <member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend"> - When set to [code]true[/code], the border will fade into the background color. + <member name="border_blend" type="bool" setter="set_border_blend" getter="get_border_blend" default="false"> + If [code]true[/code], the border will fade into the background color. </member> - <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color"> + <member name="border_color" type="Color" setter="set_border_color" getter="get_border_color" default="Color( 0.8, 0.8, 0.8, 1 )"> Sets the color of the border. </member> - <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width"> + <member name="border_width_bottom" type="int" setter="set_border_width" getter="get_border_width" default="0"> Border width for the bottom border. </member> - <member name="border_width_left" type="int" setter="set_border_width" getter="get_border_width"> + <member name="border_width_left" type="int" setter="set_border_width" getter="get_border_width" default="0"> Border width for the left border. </member> - <member name="border_width_right" type="int" setter="set_border_width" getter="get_border_width"> + <member name="border_width_right" type="int" setter="set_border_width" getter="get_border_width" default="0"> Border width for the right border. </member> - <member name="border_width_top" type="int" setter="set_border_width" getter="get_border_width"> + <member name="border_width_top" type="int" setter="set_border_width" getter="get_border_width" default="0"> Border width for the top border. </member> - <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail"> - This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value you should take the corner radius ([method set_corner_radius_all]) into account. - For corner radius smaller than 10, 4-5 should be enough. - For corner radius smaller than 30, 8-12 should be enough. + <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" default="8"> + This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account. + For corner radii smaller than 10, 4-5 should be enough. For corner radii smaller than 30, 8-12 should be enough. </member> - <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius"> - The corner radius of the bottom left corner. When set to 0 the corner is not rounded. + <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0"> + The bottom-left corner's radius. If [code]0[/code], the corner is not rounded. </member> - <member name="corner_radius_bottom_right" type="int" setter="set_corner_radius" getter="get_corner_radius"> - The corner radius of the bottom right corner. When set to 0 the corner is not rounded. + <member name="corner_radius_bottom_right" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0"> + The bottom-right corner's radius. If [code]0[/code], the corner is not rounded. </member> - <member name="corner_radius_top_left" type="int" setter="set_corner_radius" getter="get_corner_radius"> - The corner radius of the top left corner. When set to 0 the corner is not rounded. + <member name="corner_radius_top_left" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0"> + The top-left corner's radius. If [code]0[/code], the corner is not rounded. </member> - <member name="corner_radius_top_right" type="int" setter="set_corner_radius" getter="get_corner_radius"> - The corner radius of the top right corner. When set to 0 the corner is not rounded. + <member name="corner_radius_top_right" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0"> + The top-right corner's radius. If [code]0[/code], the corner is not rounded. </member> - <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled"> - Toggels drawing of the inner part of the stylebox. + <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true"> + Toggles drawing of the inner part of the stylebox. </member> - <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin"> - Expands the stylebox outside of the control rect on the bottom edge. Useful in combination with border_width_bottom. To draw a border outside the control rect. + <member name="expand_margin_bottom" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> + 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. </member> - <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin"> - Expands the stylebox outside of the control rect on the left edge. Useful in combination with border_width_left. To draw a border outside the control rect. + <member name="expand_margin_left" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> + 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. </member> - <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin"> - Expands the stylebox outside of the control rect on the right edge. Useful in combination with border_width_right. To draw a border outside the control rect. + <member name="expand_margin_right" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> + 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. </member> - <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin"> - Expands the stylebox outside of the control rect on the top edge. Useful in combination with border_width_top. To draw a border outside the control rect. + <member name="expand_margin_top" type="float" setter="set_expand_margin" getter="get_expand_margin" default="0.0"> + 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. </member> - <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color"> - The color of the shadow. (This has no effect when shadow_size < 1) + <member name="shadow_color" type="Color" setter="set_shadow_color" getter="get_shadow_color" default="Color( 0, 0, 0, 0.6 )"> + The color of the shadow. This has no effect if [member shadow_size] is lower than 1. </member> - <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset"> + <member name="shadow_offset" type="Vector2" setter="set_shadow_offset" getter="get_shadow_offset" default="Vector2( 0, 0 )"> The shadow offset in pixels. Adjusts the position of the shadow relatively to the stylebox. </member> - <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size"> + <member name="shadow_size" type="int" setter="set_shadow_size" getter="get_shadow_size" default="0"> The shadow size in pixels. </member> </members> diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml index aa306291c8..c0745c5f39 100644 --- a/doc/classes/StyleBoxLine.xml +++ b/doc/classes/StyleBoxLine.xml @@ -9,15 +9,15 @@ <methods> </methods> <members> - <member name="color" type="Color" setter="set_color" getter="get_color"> + <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> </member> - <member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin"> + <member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0"> </member> - <member name="grow_end" type="float" setter="set_grow_end" getter="get_grow_end"> + <member name="grow_end" type="float" setter="set_grow_end" getter="get_grow_end" default="1.0"> </member> - <member name="thickness" type="int" setter="set_thickness" getter="get_thickness"> + <member name="thickness" type="int" setter="set_thickness" getter="get_thickness" default="1"> </member> - <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical"> + <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false"> </member> </members> <constants> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index 8e55795053..e51120f269 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StyleBoxTexture" inherits="StyleBox" category="Core" version="3.2"> <brief_description> - Texture Based 3x3 scale style. + Texture-based nine-patch [StyleBox]. </brief_description> <description> - Texture Based 3x3 scale style. This stylebox performs a 3x3 scaling of a texture, where only the center cell is fully stretched. This allows for the easy creation of bordered styles. + Texture-based nine-patch [StyleBox], in a way similar to [NinePatchRect]. This stylebox performs a 3×3 scaling of a texture, where only the center cell is fully stretched. This makes it possible to design bordered styles regardless of the stylebox's size. </description> <tutorials> </tutorials> @@ -33,55 +33,55 @@ </method> </methods> <members> - <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode"> + <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> </member> - <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode"> + <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> </member> - <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled"> + <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true"> </member> - <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> - Expands the bottom margin of this style box when drawing, causing it be drawn larger than requested. + <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> - Expands the left margin of this style box when drawing, causing it be drawn larger than requested. + <member name="expand_margin_left" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + Expands the left margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> - Expands the right margin of this style box when drawing, causing it be drawn larger than requested. + <member name="expand_margin_right" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + Expands the right margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size"> - Expands the top margin of this style box when drawing, causing it be drawn larger than requested. + <member name="expand_margin_top" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> + Expands the top margin of this style box when drawing, causing it to be drawn larger than requested. </member> - <member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size"> - Increases the bottom margin of the 3x3 texture box. - A higher value means more of the source texture is considered to be part of the bottom border of the 3x3 box. + <member name="margin_bottom" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + Increases the bottom margin of the 3×3 texture box. + A higher value means more of the source texture is considered to be part of the bottom border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_bottom] if it is negative. </member> - <member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size"> - Increases the left margin of the 3x3 texture box. - A higher value means more of the source texture is considered to be part of the left border of the 3x3 box. + <member name="margin_left" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + Increases the left margin of the 3×3 texture box. + A higher value means more of the source texture is considered to be part of the left border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_left] if it is negative. </member> - <member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size"> - Increases the right margin of the 3x3 texture box. - A higher value means more of the source texture is considered to be part of the right border of the 3x3 box. + <member name="margin_right" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + Increases the right margin of the 3×3 texture box. + A higher value means more of the source texture is considered to be part of the right border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_right] if it is negative. </member> - <member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size"> - Increases the top margin of the 3x3 texture box. - A higher value means more of the source texture is considered to be part of the top border of the 3x3 box. + <member name="margin_top" type="float" setter="set_margin_size" getter="get_margin_size" default="0.0"> + Increases the top margin of the 3×3 texture box. + A higher value means more of the source texture is considered to be part of the top border of the 3×3 box. This is also the value used as fallback for [member StyleBox.content_margin_top] if it is negative. </member> - <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate"> + <member name="modulate_color" type="Color" setter="set_modulate" getter="get_modulate" default="Color( 1, 1, 1, 1 )"> Modulates the color of the texture when this style box is drawn. </member> - <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map" default="null"> The normal map to use when drawing this style box. </member> - <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect"> + <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> Species a sub region of the texture to use. This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> The texture to use when drawing this style box. </member> </members> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index ef8db3ca77..153d88f1af 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -4,7 +4,7 @@ Helper tool to create geometry. </brief_description> <description> - The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from script. All properties except index need to be added before a call to [method add_vertex]. For example adding vertex colors and UVs looks like + The [SurfaceTool] is used to construct a [Mesh] by specifying vertex attributes individually. It can be used to construct a [Mesh] from a script. All properties except indices need to be added before calling [method add_vertex]. For example, to add vertex colors and UVs: [codeblock] var st = SurfaceTool.new() st.begin(Mesh.PRIMITIVE_TRIANGLES) @@ -12,9 +12,9 @@ st.add_uv(Vector2(0, 0)) st.add_vertex(Vector3(0, 0, 0)) [/codeblock] - The [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calls to [method add_uv] or [method add_color] then the last values would be used. - It is very important that vertex attributes are passed [b]before[/b] the call to [method add_vertex], failure to do this will result in an error when committing the vertex information to a mesh. - Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. + The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method add_uv] or [method add_color], then the last values would be used. + Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh. + Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. </description> <tutorials> </tutorials> @@ -25,7 +25,7 @@ <argument index="0" name="bones" type="PoolIntArray"> </argument> <description> - Add an array of bones for the next Vertex to use. Array must contain 4 integers. + Adds an array of bones for the next vertex to use. [code]bones[/code] must contain 4 integers. </description> </method> <method name="add_color"> @@ -34,7 +34,7 @@ <argument index="0" name="color" type="Color"> </argument> <description> - Specify a [Color] for the next Vertex to use. + Specifies a [Color] for the next vertex to use. </description> </method> <method name="add_index"> @@ -43,7 +43,7 @@ <argument index="0" name="index" type="int"> </argument> <description> - Adds an index to index array if you are using indexed Vertices. Does not need to be called before adding Vertex. + Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices. </description> </method> <method name="add_normal"> @@ -52,7 +52,7 @@ <argument index="0" name="normal" type="Vector3"> </argument> <description> - Specify a normal for the next Vertex to use. + Specifies a normal for the next vertex to use. </description> </method> <method name="add_smooth_group"> @@ -61,7 +61,7 @@ <argument index="0" name="smooth" type="bool"> </argument> <description> - Specify whether current Vertex (if using only Vertex arrays) or current index (if also using index arrays) should utilize smooth normals for normal calculation. + Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation. </description> </method> <method name="add_tangent"> @@ -70,7 +70,7 @@ <argument index="0" name="tangent" type="Plane"> </argument> <description> - Specify a Tangent for the next Vertex to use. + Specifies a tangent for the next vertex to use. </description> </method> <method name="add_triangle_fan"> @@ -89,8 +89,8 @@ <argument index="5" name="tangents" type="Array" default="[ ]"> </argument> <description> - Insert a triangle fan made of array data into [Mesh] being constructed. - Requires primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES]. + Inserts a triangle fan made of array data into [Mesh] being constructed. + Requires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> <method name="add_uv"> @@ -99,7 +99,7 @@ <argument index="0" name="uv" type="Vector2"> </argument> <description> - Specify UV Coordinate for next Vertex to use. + Specifies a set of UV coordinates to use for the next vertex. </description> </method> <method name="add_uv2"> @@ -108,7 +108,7 @@ <argument index="0" name="uv2" type="Vector2"> </argument> <description> - Specify an optional second set of UV coordinates for next Vertex to use. + Specifies an optional second set of UV coordinates to use for the next vertex. </description> </method> <method name="add_vertex"> @@ -117,7 +117,7 @@ <argument index="0" name="vertex" type="Vector3"> </argument> <description> - Specify position of current Vertex. Should be called after specifying other vertex properties (e.g. Color, UV). + Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV). </description> </method> <method name="add_weights"> @@ -126,7 +126,7 @@ <argument index="0" name="weights" type="PoolRealArray"> </argument> <description> - Specify weight values for next Vertex to use. Array must contain 4 values. + Specifies weight values for next vertex to use. [code]weights[/code] must contain 4 values. </description> </method> <method name="append_from"> @@ -148,7 +148,7 @@ <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> </argument> <description> - Called before adding any Vertices. Takes the primitive type as an argument (e.g. [constant Mesh.PRIMITIVE_TRIANGLES]). + Called before adding any vertices. Takes the primitive type as an argument (e.g. [constant Mesh.PRIMITIVE_TRIANGLES]). </description> </method> <method name="clear"> @@ -202,7 +202,7 @@ <return type="void"> </return> <description> - Removes index array by expanding Vertex array. + Removes the index array by expanding the vertex array. </description> </method> <method name="generate_normals"> @@ -211,24 +211,22 @@ <argument index="0" name="flip" type="bool" default="false"> </argument> <description> - Generates normals from Vertices so you do not have to do it manually. - Setting [code]flip[/code] to [code]true[/code] inverts the resulting normals. - Requires primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES]. + Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. + Requires the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> <method name="generate_tangents"> <return type="void"> </return> <description> - Generates a tangent vector for each vertex. - Requires that each vertex have UVs and normals set already. + Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already. </description> </method> <method name="index"> <return type="void"> </return> <description> - Shrinks Vertex array by creating an index array. Avoids reusing Vertices. + Shrinks the vertex array by creating an index array (avoids reusing vertices). </description> </method> <method name="set_material"> diff --git a/doc/classes/TCP_Server.xml b/doc/classes/TCP_Server.xml index 663d3248e8..432d83f25b 100644 --- a/doc/classes/TCP_Server.xml +++ b/doc/classes/TCP_Server.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TCP_Server" inherits="Reference" category="Core" version="3.2"> <brief_description> - TCP Server. + A TCP server. </brief_description> <description> - TCP Server class. Listens to connections on a port and returns a [StreamPeerTCP] when got a connection. + A TCP server. Listens to connections on a port and returns a [StreamPeerTCP] when it gets an incoming connection. </description> <tutorials> </tutorials> @@ -24,24 +24,24 @@ <argument index="1" name="bind_address" type="String" default=""*""> </argument> <description> - Listen on the "port" binding to "bind_address". - If "bind_address" is set as "*" (default), the server will listen on all available addresses (both IPv4 and IPv6). - If "bind_address" is set as "0.0.0.0" (for IPv4) or "::" (for IPv6), the server will listen on all available addresses matching that IP type. - If "bind_address" is set to any valid address (e.g. "192.168.1.101", "::1", etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists). + Listen on the [code]port[/code] binding to [code]bind_address[/code]. + If [code]bind_address[/code] is set as [code]"*"[/code] (default), the server will listen on all available addresses (both IPv4 and IPv6). + If [code]bind_address[/code] is set as [code]"0.0.0.0"[/code] (for IPv4) or [code]"::"[/code] (for IPv6), the server will listen on all available addresses matching that IP type. + If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the server will only listen on the interface with that addresses (or fail if no interface with the given address exists). </description> </method> <method name="stop"> <return type="void"> </return> <description> - Stop listening. + Stops listening. </description> </method> <method name="take_connection"> <return type="StreamPeerTCP"> </return> <description> - If a connection is available, return a StreamPeerTCP with the connection/ + If a connection is available, returns a StreamPeerTCP with the connection. </description> </method> </methods> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 06299d65b6..2eb8411078 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="TabContainer" inherits="Container" category="Core" version="3.2"> <brief_description> - Tabbed Container. + Tabbed container. </brief_description> <description> Sets the active tab's [code]visible[/code] property to the value [code]true[/code]. Sets all other children's to [code]false[/code]. @@ -64,7 +64,7 @@ <argument index="0" name="tab_idx" type="int"> </argument> <description> - Returns the [Texture] for the tab at index [code]tab_idx[/code] or null if the tab has no [Texture]. + Returns the [Texture] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture]. </description> </method> <method name="get_tab_title" qualifiers="const"> @@ -100,7 +100,8 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code]. Note that its title text will remain, unless also removed with [method set_tab_title]. + If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code]. + [b]Note:[/b] Its title text will remain, unless also removed with [method set_tab_title]. </description> </method> <method name="set_tab_icon"> @@ -136,17 +137,17 @@ </method> </methods> <members> - <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab"> + <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0"> The current tab index. When set, this index's [Control] node's [code]visible[/code] property is set to [code]true[/code] and all others are set to [code]false[/code]. </member> - <member name="drag_to_rearrange_enabled" type="bool" setter="set_drag_to_rearrange_enabled" getter="get_drag_to_rearrange_enabled"> + <member name="drag_to_rearrange_enabled" type="bool" setter="set_drag_to_rearrange_enabled" getter="get_drag_to_rearrange_enabled" default="false"> If [code]true[/code], tabs can be rearranged with mouse drag. </member> - <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign"> + <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign" default="1"> The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details. </member> - <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible"> - If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. Default value: [code]true[/code]. + <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true"> + If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. </member> </members> <signals> @@ -188,21 +189,21 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color_bg" type="Color"> + <theme_item name="font_color_bg" type="Color" default="Color( 0.690196, 0.690196, 0.690196, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_fg" type="Color"> + <theme_item name="font_color_fg" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> </theme_item> <theme_item name="increment" type="Texture"> </theme_item> <theme_item name="increment_highlight" type="Texture"> </theme_item> - <theme_item name="label_valign_bg" type="int"> + <theme_item name="label_valign_bg" type="int" default="2"> </theme_item> - <theme_item name="label_valign_fg" type="int"> + <theme_item name="label_valign_fg" type="int" default="0"> </theme_item> <theme_item name="menu" type="Texture"> </theme_item> @@ -210,7 +211,7 @@ </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> - <theme_item name="side_margin" type="int"> + <theme_item name="side_margin" type="int" default="8"> </theme_item> <theme_item name="tab_bg" type="StyleBox"> </theme_item> @@ -218,7 +219,7 @@ </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> - <theme_item name="top_margin" type="int"> + <theme_item name="top_margin" type="int" default="24"> </theme_item> </theme_items> </class> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index b1105f231d..b6d702ba45 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Tabs" inherits="Control" category="Core" version="3.2"> <brief_description> - Tabs Control. + Tabs control. </brief_description> <description> Simple tabs control, similar to [TabContainer] but is only in charge of drawing tabs, not interact with children. @@ -26,7 +26,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Moves the Scroll view to make the tab visible. + Moves the scroll view to make the tab visible. </description> </method> <method name="get_offset_buttons_visible" qualifiers="const"> @@ -64,7 +64,7 @@ <argument index="0" name="tab_idx" type="int"> </argument> <description> - Returns the [Texture] for the tab at index [code]tab_idx[/code] or null if the tab has no [Texture]. + Returns the [Texture] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture]. </description> </method> <method name="get_tab_offset" qualifiers="const"> @@ -95,7 +95,7 @@ <return type="int"> </return> <description> - Returns the [Tabs] rearrange group id. + Returns the [Tabs]' rearrange group ID. </description> </method> <method name="move_tab"> @@ -106,7 +106,7 @@ <argument index="1" name="to" type="int"> </argument> <description> - Rearrange tab. + Moves a tab from [code]from[/code] to [code]to[/code]. </description> </method> <method name="remove_tab"> @@ -115,7 +115,7 @@ <argument index="0" name="tab_idx" type="int"> </argument> <description> - Removes tab at index [code]tab_idx[/code] + Removes the tab at index [code]tab_idx[/code]. </description> </method> <method name="set_select_with_rmb"> @@ -124,7 +124,7 @@ <argument index="0" name="enabled" type="bool"> </argument> <description> - If [code]true[/code], enables selecting a tab with right mouse button. + If [code]true[/code], enables selecting a tab with the right mouse button. </description> </method> <method name="set_tab_disabled"> @@ -135,7 +135,8 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code]. Note that its title text will remain, unless also removed with [method set_tab_title]. + If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code]. + [b]Note:[/b] Its title text will remain unless it is also removed with [method set_tab_title]. </description> </method> <method name="set_tab_icon"> @@ -146,7 +147,7 @@ <argument index="1" name="icon" type="Texture"> </argument> <description> - Sets an icon for the tab at index [code]tab_idx[/code]. + Sets an [code]icon[/code] for the tab at index [code]tab_idx[/code]. </description> </method> <method name="set_tab_title"> @@ -157,7 +158,7 @@ <argument index="1" name="title" type="String"> </argument> <description> - Sets a title for the tab at index [code]tab_idx[/code]. + Sets a [code]title[/code] for the tab at index [code]tab_idx[/code]. </description> </method> <method name="set_tabs_rearrange_group"> @@ -166,23 +167,23 @@ <argument index="0" name="group_id" type="int"> </argument> <description> - Defines rearrange group id, choose for each [Tabs] the same value to enable tab drag between [Tabs]. Enable drag with [code]set_drag_to_rearrange_enabled(true)[/code]. + Defines the rearrange group ID. Choose for each [Tabs] the same value to dragging tabs between [Tabs]. Enable drag with [code]set_drag_to_rearrange_enabled(true)[/code]. </description> </method> </methods> <members> - <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab"> + <member name="current_tab" type="int" setter="set_current_tab" getter="get_current_tab" default="0"> Select tab at index [code]tab_idx[/code]. </member> - <member name="drag_to_rearrange_enabled" type="bool" setter="set_drag_to_rearrange_enabled" getter="get_drag_to_rearrange_enabled"> + <member name="drag_to_rearrange_enabled" type="bool" setter="set_drag_to_rearrange_enabled" getter="get_drag_to_rearrange_enabled" default="false"> If [code]true[/code], tabs can be rearranged with mouse drag. </member> - <member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled"> + <member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true"> </member> - <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign"> + <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign" default="1"> The alignment of all tabs. See enum [code]TabAlign[/code] constants for details. </member> - <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy"> + <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy" default="0"> </member> </members> <signals> @@ -259,21 +260,21 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color_bg" type="Color"> + <theme_item name="font_color_bg" type="Color" default="Color( 0.690196, 0.690196, 0.690196, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> </theme_item> - <theme_item name="font_color_fg" type="Color"> + <theme_item name="font_color_fg" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> </theme_item> <theme_item name="increment" type="Texture"> </theme_item> <theme_item name="increment_highlight" type="Texture"> </theme_item> - <theme_item name="label_valign_bg" type="int"> + <theme_item name="label_valign_bg" type="int" default="2"> </theme_item> - <theme_item name="label_valign_fg" type="int"> + <theme_item name="label_valign_fg" type="int" default="0"> </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> @@ -283,7 +284,7 @@ </theme_item> <theme_item name="tab_fg" type="StyleBox"> </theme_item> - <theme_item name="top_margin" type="int"> + <theme_item name="top_margin" type="int" default="24"> </theme_item> </theme_items> </class> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 00db5ef2b9..e665178809 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -21,7 +21,7 @@ <argument index="3" name="line_only" type="bool" default="false"> </argument> <description> - Add color region (given the delimiters) and its colors. + Adds color region (given the delimiters) and its colors. </description> </method> <method name="add_keyword_color"> @@ -32,7 +32,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Add a [code]keyword[/code] and its [Color]. + Adds a [code]keyword[/code] and its [Color]. </description> </method> <method name="can_fold" qualifiers="const"> @@ -94,7 +94,7 @@ </argument> <description> Moves the cursor at the specified [code]column[/code] index. - If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. Default value is [code]true[/code]. + If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. </description> </method> <method name="cursor_set_line"> @@ -110,8 +110,8 @@ </argument> <description> Moves the cursor at the specified [code]line[/code] index. - If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. Default value is [code]true[/code]. - If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [method set_line_as_hidden]. Default value is [code]true[/code]. + If [code]adjust_viewport[/code] is set to true, the viewport will center at the cursor position after the move occurs. + If [code]can_be_hidden[/code] is set to true, the specified [code]line[/code] can be hidden using [method set_line_as_hidden]. </description> </method> <method name="cut"> @@ -274,7 +274,7 @@ <argument index="0" name="option" type="int"> </argument> <description> - Triggers a right click menu action by the specified index. See [enum MenuItems] for a list of available indexes. + Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes. </description> </method> <method name="paste"> @@ -295,7 +295,7 @@ <return type="void"> </return> <description> - Removes all the breakpoints (without firing "breakpoint_toggled" signal). + Removes all the breakpoints. This will not fire the [signal breakpoint_toggled] signal. </description> </method> <method name="search" qualifiers="const"> @@ -310,7 +310,7 @@ <argument index="3" name="from_column" type="int"> </argument> <description> - Perform a search inside the text. Search flags can be specified in the SEARCH_* enum. + Perform a search inside the text. Search flags can be specified in the[code]SEARCH_*[/code] enum. </description> </method> <method name="select"> @@ -380,65 +380,65 @@ </method> </methods> <members> - <member name="breakpoint_gutter" type="bool" setter="set_breakpoint_gutter_enabled" getter="is_breakpoint_gutter_enabled"> + <member name="breakpoint_gutter" type="bool" setter="set_breakpoint_gutter_enabled" getter="is_breakpoint_gutter_enabled" default="false"> If [code]true[/code], the breakpoint gutter is visible. </member> - <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled"> + <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> If [code]true[/code], the caret (visual cursor) blinks. </member> - <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed"> + <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> Duration (in seconds) of a caret's blinking cycle. </member> - <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode"> + <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode" default="false"> If [code]true[/code], the caret displays as a rectangle. If [code]false[/code], the caret displays as a bar. </member> - <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret"> - If [code]true[/code], a right click moves the cursor at the mouse position before displaying the context menu. + <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret" default="true"> + If [code]true[/code], a right-click moves the cursor at the mouse position before displaying the context menu. If [code]false[/code], the context menu disregards mouse location. </member> - <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled"> - If [code]true[/code], a right click displays the context menu. + <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true"> + If [code]true[/code], a right-click displays the context menu. </member> - <member name="draw_spaces" type="bool" setter="set_draw_spaces" getter="is_drawing_spaces"> + <member name="draw_spaces" type="bool" setter="set_draw_spaces" getter="is_drawing_spaces" default="false"> If [code]true[/code], the "space" character will have a visible representation. </member> - <member name="draw_tabs" type="bool" setter="set_draw_tabs" getter="is_drawing_tabs"> + <member name="draw_tabs" type="bool" setter="set_draw_tabs" getter="is_drawing_tabs" default="false"> If [code]true[/code], the "tab" character will have a visible representation. </member> - <member name="fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter"> + <member name="fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter" default="false"> If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines. </member> - <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled"> + <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled" default="false"> If [code]true[/code], all lines that have been set to hidden by [method set_line_as_hidden], will not be visible. </member> - <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled"> + <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false"> If [code]true[/code], all occurrences of the selected text will be highlighted. </member> - <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled"> + <member name="highlight_current_line" type="bool" setter="set_highlight_current_line" getter="is_highlight_current_line_enabled" default="false"> If [code]true[/code], the line containing the cursor is highlighted. </member> - <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color"> + <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> </member> - <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly"> + <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false"> If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. </member> - <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled"> + <member name="show_line_numbers" type="bool" setter="set_show_line_numbers" getter="is_show_line_numbers_enabled" default="false"> If [code]true[/code], line numbers are displayed to the left of the text. </member> - <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled"> + <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false"> If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling. </member> - <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled"> + <member name="syntax_highlighting" type="bool" setter="set_syntax_coloring" getter="is_syntax_coloring_enabled" default="false"> If [code]true[/code], any custom color properties that have been set for this [TextEdit] will be visible. </member> - <member name="text" type="String" setter="set_text" getter="get_text"> + <member name="text" type="String" setter="set_text" getter="get_text" default=""""> String value of the [TextEdit]. </member> - <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed"> + <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0"> Vertical scroll sensitivity. </member> - <member name="wrap_enabled" type="bool" setter="set_wrap_enabled" getter="is_wrap_enabled"> + <member name="wrap_enabled" type="bool" setter="set_wrap_enabled" getter="is_wrap_enabled" default="false"> If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible. </member> </members> @@ -520,45 +520,45 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color"> + <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled. </theme_item> - <theme_item name="bookmark_color" type="Color"> + <theme_item name="bookmark_color" type="Color" default="Color( 0.08, 0.49, 0.98, 1 )"> Sets the [Color] of the bookmark marker. [member syntax_highlighting] has to be enabled. </theme_item> - <theme_item name="brace_mismatch_color" type="Color"> + <theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )"> </theme_item> - <theme_item name="breakpoint_color" type="Color"> + <theme_item name="breakpoint_color" type="Color" default="Color( 0.8, 0.8, 0.4, 0.2 )"> Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. </theme_item> - <theme_item name="caret_background_color" type="Color"> + <theme_item name="caret_background_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="caret_color" type="Color"> + <theme_item name="caret_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="code_folding_color" type="Color"> + <theme_item name="code_folding_color" type="Color" default="Color( 0.8, 0.8, 0.8, 0.8 )"> </theme_item> <theme_item name="completion" type="StyleBox"> </theme_item> - <theme_item name="completion_background_color" type="Color"> + <theme_item name="completion_background_color" type="Color" default="Color( 0.172549, 0.164706, 0.196078, 1 )"> </theme_item> - <theme_item name="completion_existing_color" type="Color"> + <theme_item name="completion_existing_color" type="Color" default="Color( 0.87451, 0.87451, 0.87451, 0.129412 )"> </theme_item> - <theme_item name="completion_font_color" type="Color"> + <theme_item name="completion_font_color" type="Color" default="Color( 0.666667, 0.666667, 0.666667, 1 )"> </theme_item> - <theme_item name="completion_lines" type="int"> + <theme_item name="completion_lines" type="int" default="7"> </theme_item> - <theme_item name="completion_max_width" type="int"> + <theme_item name="completion_max_width" type="int" default="50"> </theme_item> - <theme_item name="completion_scroll_color" type="Color"> + <theme_item name="completion_scroll_color" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="completion_scroll_width" type="int"> + <theme_item name="completion_scroll_width" type="int" default="3"> </theme_item> - <theme_item name="completion_selected_color" type="Color"> + <theme_item name="completion_selected_color" type="Color" default="Color( 0.262745, 0.258824, 0.266667, 1 )"> </theme_item> - <theme_item name="current_line_color" type="Color"> + <theme_item name="current_line_color" type="Color" default="Color( 0.25, 0.25, 0.26, 0.8 )"> Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. </theme_item> - <theme_item name="executing_line_color" type="Color"> + <theme_item name="executing_line_color" type="Color" default="Color( 0.2, 0.8, 0.2, 0.4 )"> </theme_item> <theme_item name="focus" type="StyleBox"> </theme_item> @@ -569,47 +569,47 @@ <theme_item name="font" type="Font"> Sets the default [Font]. </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> Sets the font [Color]. </theme_item> - <theme_item name="font_color_readonly" type="Color"> + <theme_item name="font_color_readonly" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 0.5 )"> </theme_item> - <theme_item name="font_color_selected" type="Color"> + <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> - <theme_item name="function_color" type="Color"> + <theme_item name="function_color" type="Color" default="Color( 0.4, 0.635294, 0.807843, 1 )"> </theme_item> - <theme_item name="line_number_color" type="Color"> + <theme_item name="line_number_color" type="Color" default="Color( 0.666667, 0.666667, 0.666667, 0.4 )"> Sets the [Color] of the line numbers. [member show_line_numbers] has to be enabled. </theme_item> - <theme_item name="line_spacing" type="int"> + <theme_item name="line_spacing" type="int" default="4"> Sets the spacing between the lines. </theme_item> - <theme_item name="mark_color" type="Color"> + <theme_item name="mark_color" type="Color" default="Color( 1, 0.4, 0.4, 0.4 )"> Sets the [Color] of marked text. </theme_item> - <theme_item name="member_variable_color" type="Color"> + <theme_item name="member_variable_color" type="Color" default="Color( 0.901961, 0.305882, 0.34902, 1 )"> </theme_item> <theme_item name="normal" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> - <theme_item name="number_color" type="Color"> + <theme_item name="number_color" type="Color" default="Color( 0.921569, 0.584314, 0.196078, 1 )"> </theme_item> <theme_item name="read_only" type="StyleBox"> Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. </theme_item> - <theme_item name="safe_line_number_color" type="Color"> + <theme_item name="safe_line_number_color" type="Color" default="Color( 0.666667, 0.784314, 0.666667, 0.6 )"> </theme_item> - <theme_item name="selection_color" type="Color"> + <theme_item name="selection_color" type="Color" default="Color( 0.490196, 0.490196, 0.490196, 1 )"> Sets the highlight [Color] of text selections. </theme_item> <theme_item name="space" type="Texture"> </theme_item> - <theme_item name="symbol_color" type="Color"> + <theme_item name="symbol_color" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> <theme_item name="tab" type="Texture"> Sets a custom [Texture] for tab text characters. </theme_item> - <theme_item name="word_highlighted_color" type="Color"> + <theme_item name="word_highlighted_color" type="Color" default="Color( 0.8, 0.9, 0.9, 0.15 )"> Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. </theme_item> </theme_items> diff --git a/doc/classes/Texture.xml b/doc/classes/Texture.xml index 4418a6ce8f..238d6929ba 100644 --- a/doc/classes/Texture.xml +++ b/doc/classes/Texture.xml @@ -99,32 +99,32 @@ </method> </methods> <members> - <member name="flags" type="int" setter="set_flags" getter="get_flags"> + <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4"> The texture's flags. </member> </members> <constants> <constant name="FLAGS_DEFAULT" value="7" enum="Flags"> - Default flags. Generate mipmaps, repeat, and filter are enabled. + Default flags. [constant FLAG_MIPMAPS], [constant FLAG_REPEAT] and [constant FLAG_FILTER] are enabled. </constant> <constant name="FLAG_MIPMAPS" value="1" enum="Flags"> - Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. + Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. </constant> <constant name="FLAG_REPEAT" value="2" enum="Flags"> - Repeats texture (instead of clamp to edge). + Repeats the texture (instead of clamp to edge). </constant> <constant name="FLAG_FILTER" value="4" enum="Flags"> - Magnifying filter, to enable smooth zooming in of the texture. + Uses a magnifying filter, to enable smooth zooming in of the texture. </constant> <constant name="FLAG_ANISOTROPIC_FILTER" value="8" enum="Flags"> - Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. - More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. + Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. + This results in better-looking textures when viewed from oblique angles. </constant> <constant name="FLAG_CONVERT_TO_LINEAR" value="16" enum="Flags"> - Converts texture to SRGB color space. + Converts the texture to the sRGB color space. </constant> <constant name="FLAG_MIRRORED_REPEAT" value="32" enum="Flags"> - Repeats texture with alternate sections mirrored. + Repeats the texture with alternate sections mirrored. </constant> <constant name="FLAG_VIDEO_SURFACE" value="2048" enum="Flags"> Texture is a video surface. diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 7b436fcf2b..e3396a10c2 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -4,37 +4,37 @@ Texture-based button. Supports Pressed, Hover, Disabled and Focused states. </brief_description> <description> - [TextureButton] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex Controls. - The Normal state's texture is required. Others are optional. + [TextureButton] has the same functionality as [Button], except it uses sprites instead of Godot's [Theme] resource. It is faster to create, but it doesn't support localization like more complex [Control]s. + The "normal" state must contain a texture ([member texture_normal]); other textures are optional. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="expand" type="bool" setter="set_expand" getter="get_expand"> - If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. Default value: [code]false[/code]. + <member name="expand" type="bool" setter="set_expand" getter="get_expand" default="false"> + If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. </member> - <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode"> + <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="0"> Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. </member> - <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> + <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask" default="null"> Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. </member> - <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture"> + <member name="texture_disabled" type="Texture" setter="set_disabled_texture" getter="get_disabled_texture" default="null"> Texture to display when the node is disabled. See [member BaseButton.disabled]. </member> - <member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture"> + <member name="texture_focused" type="Texture" setter="set_focused_texture" getter="get_focused_texture" default="null"> Texture to display when the node has mouse or keyboard focus. </member> - <member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture"> + <member name="texture_hover" type="Texture" setter="set_hover_texture" getter="get_hover_texture" default="null"> Texture to display when the mouse hovers the node. </member> - <member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture"> + <member name="texture_normal" type="Texture" setter="set_normal_texture" getter="get_normal_texture" default="null"> Texture to display by default, when the node is [b]not[/b] in the disabled, focused, hover or pressed state. </member> - <member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture"> - Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the enter key or if the player presses the [member BaseButton.shortcut] key. + <member name="texture_pressed" type="Texture" setter="set_pressed_texture" getter="get_pressed_texture" default="null"> + Texture to display on mouse down over the node, if the node has keyboard focus and the player presses the Enter key or if the player presses the [member BaseButton.shortcut] key. </member> </members> <constants> diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index 7c77bd43a3..a9ad5c251d 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -83,9 +83,16 @@ </method> </methods> <members> - <member name="data" type="Dictionary" setter="_set_data" getter="_get_data"> + <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{ +"depth": 0, +"flags": 4, +"format": 37, +"height": 0, +"layers": [ ], +"width": 0 +}"> </member> - <member name="flags" type="int" setter="set_flags" getter="get_flags"> + <member name="flags" type="int" setter="set_flags" getter="get_flags" default="4"> </member> </members> <constants> diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index 3bbc05dfe7..409d005067 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -4,58 +4,58 @@ Texture-based progress bar. Useful for loading screens and life or stamina bars. </brief_description> <description> - TextureProgress works like [ProgressBar] but it uses up to 3 textures instead of Godot's [Theme] resource. Works horizontally, vertically, and radially. + TextureProgress works like [ProgressBar], but uses up to 3 textures instead of Godot's [Theme] resource. It can be used to create horizontal, vertical and radial progress bars. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="fill_mode" type="int" setter="set_fill_mode" getter="get_fill_mode"> - The fill direction. Uses FILL_* constants. + <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="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch"> - If [code]true[/code], Godot treats the bar's textures like [NinePatchRect]. Use [code]stretch_margin_*[/code], like [member stretch_margin_bottom], to set up the nine patch's 3x3 grid. Default value: [code]false[/code]. + <member name="nine_patch_stretch" type="bool" setter="set_nine_patch_stretch" getter="get_nine_patch_stretch" default="false"> + If [code]true[/code], Godot treats the bar's textures like in [NinePatchRect]. Use the [code]stretch_margin_*[/code] properties like [member stretch_margin_bottom] to set up the nine patch's 3×3 grid. </member> - <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset"> + <member name="radial_center_offset" type="Vector2" setter="set_radial_center_offset" getter="get_radial_center_offset" default="Vector2( 0, 0 )"> Offsets [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. </member> - <member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees"> + <member name="radial_fill_degrees" type="float" setter="set_fill_degrees" getter="get_fill_degrees" default="360.0"> Upper limit for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's [code]value[/code] is equal to its [code]max_value[/code], the texture fills up to this angle. See [member Range.value], [member Range.max_value]. </member> - <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle"> + <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle" default="0.0"> Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees]. </member> - <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> + <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0"> The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. </member> - <member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> + <member name="stretch_margin_left" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0"> The width of the 9-patch's left column. </member> - <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> + <member name="stretch_margin_right" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0"> The width of the 9-patch's right column. </member> - <member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin"> + <member name="stretch_margin_top" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0"> The height of the 9-patch's top row. </member> - <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture"> + <member name="texture_over" type="Texture" setter="set_over_texture" getter="get_over_texture" default="null"> [Texture] that draws over the progress bar. Use it to add highlights or an upper-frame that hides part of [member texture_progress]. </member> - <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture"> + <member name="texture_progress" type="Texture" setter="set_progress_texture" getter="get_progress_texture" default="null"> [Texture] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code]. The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value]. </member> - <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture"> + <member name="texture_under" type="Texture" setter="set_under_texture" getter="get_under_texture" default="null"> [Texture] that draws under the progress bar. The bar's background. </member> - <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over"> + <member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color( 1, 1, 1, 1 )"> Multiplies the color of the bar's [code]texture_over[/code] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node. </member> - <member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress"> + <member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress" default="Color( 1, 1, 1, 1 )"> Multiplies the color of the bar's [code]texture_progress[/code] texture. </member> - <member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under"> + <member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under" default="Color( 1, 1, 1, 1 )"> Multiplies the color of the bar's [code]texture_under[/code] texture. </member> </members> @@ -76,7 +76,7 @@ Turns the node into a radial bar. The [member texture_progress] fills clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up. </constant> <constant name="FILL_COUNTER_CLOCKWISE" value="5" enum="FillMode"> - Turns the node into a radial bar. The [member texture_progress] fills counter-clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up. + Turns the node into a radial bar. The [member texture_progress] fills counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up. </constant> <constant name="FILL_BILINEAR_LEFT_AND_RIGHT" value="6" enum="FillMode"> The [member texture_progress] fills from the center, expanding both towards the left and the right. @@ -85,7 +85,7 @@ The [member texture_progress] fills from the center, expanding both towards the top and the bottom. </constant> <constant name="FILL_CLOCKWISE_AND_COUNTER_CLOCKWISE" value="8" enum="FillMode"> - Turns the node into a radial bar. The [member texture_progress] fills radially from the center, expanding both clockwise and counter-clockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up. + Turns the node into a radial bar. The [member texture_progress] fills radially from the center, expanding both clockwise and counterclockwise. See [member radial_center_offset], [member radial_initial_angle] and [member radial_fill_degrees] to control the way the bar fills up. </constant> </constants> </class> diff --git a/doc/classes/TextureRect.xml b/doc/classes/TextureRect.xml index b0b786a722..8320d535ea 100644 --- a/doc/classes/TextureRect.xml +++ b/doc/classes/TextureRect.xml @@ -11,19 +11,19 @@ <methods> </methods> <members> - <member name="expand" type="bool" setter="set_expand" getter="has_expand"> - If [code]true[/code], the texture scales to fit its bounding rectangle. Default value: [code]false[/code]. + <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="false"> + If [code]true[/code], the texture scales to fit its bounding rectangle. </member> - <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h"> - If [code]true[/code], texture is flipped horizontally. Default value: [code]false[/code]. + <member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h" default="false"> + If [code]true[/code], texture is flipped horizontally. </member> - <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v"> - If [code]true[/code], texture is flipped vertically. Default value: [code]false[/code]. + <member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v" default="false"> + If [code]true[/code], texture is flipped vertically. </member> - <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode"> + <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureRect.StretchMode" default="0"> Controls the texture's behavior when resizing the node's bounding rectangle. See [enum StretchMode]. </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> The node's [Texture] resource. </member> </members> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 8fdef5540b..9c2676a55a 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -4,8 +4,8 @@ Theme for controls. </brief_description> <description> - Theme for skinning controls. Controls can be skinned individually, but for complex applications it's more efficient to just create a global theme that defines everything. This theme can be applied to any [Control], and it and its children will automatically use it. - Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info. + A theme for skinning controls. Controls can be skinned individually, but for complex applications, it's more practical to just create a global theme that defines everything. This theme can be applied to any [Control]; the Control and its children will automatically use it. + Theme resources can alternatively be loaded by writing them in a [code].theme[/code] file, see the documentation for more information. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/gui/gui_skinning.html</link> @@ -25,7 +25,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears theme [Color] at [code]name[/code] if Theme has [code]type[/code]. + Clears the [Color] at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="clear_constant"> @@ -36,7 +36,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears theme constant at [code]name[/code] if Theme has [code]type[/code]. + Clears the constant at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="clear_font"> @@ -47,7 +47,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears [Font] at [code]name[/code] if Theme has [code]type[/code]. + Clears the [Font] at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="clear_icon"> @@ -58,7 +58,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears icon at [code]name[/code] if Theme has [code]type[/code]. + Clears the icon at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="clear_stylebox"> @@ -69,14 +69,14 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if Theme has [code]type[/code]. + Clears [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="copy_default_theme"> <return type="void"> </return> <description> - Sets theme values to a copy of the default theme values. + Sets the Theme's values to a copy of the default theme values. </description> </method> <method name="copy_theme"> @@ -95,7 +95,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Color] at [code]name[/code] if Theme has [code]type[/code]. + Returns the [Color] at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> @@ -104,7 +104,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all of the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if Theme has [code]type[/code]. + Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the Theme has [code]type[/code]. </description> </method> <method name="get_constant" qualifiers="const"> @@ -115,7 +115,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the constant at [code]name[/code] if Theme has [code]type[/code]. + Returns the constant at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> @@ -124,7 +124,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all of the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if Theme has [code]type[/code]. + Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the Theme has [code]type[/code]. </description> </method> <method name="get_font" qualifiers="const"> @@ -135,7 +135,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Font] at [code]name[/code] if Theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> @@ -144,7 +144,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all of the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if Theme has [code]type[/code]. + Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the Theme has [code]type[/code]. </description> </method> <method name="get_icon" qualifiers="const"> @@ -155,7 +155,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [Texture] at [code]name[/code] if Theme has [code]type[/code]. + Returns the icon [Texture] at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> @@ -164,7 +164,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all of the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if Theme has [code]type[/code]. + Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the Theme has [code]type[/code]. </description> </method> <method name="get_stylebox" qualifiers="const"> @@ -175,7 +175,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [StyleBox] at [code]name[/code] if Theme has [code]type[/code]. + Returns the icon [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> @@ -184,14 +184,14 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all of the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if Theme has [code]type[/code]. + Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the Theme has [code]type[/code]. </description> </method> <method name="get_stylebox_types" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Returns all of the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if Theme has [code]type[/code]. + Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the Theme has [code]type[/code]. </description> </method> <method name="get_type_list" qualifiers="const"> @@ -200,7 +200,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all of the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if Theme has [code]type[/code]. + Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if the Theme has [code]type[/code]. </description> </method> <method name="has_color" qualifiers="const"> @@ -212,7 +212,7 @@ </argument> <description> Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if Theme does not have [code]type[/code]. + Returns [code]false[/code] if the Theme does not have [code]type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -224,7 +224,7 @@ </argument> <description> Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if Theme does not have [code]type[/code]. + Returns [code]false[/code] if the Theme does not have [code]type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -236,7 +236,7 @@ </argument> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if Theme does not have [code]type[/code]. + Returns [code]false[/code] if the Theme does not have [code]type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -248,7 +248,7 @@ </argument> <description> Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if Theme does not have [code]type[/code]. + Returns [code]false[/code] if the Theme does not have [code]type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -260,7 +260,7 @@ </argument> <description> Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if Theme does not have [code]type[/code]. + Returns [code]false[/code] if the Theme does not have [code]type[/code]. </description> </method> <method name="set_color"> @@ -273,8 +273,8 @@ <argument index="2" name="color" type="Color"> </argument> <description> - Sets Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if Theme does not have [code]type[/code]. + Sets the Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the Theme does not have [code]type[/code]. </description> </method> <method name="set_constant"> @@ -287,8 +287,8 @@ <argument index="2" name="constant" type="int"> </argument> <description> - Sets Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if Theme does not have [code]type[/code]. + Sets the Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the Theme does not have [code]type[/code]. </description> </method> <method name="set_font"> @@ -301,8 +301,8 @@ <argument index="2" name="font" type="Font"> </argument> <description> - Sets Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if Theme does not have [code]type[/code]. + Sets the Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the Theme does not have [code]type[/code]. </description> </method> <method name="set_icon"> @@ -315,8 +315,8 @@ <argument index="2" name="texture" type="Texture"> </argument> <description> - Sets Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if Theme does not have [code]type[/code]. + Sets the Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the Theme does not have [code]type[/code]. </description> </method> <method name="set_stylebox"> @@ -330,12 +330,12 @@ </argument> <description> Sets Theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if Theme does not have [code]type[/code]. + Does nothing if the Theme does not have [code]type[/code]. </description> </method> </methods> <members> - <member name="default_font" type="Font" setter="set_default_font" getter="get_default_font"> + <member name="default_font" type="Font" setter="set_default_font" getter="get_default_font" default="null"> The theme's default font. </member> </members> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index ff8221fed3..8f96ab0aed 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -4,7 +4,7 @@ A unit of execution in a process. </brief_description> <description> - A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex], [Semaphore] is advised if working with shared objects. + A unit of execution in a process. Can run methods on [Object]s simultaneously. The use of synchronization via [Mutex] or [Semaphore] is advised if working with shared objects. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <return type="String"> </return> <description> - Returns the current [Thread]s id, uniquely identifying it among all threads. + Returns the current [Thread]'s ID, uniquely identifying it among all threads. </description> </method> <method name="is_active" qualifiers="const"> @@ -35,8 +35,8 @@ <argument index="3" name="priority" type="int" enum="Thread.Priority" default="1"> </argument> <description> - Starts a new [Thread] that runs "method" on object "instance" with "userdata" passed as an argument. The "priority" of the [Thread] can be changed by passing a PRIORITY_* enum. - Returns OK on success, or ERR_CANT_CREATE on failure. + Starts a new [Thread] that runs [code]method[/code] on object [code]instance[/code] with [code]userdata[/code] passed as an argument. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum. + Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure. </description> </method> <method name="wait_to_finish"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index ed4f914136..55666b94b5 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -85,7 +85,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns an array of all cells with the given tile id. + Returns an array of all cells with the given tile [code]id[/code]. </description> </method> <method name="get_used_rect"> @@ -103,7 +103,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Returns [code]true[/code] if the given cell is transposed, i.e. the x and y axes are swapped. + Returns [code]true[/code] if the given cell is transposed, i.e. the X and Y axes are swapped. </description> </method> <method name="is_cell_x_flipped" qualifiers="const"> @@ -114,7 +114,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Returns [code]true[/code] if the given cell is flipped in the x axis. + Returns [code]true[/code] if the given cell is flipped in the X axis. </description> </method> <method name="is_cell_y_flipped" qualifiers="const"> @@ -125,7 +125,7 @@ <argument index="1" name="y" type="int"> </argument> <description> - Returns [code]true[/code] if the given cell is flipped in the y axis. + Returns [code]true[/code] if the given cell is flipped in the Y axis. </description> </method> <method name="map_to_world" qualifiers="const"> @@ -161,7 +161,7 @@ Sets the tile index for the cell given by a Vector2. An index of [code]-1[/code] clears the cell. Optionally, the tile can also be flipped, transposed, or given autotile coordinates. - Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons. + [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons. If you need these to be immediately updated, you can call [method update_dirty_quadrants]. Overriding this method also overrides it internally, allowing custom logic to be implemented when tiles are placed/removed: [codeblock] @@ -189,7 +189,7 @@ Sets the tile index for the given cell. An index of [code]-1[/code] clears the cell. Optionally, the tile can also be flipped or transposed. - Note that data such as navigation polygons and collision shapes are not immediately updated for performance reasons. + [b]Note:[/b] Data such as navigation polygons and collision shapes are not immediately updated for performance reasons. If you need these to be immediately updated, you can call [method update_dirty_quadrants]. </description> </method> @@ -221,7 +221,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based x and y coordinates. + Applies autotiling rules to the cell (and its adjacent cells) referenced by its grid-based X and Y coordinates. </description> </method> <method name="update_bitmask_region"> @@ -232,7 +232,7 @@ <argument index="1" name="end" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> - Applies autotiling rules to the cells in the given region (specified by grid-based x and y coordinates). + Applies autotiling rules to the cells in the given region (specified by grid-based X and Y coordinates). Calling with invalid (or missing) parameters applies autotiling rules for the entire tilemap. </description> </method> @@ -254,48 +254,50 @@ </method> </methods> <members> - <member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv"> + <member name="cell_clip_uv" type="bool" setter="set_clip_uv" getter="get_clip_uv" default="false"> </member> - <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform"> + <member name="cell_custom_transform" type="Transform2D" setter="set_custom_transform" getter="get_custom_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> The custom [Transform2D] to be applied to the TileMap's cells. </member> - <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" enum="TileMap.HalfOffset"> - Amount to offset alternating tiles. Uses HALF_OFFSET_* constants. Default value: HALF_OFFSET_DISABLED. + <member name="cell_half_offset" type="int" setter="set_half_offset" getter="get_half_offset" enum="TileMap.HalfOffset" default="2"> + Amount to offset alternating tiles. See [enum HalfOffset] for possible values. </member> - <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size"> - The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. Default value: 16. + <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16"> + The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. </member> - <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size"> + <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2( 64, 64 )"> The TileMap's cell size. </member> - <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin"> - Position for tile origin. Uses TILE_ORIGIN_* constants. Default value: TILE_ORIGIN_TOP_LEFT. + <member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin" default="0"> + Position for tile origin. See [enum TileOrigin] for possible values. </member> - <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled"> - If [code]true[/code], the TileMap's children will be drawn in order of their Y coordinate. Default value: [code]false[/code]. + <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" default="false"> + If [code]true[/code], the TileMap's children will be drawn in order of their Y coordinate. </member> - <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce"> - Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 0. + <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> + Bounce value for static body collisions (see [code]collision_use_kinematic[/code]). </member> - <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction"> - Friction value for static body collisions (see [code]collision_use_kinematic[/code]). Default value: 1. + <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="1.0"> + Friction value for static body collisions (see [code]collision_use_kinematic[/code]). </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The collision layer(s) for all colliders in the TileMap. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The collision mask(s) for all colliders in the TileMap. </member> - <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic"> - If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. Default value: [code]false[/code]. + <member name="collision_use_kinematic" type="bool" setter="set_collision_use_kinematic" getter="get_collision_use_kinematic" default="false"> + If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode"> - The TileMap orientation mode. Uses MODE_* constants. Default value: MODE_SQUARE. + <member name="collision_use_parent" type="bool" setter="set_collision_use_parent" getter="get_collision_use_parent" default="false"> </member> - <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask"> + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="TileMap.Mode" default="0"> + The TileMap orientation mode. See [enum Mode] for possible values. + </member> + <member name="occluder_light_mask" type="int" setter="set_occluder_light_mask" getter="get_occluder_light_mask" default="1"> The light mask assigned to all light occluders in the TileMap. The TileSet's light occluders will cast shadows only from Light2D(s) that have the same light mask(s). </member> - <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset"> + <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset" default="null"> The assigned [TileSet]. </member> </members> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index d5e2fd31f8..8ad62f0fcb 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -52,7 +52,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Clears all bitmask info of the autotile. + Clears all bitmask information of the autotile. </description> </method> <method name="autotile_get_bitmask"> @@ -83,7 +83,7 @@ </argument> <description> Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates. - The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. + The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor. </description> </method> <method name="autotile_get_light_occluder" qualifiers="const"> @@ -183,7 +183,7 @@ </argument> <description> Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates. - The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask info is incomplete. It will also be used to represent it in the TileSet editor. + The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor. </description> </method> <method name="autotile_set_light_occluder"> @@ -512,7 +512,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the tile's z-index (drawing layer). + Returns the tile's Z index (drawing layer). </description> </method> <method name="tile_set_light_occluder"> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 74bd86b34b..4f455fb377 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -4,7 +4,7 @@ A countdown timer. </brief_description> <description> - Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one shot" mode. + Counts down a specified interval and emits a signal on reaching 0. Can be set to repeat or "one-shot" mode. </description> <tutorials> </tutorials> @@ -23,7 +23,7 @@ </argument> <description> Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec > 0[/code]. This also resets the remaining time to [code]wait_time[/code]. - Note: this method will not resume a paused timer. See [member paused]. + [b]Note:[/b] this method will not resume a paused timer. See [member paused]. </description> </method> <method name="stop"> @@ -35,23 +35,23 @@ </method> </methods> <members> - <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart"> - If [code]true[/code], the timer will automatically start when entering the scene tree. Default value: [code]false[/code]. + <member name="autostart" type="bool" setter="set_autostart" getter="has_autostart" default="false"> + If [code]true[/code], the timer will automatically start when entering the scene tree. </member> - <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot"> - If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart. Default value: [code]false[/code]. + <member name="one_shot" type="bool" setter="set_one_shot" getter="is_one_shot" default="false"> + If [code]true[/code], the timer will stop when reaching 0. If [code]false[/code], it will restart. </member> <member name="paused" type="bool" setter="set_paused" getter="is_paused"> If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called. </member> - <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode"> + <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode" default="1"> Processing mode. See [enum TimerProcessMode]. </member> <member name="time_left" type="float" setter="" getter="get_time_left"> The timer's remaining time in seconds. Returns 0 if the timer is inactive. - Note: You cannot set this value. To change the timer's remaining time, use [member wait_time]. + [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [member wait_time]. </member> - <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time"> + <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" default="1.0"> Wait time in seconds. </member> </members> diff --git a/doc/classes/ToolButton.xml b/doc/classes/ToolButton.xml index b48ab75fd0..3511987474 100644 --- a/doc/classes/ToolButton.xml +++ b/doc/classes/ToolButton.xml @@ -23,17 +23,17 @@ </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> - <theme_item name="font_color_disabled" type="Color"> + <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )"> </theme_item> - <theme_item name="font_color_hover" type="Color"> + <theme_item name="font_color_hover" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> - <theme_item name="font_color_pressed" type="Color"> + <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> <theme_item name="hover" type="StyleBox"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="3"> </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index 4b5a832b05..fd9f96a41e 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -18,32 +18,32 @@ </method> </methods> <members> - <member name="action" type="String" setter="set_action" getter="get_action"> + <member name="action" type="String" setter="set_action" getter="get_action" default=""""> The button's action. Actions can be handled with [InputEventAction]. </member> - <member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask"> + <member name="bitmask" type="BitMap" setter="set_bitmask" getter="get_bitmask" default="null"> The button's bitmask. </member> - <member name="normal" type="Texture" setter="set_texture" getter="get_texture"> + <member name="normal" type="Texture" setter="set_texture" getter="get_texture" default="null"> The button's texture for the normal state. </member> - <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled"> - If [code]true[/code], passby presses are enabled. + <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false"> + If [code]true[/code], pass-by presses are enabled. </member> - <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed"> + <member name="pressed" type="Texture" setter="set_texture_pressed" getter="get_texture_pressed" default="null"> The button's texture for the pressed state. </member> - <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> + <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape" default="null"> The button's shape. </member> - <member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered"> + <member name="shape_centered" type="bool" setter="set_shape_centered" getter="is_shape_centered" default="true"> If [code]true[/code], the button's shape is centered. </member> - <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible"> + <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" default="true"> If [code]true[/code], the button's shape is visible. </member> - <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode"> - The button's visibility mode. See [code]VISIBILITY_*[/code] constants. + <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode" default="0"> + The button's visibility mode. See [enum VisibilityMode] for possible values. </member> </members> <signals> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index dfbb93acfc..80a393dcee 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Transform" category="Built-In Types" version="3.2"> <brief_description> - 3D Transformation. 3x4 matrix. + 3D transformation (3×4 matrix). </brief_description> <description> - Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [Basis] "basis" and an [Vector3] "origin". It is similar to a 3x4 matrix. + Represents one or many transformations in 3D space such as translation, rotation, or scaling. It consists of a [member basis] and an [member origin]. It is similar to a 3×4 matrix. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/math/index.html</link> @@ -158,10 +158,10 @@ </method> </methods> <members> - <member name="basis" type="Basis" setter="" getter=""> + <member name="basis" type="Basis" setter="" getter="" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> The basis is a matrix containing 3 [Vector3] as its columns: X axis, Y axis, and Z axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. </member> - <member name="origin" type="Vector3" setter="" getter=""> + <member name="origin" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> The translation offset of the transform. </member> </members> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index bc003284ad..c5ae88d050 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Transform2D" category="Built-In Types" version="3.2"> <brief_description> - 2D Transformation. 3x2 matrix. + 2D transformation (3×2 matrix). </brief_description> <description> - Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of a two [Vector2] x, y and [Vector2] "origin". It is similar to a 3x2 matrix. + Represents one or many transformations in 2D space such as translation, rotation, or scaling. It consists of two [member x] and [member y] [Vector2]s and an [member origin]. It is similar to a 3×2 matrix. </description> <tutorials> </tutorials> @@ -160,14 +160,14 @@ </method> </methods> <members> - <member name="origin" type="Vector2" setter="" getter=""> + <member name="origin" type="Vector2" setter="" getter="" default="Vector2( 0, 0 )"> The transform's translation offset. </member> - <member name="x" type="Vector2" setter="" getter=""> - The X axis of 2x2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + <member name="x" type="Vector2" setter="" getter="" default="Vector2( 1, 0 )"> + The X axis of 2×2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. </member> - <member name="y" type="Vector2" setter="" getter=""> - The Y axis of 2x2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. + <member name="y" type="Vector2" setter="" getter="" default="Vector2( 0, 1 )"> + The Y axis of 2×2 basis matrix containing 2 [Vector2]s as its columns: X axis and Y axis. These vectors can be interpreted as the basis vectors of local coordinate system traveling with the object. </member> </members> <constants> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index eea4f8ed03..e2599b9695 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -4,7 +4,7 @@ Language Translation. </brief_description> <description> - Translations are resources that can be loaded/unloaded on demand. They map a string to another string. + Translations are resources that can be loaded and unloaded on demand. They map a string to another string. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link> @@ -56,7 +56,7 @@ </method> </methods> <members> - <member name="locale" type="String" setter="set_locale" getter="get_locale"> + <member name="locale" type="String" setter="set_locale" getter="get_locale" default=""en""> The locale of the translation. </member> </members> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 268fb5b6a5..f43d3bb24e 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -47,7 +47,7 @@ <argument index="0" name="locale" type="String"> </argument> <description> - Returns a locale's language and its variant (e.g. "en_US" would return "English (United States)"). + Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]). </description> </method> <method name="remove_translation"> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index aa287b1ed0..416a9eb656 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -42,7 +42,7 @@ <argument index="1" name="idx" type="int" default="-1"> </argument> <description> - Create an item in the tree and add it as the last child of [code]parent[/code]. If parent is not given, it will be added as the root's last child, or it'll the be the root itself if the tree is empty. + Create an item in the tree and add it as the last child of [code]parent[/code]. If [code]parent[/code] is [code]null[/code], it will be added as the root's last child, or it'll be the the root itself if the tree is empty. </description> </method> <method name="ensure_cursor_is_visible"> @@ -93,7 +93,7 @@ </argument> <description> If [member drop_mode_flags] includes [constant DROP_MODE_INBETWEEN], returns -1 if [code]position[/code] is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if [member drop_mode_flags] includes [constant DROP_MODE_ON_ITEM]. - Otherwise, returns 0. If there are no tree item at [code]position[/code], returns -100. + Otherwise, returns 0. If there are no tree items at [code]position[/code], returns -100. </description> </method> <method name="get_edited" qualifiers="const"> @@ -193,7 +193,7 @@ <argument index="1" name="min_width" type="int"> </argument> <description> - Set the minimum width of a column. + Sets the minimum width of a column. </description> </method> <method name="set_column_title"> @@ -204,7 +204,7 @@ <argument index="1" name="title" type="String"> </argument> <description> - Set the title of a column. + Sets the title of a column. </description> </method> <method name="set_column_titles_visible"> @@ -218,26 +218,26 @@ </method> </methods> <members> - <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect"> + <member name="allow_reselect" type="bool" setter="set_allow_reselect" getter="get_allow_reselect" default="false"> If [code]true[/code], the currently selected cell may be selected again. </member> - <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select"> + <member name="allow_rmb_select" type="bool" setter="set_allow_rmb_select" getter="get_allow_rmb_select" default="false"> If [code]true[/code], a right mouse button click can select items. </member> - <member name="columns" type="int" setter="set_columns" getter="get_columns"> - The amount of columns. + <member name="columns" type="int" setter="set_columns" getter="get_columns" default="1"> + The number of columns. </member> - <member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags"> + <member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0"> The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. </member> - <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden"> + <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false"> If [code]true[/code], the folding arrow is hidden. </member> - <member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden"> + <member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden" default="false"> If [code]true[/code], the tree's root is hidden. </member> - <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode"> - Allow single or multiple selection. See the [code]SELECT_*[/code] constants. + <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0"> + Allows single or multiple selection. See the [code]SELECT_*[/code] constants. </member> </members> <signals> @@ -281,7 +281,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Emitted when the right mouse button is pressed if RMB selection is active and the tree is empty. + Emitted when the right mouse button is pressed if right mouse button selection is active and the tree is empty. </description> </signal> <signal name="item_activated"> @@ -335,7 +335,7 @@ <argument index="2" name="selected" type="bool"> </argument> <description> - Emitted instead of [code]item_selected[/code] when [code]select_mode[/code] is [constant SELECT_MULTI]. + Emitted instead of [code]item_selected[/code] if [code]select_mode[/code] is [constant SELECT_MULTI]. </description> </signal> <signal name="nothing_selected"> @@ -345,12 +345,12 @@ </signals> <constants> <constant name="SELECT_SINGLE" value="0" enum="SelectMode"> - Allow selection of a single item at a time. + Allows selection of a single item at a time. </constant> <constant name="SELECT_ROW" value="1" enum="SelectMode"> </constant> <constant name="SELECT_MULTI" value="2" enum="SelectMode"> - Allow selection of multiple items at the same time. + Allows selection of multiple items at the same time. </constant> <constant name="DROP_MODE_DISABLED" value="0" enum="DropModeFlags"> </constant> @@ -368,7 +368,7 @@ </theme_item> <theme_item name="bg_focus" type="StyleBox"> </theme_item> - <theme_item name="button_margin" type="int"> + <theme_item name="button_margin" type="int" default="4"> </theme_item> <theme_item name="button_pressed" type="StyleBox"> </theme_item> @@ -376,43 +376,43 @@ </theme_item> <theme_item name="cursor" type="StyleBox"> </theme_item> - <theme_item name="cursor_color" type="Color"> + <theme_item name="cursor_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> <theme_item name="cursor_unfocused" type="StyleBox"> </theme_item> <theme_item name="custom_button" type="StyleBox"> </theme_item> - <theme_item name="custom_button_font_highlight" type="Color"> + <theme_item name="custom_button_font_highlight" type="Color" default="Color( 0.941176, 0.941176, 0.941176, 1 )"> </theme_item> <theme_item name="custom_button_hover" type="StyleBox"> </theme_item> <theme_item name="custom_button_pressed" type="StyleBox"> </theme_item> - <theme_item name="draw_guides" type="int"> + <theme_item name="draw_guides" type="int" default="1"> </theme_item> - <theme_item name="draw_relationship_lines" type="int"> + <theme_item name="draw_relationship_lines" type="int" default="0"> </theme_item> - <theme_item name="drop_position_color" type="Color"> + <theme_item name="drop_position_color" type="Color" default="Color( 1, 0.3, 0.2, 1 )"> </theme_item> <theme_item name="font" type="Font"> </theme_item> - <theme_item name="font_color" type="Color"> + <theme_item name="font_color" type="Color" default="Color( 0.690196, 0.690196, 0.690196, 1 )"> </theme_item> - <theme_item name="font_color_selected" type="Color"> + <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> </theme_item> - <theme_item name="guide_color" type="Color"> + <theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )"> </theme_item> - <theme_item name="guide_width" type="int"> + <theme_item name="guide_width" type="int" default="2"> </theme_item> - <theme_item name="hseparation" type="int"> + <theme_item name="hseparation" type="int" default="4"> </theme_item> - <theme_item name="item_margin" type="int"> + <theme_item name="item_margin" type="int" default="12"> </theme_item> - <theme_item name="relationship_line_color" type="Color"> + <theme_item name="relationship_line_color" type="Color" default="Color( 0.27451, 0.27451, 0.27451, 1 )"> </theme_item> - <theme_item name="scroll_border" type="int"> + <theme_item name="scroll_border" type="int" default="4"> </theme_item> - <theme_item name="scroll_speed" type="int"> + <theme_item name="scroll_speed" type="int" default="12"> </theme_item> <theme_item name="select_arrow" type="Texture"> </theme_item> @@ -420,9 +420,9 @@ </theme_item> <theme_item name="selected_focus" type="StyleBox"> </theme_item> - <theme_item name="selection_color" type="Color"> + <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> </theme_item> - <theme_item name="title_button_color" type="Color"> + <theme_item name="title_button_color" type="Color" default="Color( 0.878431, 0.878431, 0.878431, 1 )"> </theme_item> <theme_item name="title_button_font" type="Font"> </theme_item> @@ -436,7 +436,7 @@ </theme_item> <theme_item name="updown" type="Texture"> </theme_item> - <theme_item name="vseparation" type="int"> + <theme_item name="vseparation" type="int" default="4"> </theme_item> </theme_items> </class> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index f7887a87c8..d9c7013d34 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -90,7 +90,7 @@ <argument index="0" name="column" type="int"> </argument> <description> - Returns the column's cell mode. See [code]CELL_MODE_*[/code] constants. + Returns the column's cell mode. </description> </method> <method name="get_children"> @@ -527,7 +527,7 @@ <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign"> </argument> <description> - Sets the given column's text alignment. See [code]ALIGN_*[/code] constants. + Sets the given column's text alignment. See [enum TextAlign] for possible values. </description> </method> <method name="set_tooltip"> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index ff1413cb94..0f7a93e8d5 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -4,7 +4,7 @@ Smoothly animates a node's properties over time. </brief_description> <description> - Tweens are useful for animations requiring a numerical property to be interpolated over a range of values. The name *tween* comes from *in-betweening*, an animation technique where you specify *keyframes* and the computer interpolates the frames that appear between them. + 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-betweening[/i], an animation technique where you specify [i]keyframes[/i] and the computer interpolates the frames that appear between them. Here is a brief usage example that causes a 2D node to move smoothly between two positions: [codeblock] var tween = get_node("Tween") @@ -13,7 +13,7 @@ Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() [/codeblock] - Many methods require a property name, such as "position" above. 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 "property:component" (eg. [code]position:x[/code]), where it would only apply to that particular component. + Many methods require a property name, such as [code]"position"[/code] above. 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. Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [code]http://easings.net/[/code] for some examples). The second accepts an [enum EaseType] constant, and controls the where [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 TransitionType] constants with [constant EASE_IN_OUT], and use the one that looks best. </description> <tutorials> @@ -42,7 +42,7 @@ </argument> <description> Follows [code]method[/code] of [code]object[/code] and applies the returned value on [code]target_method[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] later. Methods are called with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. </description> </method> <method name="follow_property"> @@ -68,7 +68,7 @@ </argument> <description> Follows [code]property[/code] of [code]object[/code] and applies it on [code]target_property[/code] of [code]target[/code], beginning from [code]initial_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. </description> </method> <method name="get_runtime" qualifiers="const"> @@ -145,7 +145,7 @@ </argument> <description> Animates [code]method[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are called with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. </description> </method> <method name="interpolate_property"> @@ -169,14 +169,15 @@ </argument> <description> Animates [code]property[/code] of [code]object[/code] from [code]initial_val[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Setting the initial value to [code]null[/code] uses the current value of the property. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. </description> </method> <method name="is_active" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if any tweens are currently running. Note that this method doesn't consider tweens that have ended. + Returns [code]true[/code] if any tweens are currently running. + [b]Note:[/b] This method doesn't consider tweens that have ended. </description> </method> <method name="remove"> @@ -299,7 +300,7 @@ </argument> <description> Animates [code]method[/code] of [code]object[/code] from the value returned by [code]initial_method[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. Methods are animated by calling them with consecutive values. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. </description> </method> <method name="targeting_property"> @@ -325,7 +326,7 @@ </argument> <description> Animates [code]property[/code] of [code]object[/code] from the current value of the [code]initial_val[/code] property of [code]initial[/code] to [code]final_val[/code] for [code]duration[/code] seconds, [code]delay[/code] seconds later. - Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information + Use [enum TransitionType] for [code]trans_type[/code] and [enum EaseType] for [code]ease_type[/code] parameters. These values control the timing and direction of the interpolation. See the class description for more information. </description> </method> <method name="tell" qualifiers="const"> @@ -337,13 +338,13 @@ </method> </methods> <members> - <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" enum="Tween.TweenProcessMode"> - The tween's animation process thread. See [enum TweenProcessMode]. Default value: [constant TWEEN_PROCESS_IDLE]. + <member name="playback_process_mode" type="int" setter="set_tween_process_mode" getter="get_tween_process_mode" enum="Tween.TweenProcessMode" default="1"> + The tween's animation process thread. See [enum TweenProcessMode]. </member> - <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale"> + <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The tween's speed multiplier. For example, set it to [code]1.0[/code] for normal speed, [code]2.0[/code] for two times normal speed, or [code]0.5[/code] for half of the normal speed. A value of [code]0[/code] pauses the animation, but see also [method set_active] or [method stop_all] for this. </member> - <member name="repeat" type="bool" setter="set_repeat" getter="is_repeat"> + <member name="repeat" type="bool" setter="set_repeat" getter="is_repeat" default="false"> If [code]true[/code], the tween loops. </member> </members> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 71da4c684c..7834719af6 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -4,7 +4,7 @@ Helper to manage undo/redo operations in the editor or custom tools. </brief_description> <description> - Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside 'actions'. + Helper to manage undo/redo operations in the editor or custom tools. It works by registering methods and property changes inside "actions". Common behavior is to create an action, then add do/undo calls to functions or property changes, then committing the action. Here's an example on how to add an action to the Godot editor's own [UndoRedo], from a plugin: [codeblock] @@ -26,7 +26,7 @@ undo_redo.commit_action() [/codeblock] [method create_action], [method add_do_method], [method add_undo_method], [method add_do_property], [method add_undo_property], and [method commit_action] should be called one after the other, like in the example. Not doing so could lead to crashes. - If you don't need to register a method you can leave [method add_do_method] and [method add_undo_method] out, and so it goes for properties. You can register more than one method/property. + If you don't need to register a method, you can leave [method add_do_method] and [method add_undo_method] out; the same goes for properties. You can also register more than one method/property. </description> <tutorials> </tutorials> @@ -52,7 +52,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Register a property value change for 'do'. + Register a property value change for "do". </description> </method> <method name="add_do_reference"> @@ -61,7 +61,7 @@ <argument index="0" name="object" type="Object"> </argument> <description> - Register a reference for 'do' that will be erased if the 'do' history is lost. This is useful mostly for new nodes created for the 'do' call. Do not use for resources. + Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. </description> </method> <method name="add_undo_method" qualifiers="vararg"> @@ -85,7 +85,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Register a property value change for 'undo'. + Register a property value change for "undo". </description> </method> <method name="add_undo_reference"> @@ -94,7 +94,7 @@ <argument index="0" name="object" type="Object"> </argument> <description> - Register a reference for 'undo' that will be erased if the 'undo' history is lost. This is useful mostly for nodes removed with the 'do' call (not the 'undo' call!). + Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). </description> </method> <method name="clear_history"> @@ -111,7 +111,7 @@ <return type="void"> </return> <description> - Commit the action. All 'do' methods/properties are called/set when this function is called. + Commit the action. All "do" methods/properties are called/set when this function is called. </description> </method> <method name="create_action"> @@ -130,14 +130,14 @@ <return type="String"> </return> <description> - Get the name of the current action. + Gets the name of the current action. </description> </method> <method name="get_version" qualifiers="const"> <return type="int"> </return> <description> - Get the version, each time a new action is committed, the version number of the [UndoRedo] is increased automatically. + Gets the version. Every time a new action is committed, the [UndoRedo]'s version number is increased automatically. This is useful mostly to check if something changed from a saved version. </description> </method> @@ -145,21 +145,21 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if a 'redo' action is available. + Returns [code]true[/code] if a "redo" action is available. </description> </method> <method name="has_undo"> <return type="bool"> </return> <description> - Returns [code]true[/code] if an 'undo' action is available. + Returns [code]true[/code] if an "undo" action is available. </description> </method> <method name="is_commiting_action" qualifiers="const"> <return type="bool"> </return> <description> - Returns [code]true[/code] if the [UndoRedo] is currently committing the action, i.e. running its 'do' method or property change (see [method commit_action]). + Returns [code]true[/code] if the [UndoRedo] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]). </description> </method> <method name="redo"> @@ -186,10 +186,10 @@ </signals> <constants> <constant name="MERGE_DISABLE" value="0" enum="MergeMode"> - Makes 'do'/'undo' operations stay in separate actions. + Makes "do"/"undo" operations stay in separate actions. </constant> <constant name="MERGE_ENDS" value="1" enum="MergeMode"> - Makes so that the action's 'do' operation is from the first action created and the 'undo' operation is from the last subsequent action with the same name. + Makes so that the action's "do" operation is from the first action created and the "undo" operation is from the last subsequent action with the same name. </constant> <constant name="MERGE_ALL" value="2" enum="MergeMode"> Makes subsequent actions with the same name be merged into one. diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml index 1b4a6a6b62..4709772615 100644 --- a/doc/classes/VBoxContainer.xml +++ b/doc/classes/VBoxContainer.xml @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int"> + <theme_item name="separation" type="int" default="4"> </theme_item> </theme_items> </class> diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml index ab33c24bb6..e618c2b84b 100644 --- a/doc/classes/VSeparator.xml +++ b/doc/classes/VSeparator.xml @@ -4,7 +4,7 @@ Vertical version of [Separator]. </brief_description> <description> - Vertical version of [Separator]. It is used to separate objects horizontally, though (but it looks vertical!). + Vertical version of [Separator]. Even though it looks vertical, it is used to separate objects horizontally. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int"> + <theme_item name="separation" type="int" default="4"> </theme_item> <theme_item name="separator" type="StyleBox"> </theme_item> diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 594b662fea..da2a54dca0 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -13,13 +13,13 @@ <constants> </constants> <theme_items> - <theme_item name="autohide" type="int"> + <theme_item name="autohide" type="int" default="1"> </theme_item> <theme_item name="bg" type="StyleBox"> </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> - <theme_item name="separation" type="int"> + <theme_item name="separation" type="int" default="12"> </theme_item> </theme_items> </class> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index ee598c39f8..eb07c70cc6 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -4,7 +4,7 @@ The most important data type in Godot. </brief_description> <description> - A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time, instead they are used mainly for communication, editing, serialization and moving data around. + A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time. Instead, they are used mainly for communication, editing, serialization and moving data around. </description> <tutorials> </tutorials> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 243dbceced..0c96c50c58 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -18,7 +18,7 @@ <argument index="1" name="y" type="float"> </argument> <description> - Constructs a new Vector2 from the given x and y. + Constructs a new Vector2 from the given [code]x[/code] and [code]y[/code]. </description> </method> <method name="abs"> @@ -32,8 +32,8 @@ <return type="float"> </return> <description> - Returns the vector's angle in radians with respect to the x-axis, or [code](1, 0)[/code] vector. - Equivalent to the result of atan2 when called with the vector's x and y as parameters: [code]atan2(x, y)[/code]. + Returns the vector's angle in radians with respect to the X axis, or [code](1, 0)[/code] vector. + Equivalent to the result of [method @GDScript.atan2] when called with the vector's [member x] and [member y] as parameters: [code]atan2(x, y)[/code]. </description> </method> <method name="angle_to"> @@ -51,14 +51,14 @@ <argument index="0" name="to" type="Vector2"> </argument> <description> - Returns the angle in radians between the line connecting the two points and the x coordinate. + Returns the angle in radians between the line connecting the two points and the X coordinate. </description> </method> <method name="aspect"> <return type="float"> </return> <description> - Returns the ratio of x to y. + Returns the ratio of [member x] to [member y]. </description> </method> <method name="bounce"> @@ -92,7 +92,7 @@ <argument index="0" name="with" type="Vector2"> </argument> <description> - Returns the 2 dimensional analog of the cross product with the given vector. + Returns the 2-dimensional analog of the cross product with the given vector. </description> </method> <method name="cubic_interpolate"> @@ -107,7 +107,7 @@ <argument index="3" name="t" type="float"> </argument> <description> - Cubicly interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. </description> </method> <method name="direction_to"> @@ -245,8 +245,8 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. - Both vectors need to be normalized. + Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + [b]Note:[/b] Both vectors must be normalized. </description> </method> <method name="slide"> @@ -276,11 +276,11 @@ </method> </methods> <members> - <member name="x" type="float" setter="" getter=""> - The vector's x component. Also accessible by using the index position [code][0][/code]. + <member name="x" type="float" setter="" getter="" default="0.0"> + The vector's X component. Also accessible by using the index position [code][0][/code]. </member> - <member name="y" type="float" setter="" getter=""> - The vector's y component. Also accessible by using the index position [code][1][/code]. + <member name="y" type="float" setter="" getter="" default="0.0"> + The vector's Y component. Also accessible by using the index position [code][1][/code]. </member> </members> <constants> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 99bf3d2610..3e1083ab69 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -246,8 +246,8 @@ <argument index="1" name="t" type="float"> </argument> <description> - Returns the result of SLERP between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. - Both vectors need to be normalized. + Returns the result of spherical linear interpolation between this vector and [code]b[/code], by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. + [b]Note:[/b] Both vectors must be normalized. </description> </method> <method name="slide"> @@ -265,7 +265,7 @@ <argument index="0" name="by" type="Vector3"> </argument> <description> - Returns a copy of the vector, snapped to the lowest neared multiple. + Returns a copy of the vector snapped to the lowest neared multiple. </description> </method> <method name="to_diagonal_matrix"> @@ -277,14 +277,14 @@ </method> </methods> <members> - <member name="x" type="float" setter="" getter=""> - The vector's x component. Also accessible by using the index position [code][0][/code]. + <member name="x" type="float" setter="" getter="" default="0.0"> + The vector's X component. Also accessible by using the index position [code][0][/code]. </member> - <member name="y" type="float" setter="" getter=""> - The vector's y component. Also accessible by using the index position [code][1][/code]. + <member name="y" type="float" setter="" getter="" default="0.0"> + The vector's Y component. Also accessible by using the index position [code][1][/code]. </member> - <member name="z" type="float" setter="" getter=""> - The vector's z component. Also accessible by using the index position [code][2][/code]. + <member name="z" type="float" setter="" getter="" default="0.0"> + The vector's Z component. Also accessible by using the index position [code][2][/code]. </member> </members> <constants> diff --git a/doc/classes/VehicleBody.xml b/doc/classes/VehicleBody.xml index f5b26e4f11..956144b54c 100644 --- a/doc/classes/VehicleBody.xml +++ b/doc/classes/VehicleBody.xml @@ -4,22 +4,23 @@ Physics body that simulates the behavior of a car. </brief_description> <description> - This nodes implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape] for the main body of your vehicle and add [VehicleWheel] nodes for the wheels. You should also add a [MeshInstance] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly. - Note that the origin point of your VehicleBody will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape] and [MeshInstance] upwards. + This node implements all the physics logic needed to simulate a car. It is based on the raycast vehicle system commonly found in physics engines. You will need to add a [CollisionShape] for the main body of your vehicle and add [VehicleWheel] nodes for the wheels. You should also add a [MeshInstance] to this node for the 3D model of your car but this model should not include meshes for the wheels. You should control the vehicle by using the [member brake], [member engine_force], and [member steering] properties and not change the position or orientation of this node directly. + [b]Note:[/b] The origin point of your VehicleBody will determine the center of gravity of your vehicle so it is better to keep this low and move the [CollisionShape] and [MeshInstance] upwards. </description> <tutorials> </tutorials> <methods> </methods> <members> - <member name="brake" type="float" setter="set_brake" getter="get_brake"> + <member name="brake" type="float" setter="set_brake" getter="get_brake" default="0.0"> Slows down the vehicle by applying a braking force. The vehicle is only slowed down if the wheels are in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking. </member> - <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force"> - Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. Note that the simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. + <member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0"> + Accelerates the vehicle by applying an engine force. The vehicle is only speed up if the wheels that have [member VehicleWheel.use_as_traction] set to [code]true[/code] and are in contact with a surface. The [member RigidBody.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration. + [b]Note:[/b] The simulation does not take the effect of gears into account, you will need to add logic for this if you wish to simulate gears. A negative value will result in the vehicle reversing. </member> - <member name="steering" type="float" setter="set_steering" getter="get_steering"> + <member name="steering" type="float" setter="set_steering" getter="get_steering" default="0.0"> The steering angle for the vehicle. Setting this to a non-zero value will result in the vehicle turning when it's moving. Wheels that have [member VehicleWheel.use_as_steering] set to [code]true[/code] will automatically be rotated. </member> </members> diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml index eee72db48e..6de6429531 100644 --- a/doc/classes/VehicleWheel.xml +++ b/doc/classes/VehicleWheel.xml @@ -31,39 +31,39 @@ </method> </methods> <members> - <member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression"> + <member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" default="0.83"> The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car. </member> - <member name="damping_relaxation" type="float" setter="set_damping_relaxation" getter="get_damping_relaxation"> - The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5 + <member name="damping_relaxation" type="float" setter="set_damping_relaxation" getter="get_damping_relaxation" default="0.88"> + The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5. </member> - <member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force"> - The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody.mass] of the [VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3x to 4x this number. + <member name="suspension_max_force" type="float" setter="set_suspension_max_force" getter="get_suspension_max_force" default="6000.0"> + The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody.mass] of the [VehicleBody] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number. </member> - <member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness"> + <member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness" default="5.88"> This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car. </member> - <member name="suspension_travel" type="float" setter="set_suspension_travel" getter="get_suspension_travel"> - This is the distance the suspension can travel. As Godot measures are in meters keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car . + <member name="suspension_travel" type="float" setter="set_suspension_travel" getter="get_suspension_travel" default="5.0"> + This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car. </member> - <member name="use_as_steering" type="bool" setter="set_use_as_steering" getter="is_used_as_steering"> - If [code]true[/code] this wheel will be turned when the car steers. + <member name="use_as_steering" type="bool" setter="set_use_as_steering" getter="is_used_as_steering" default="false"> + If [code]true[/code], this wheel will be turned when the car steers. </member> - <member name="use_as_traction" type="bool" setter="set_use_as_traction" getter="is_used_as_traction"> - If [code]true[/code] this wheel transfers engine force to the ground to propel the vehicle forward. + <member name="use_as_traction" type="bool" setter="set_use_as_traction" getter="is_used_as_traction" default="false"> + If [code]true[/code], this wheel transfers engine force to the ground to propel the vehicle forward. </member> - <member name="wheel_friction_slip" type="float" setter="set_friction_slip" getter="get_friction_slip"> + <member name="wheel_friction_slip" type="float" setter="set_friction_slip" getter="get_friction_slip" default="10.5"> This determines how much grip this wheel has. It is combined with the friction setting of the surface the wheel is in contact with. 0.0 means no grip, 1.0 is normal grip. For a drift car setup, try setting the grip of the rear wheels slightly lower than the front wheels, or use a lower value to simulate tire wear. It's best to set this to 1.0 when starting out. </member> - <member name="wheel_radius" type="float" setter="set_radius" getter="get_radius"> + <member name="wheel_radius" type="float" setter="set_radius" getter="get_radius" default="0.5"> The radius of the wheel in meters. </member> - <member name="wheel_rest_length" type="float" setter="set_suspension_rest_length" getter="get_suspension_rest_length"> + <member name="wheel_rest_length" type="float" setter="set_suspension_rest_length" getter="get_suspension_rest_length" default="0.15"> This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. </member> - <member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence"> - This value effects the roll of your vehicle. If set to 0.0 for all wheels your vehicle will be prone to rolling over while a value of 1.0 will resist body roll. + <member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence" default="0.1"> + This value affects the roll of your vehicle. If set to 0.0 for all wheels, your vehicle will be prone to rolling over, while a value of 1.0 will resist body roll. </member> </members> <constants> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 15d1dfcf19..45341cee74 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -4,7 +4,7 @@ Control for playing video streams. </brief_description> <description> - Control node for playing video streams. Supported formats are WebM and OGV Theora. + Control node for playing video streams. Supported formats are [url=https://www.webmproject.org/]WebM[/url] and [url=https://www.theora.org/]Ogg Theora[/url]. </description> <tutorials> </tutorials> @@ -46,25 +46,25 @@ </method> </methods> <members> - <member name="audio_track" type="int" setter="set_audio_track" getter="get_audio_track"> + <member name="audio_track" type="int" setter="set_audio_track" getter="get_audio_track" default="0"> The embedded audio track to play. </member> - <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay"> - If [code]true[/code], playback starts when the scene loads. Default value: [code]false[/code]. + <member name="autoplay" type="bool" setter="set_autoplay" getter="has_autoplay" default="false"> + If [code]true[/code], playback starts when the scene loads. </member> - <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec"> + <member name="buffering_msec" type="int" setter="set_buffering_msec" getter="get_buffering_msec" default="500"> Amount of time in milliseconds to store in buffer while playing. </member> - <member name="bus" type="String" setter="set_bus" getter="get_bus"> + <member name="bus" type="String" setter="set_bus" getter="get_bus" default=""Master""> Audio bus to use for sound playback. </member> - <member name="expand" type="bool" setter="set_expand" getter="has_expand"> - If [code]true[/code], the video scales to the control size. Default value: [code]true[/code]. + <member name="expand" type="bool" setter="set_expand" getter="has_expand" default="true"> + If [code]true[/code], the video scales to the control size. </member> - <member name="paused" type="bool" setter="set_paused" getter="is_paused"> + <member name="paused" type="bool" setter="set_paused" getter="is_paused" default="false"> If [code]true[/code], the video is paused. </member> - <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream"> + <member name="stream" type="VideoStream" setter="set_stream" getter="get_stream" default="null"> </member> <member name="stream_position" type="float" setter="set_stream_position" getter="get_stream_position"> The current position of the stream, in seconds. @@ -72,7 +72,7 @@ <member name="volume" type="float" setter="set_volume" getter="get_volume"> Audio volume as a linear value. </member> - <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db"> + <member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0"> Audio volume in dB. </member> </members> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index caaaf662dc..a9ffd9f66d 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -78,7 +78,8 @@ <return type="ViewportTexture"> </return> <description> - Returns the viewport's texture. Note that due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture.get_data] to flip it back, for example: + 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 Texture.get_data] to flip it back, for example: [codeblock] var img = get_viewport().get_texture().get_data() img.flip_y() @@ -209,87 +210,87 @@ </method> </methods> <members> - <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr"> - If [code]true[/code], the viewport will be used in AR/VR process. Default value: [code]false[/code]. + <member name="arvr" type="bool" setter="set_use_arvr" getter="use_arvr" default="false"> + If [code]true[/code], the viewport will be used in AR/VR process. </member> - <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d"> - If [code]true[/code], the viewport will process 2D audio streams. Default value: [code]false[/code]. + <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" default="false"> + If [code]true[/code], the viewport will process 2D audio streams. </member> - <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener"> - If [code]true[/code], the viewport will process 3D audio streams. Default value: [code]false[/code]. + <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener" default="false"> + If [code]true[/code], the viewport will process 3D audio streams. </member> <member name="canvas_transform" type="Transform2D" setter="set_canvas_transform" getter="get_canvas_transform"> The canvas transform of the viewport, useful for changing the on-screen positions of all child [CanvasItem]s. This is relative to the global canvas transform of the viewport. </member> - <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" enum="Viewport.DebugDraw"> - The overlay mode for test rendered geometry in debug purposes. Default value: [constant DEBUG_DRAW_DISABLED]. + <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" enum="Viewport.DebugDraw" default="0"> + The overlay mode for test rendered geometry in debug purposes. </member> - <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled"> - If [code]true[/code], the viewport will disable 3D rendering. For actual disabling use [code]usage[/code]. Default value: [code]false[/code]. + <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false"> + If [code]true[/code], the viewport will disable 3D rendering. For actual disabling use [code]usage[/code]. </member> <member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform"> The global canvas transform of the viewport. The canvas transform is relative to this. </member> - <member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled"> - If [code]true[/code], the viewport will not receive input event. Default value: [code]false[/code]. + <member name="gui_disable_input" type="bool" setter="set_disable_input" getter="is_input_disabled" default="false"> + If [code]true[/code], the viewport will not receive input event. </member> - <member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled"> - If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly. Default value: [code]true[/code]. + <member name="gui_snap_controls_to_pixels" type="bool" setter="set_snap_controls_to_pixels" getter="is_snap_controls_to_pixels_enabled" default="true"> + If [code]true[/code], the GUI controls on the viewport will lay pixel perfectly. </member> - <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally"> + <member name="handle_input_locally" type="bool" setter="set_handle_input_locally" getter="is_handling_input_locally" default="true"> </member> - <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr"> - If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. Default value: [code]true[/code]. + <member name="hdr" type="bool" setter="set_hdr" getter="get_hdr" default="true"> + If [code]true[/code], the viewport rendering will receive benefits from High Dynamic Range algorithm. </member> - <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear"> + <member name="keep_3d_linear" type="bool" setter="set_keep_3d_linear" getter="get_keep_3d_linear" default="false"> If [code]true[/code], the result after 3D rendering will not have a linear to sRGB color conversion applied. This is important when the viewport is used as a render target where the result is used as a texture on a 3D object rendered in another viewport. It is also important if the viewport is used to create data that is not color based (noise, heightmaps, pickmaps, etc.). Do not enable this when the viewport is used as a texture on a 2D object or if the viewport is your final output. </member> - <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA"> - The multisample anti-aliasing mode. Default value: [constant MSAA_DISABLED]. + <member name="msaa" type="int" setter="set_msaa" getter="get_msaa" enum="Viewport.MSAA" default="0"> + The multisample anti-aliasing mode. </member> - <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world"> - If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property. Default value: [code]false[/code]. + <member name="own_world" type="bool" setter="set_use_own_world" getter="is_using_own_world" default="false"> + If [code]true[/code], the viewport will use [World] defined in [code]world[/code] property. </member> - <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking"> - If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. Default value: [code]false[/code]. + <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false"> + If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. </member> - <member name="render_direct_to_screen" type="bool" setter="set_use_render_direct_to_screen" getter="is_using_render_direct_to_screen"> - If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method VisualServer.viewport_set_render_direct_to_screen]. Default value: [code]false[/code]. + <member name="render_direct_to_screen" type="bool" setter="set_use_render_direct_to_screen" getter="is_using_render_direct_to_screen" default="false"> + If [code]true[/code], renders the Viewport directly to the screen instead of to the root viewport. Only available in GLES2. This is a low-level optimization and should not be used in most cases. If used, reading from the Viewport or from [code]SCREEN_TEXTURE[/code] becomes unavailable. For more information see [method VisualServer.viewport_set_render_direct_to_screen]. </member> - <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode"> - The clear mode when viewport used as a render target. Default value: [constant CLEAR_MODE_ALWAYS]. + <member name="render_target_clear_mode" type="int" setter="set_clear_mode" getter="get_clear_mode" enum="Viewport.ClearMode" default="0"> + The clear mode when viewport used as a render target. </member> - <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="Viewport.UpdateMode"> - The update mode when viewport used as a render target. Default value: [constant UPDATE_WHEN_VISIBLE]. + <member name="render_target_update_mode" type="int" setter="set_update_mode" getter="get_update_mode" enum="Viewport.UpdateMode" default="2"> + The update mode when viewport used as a render target. </member> - <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip"> - If [code]true[/code], the result of rendering will be flipped vertically. Default value: [code]false[/code]. + <member name="render_target_v_flip" type="bool" setter="set_vflip" getter="get_vflip" default="false"> + If [code]true[/code], the result of rendering will be flipped vertically. </member> - <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv"> - The subdivision amount of first quadrant on shadow atlas. Default value: [code]SHADOW_ATLAS_QUADRANT_SUBDIV_4[/code]. + <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> + The subdivision amount of first quadrant on shadow atlas. </member> - <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv"> - The subdivision amount of second quadrant on shadow atlas. Default value: [code]SHADOW_ATLAS_QUADRANT_SUBDIV_4[/code]. + <member name="shadow_atlas_quad_1" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> + The subdivision amount of second quadrant on shadow atlas. </member> - <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv"> - The subdivision amount of third quadrant on shadow atlas. Default value: [code]SHADOW_ATLAS_QUADRANT_SUBDIV_16[/code]. + <member name="shadow_atlas_quad_2" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="3"> + The subdivision amount of third quadrant on shadow atlas. </member> - <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv"> - The subdivision amount of fourth quadrant on shadow atlas. Default value: [code]SHADOW_ATLAS_QUADRANT_SUBDIV_64[/code]. + <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4"> + The subdivision amount of fourth quadrant on shadow atlas. </member> - <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size"> + <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0"> The resolution of shadow atlas. Both width and height is equal to one value. </member> - <member name="size" type="Vector2" setter="set_size" getter="get_size"> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 0, 0 )"> The width and height of viewport. </member> - <member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background"> - If [code]true[/code], the viewport should render its background as transparent. Default value: [code]false[/code]. + <member name="transparent_bg" type="bool" setter="set_transparent_background" getter="has_transparent_background" default="false"> + If [code]true[/code], the viewport should render its background as transparent. </member> - <member name="usage" type="int" setter="set_usage" getter="get_usage" enum="Viewport.Usage"> - The rendering mode of viewport. Default value: [code]USAGE_3D[/code]. + <member name="usage" type="int" setter="set_usage" getter="get_usage" enum="Viewport.Usage" default="2"> + The rendering mode of viewport. </member> - <member name="world" type="World" setter="set_world" getter="get_world"> + <member name="world" type="World" setter="set_world" getter="get_world" default="null"> The custom [World] which can be used as 3D environment source. </member> <member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d"> diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml index 1642f7e85f..e4c6091909 100644 --- a/doc/classes/ViewportContainer.xml +++ b/doc/classes/ViewportContainer.xml @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled"> - If [code]true[/code], the viewport will be scaled to the control's size. Default value:[code]false[/code]. + <member name="stretch" type="bool" setter="set_stretch" getter="is_stretch_enabled" default="false"> + If [code]true[/code], the viewport will be scaled to the control's size. </member> - <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink"> + <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1"> </member> </members> <constants> diff --git a/doc/classes/ViewportTexture.xml b/doc/classes/ViewportTexture.xml index ab3c2696aa..5b9eb6a8cb 100644 --- a/doc/classes/ViewportTexture.xml +++ b/doc/classes/ViewportTexture.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene"> + <member name="viewport_path" type="NodePath" setter="set_viewport_path_in_scene" getter="get_viewport_path_in_scene" default="NodePath("")"> The path to the [Viewport] node to display. This is relative to the scene root, not to the node which uses the texture. </member> </members> diff --git a/doc/classes/VisibilityEnabler.xml b/doc/classes/VisibilityEnabler.xml index 4b33d1ebce..4acb4d87c1 100644 --- a/doc/classes/VisibilityEnabler.xml +++ b/doc/classes/VisibilityEnabler.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisibilityEnabler" inherits="VisibilityNotifier" category="Core" version="3.2"> <brief_description> - Enable certain nodes only when visible. + Enables certain nodes only when visible. </brief_description> <description> The VisibilityEnabler will disable [RigidBody] and [AnimationPlayer] nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler itself. @@ -11,10 +11,10 @@ <methods> </methods> <members> - <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> If [code]true[/code], [RigidBody] nodes will be paused. </member> - <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> If [code]true[/code], [AnimationPlayer] nodes will be paused. </member> </members> diff --git a/doc/classes/VisibilityEnabler2D.xml b/doc/classes/VisibilityEnabler2D.xml index b3d41d1fce..dbea3f5de8 100644 --- a/doc/classes/VisibilityEnabler2D.xml +++ b/doc/classes/VisibilityEnabler2D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisibilityEnabler2D" inherits="VisibilityNotifier2D" category="Core" version="3.2"> <brief_description> - Enable certain nodes only when visible. + Enables certain nodes only when visible. </brief_description> <description> The VisibilityEnabler2D will disable [RigidBody2D], [AnimationPlayer], and other nodes when they are not visible. It will only affect other nodes within the same scene as the VisibilityEnabler2D itself. @@ -11,22 +11,22 @@ <methods> </methods> <members> - <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="freeze_bodies" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> If [code]true[/code], [RigidBody2D] nodes will be paused. </member> - <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="pause_animated_sprites" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> If [code]true[/code], [AnimatedSprite] nodes will be paused. </member> - <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="pause_animations" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> If [code]true[/code], [AnimationPlayer] nodes will be paused. </member> - <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="pause_particles" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="true"> If [code]true[/code], [Particles2D] nodes will be paused. </member> - <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="physics_process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="false"> If [code]true[/code], the parent's [method Node._physics_process] will be stopped. </member> - <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled"> + <member name="process_parent" type="bool" setter="set_enabler" getter="is_enabler_enabled" default="false"> If [code]true[/code], the parent's [method Node._process] will be stopped. </member> </members> diff --git a/doc/classes/VisibilityNotifier.xml b/doc/classes/VisibilityNotifier.xml index 986d6b8b13..4cbfa7ba76 100644 --- a/doc/classes/VisibilityNotifier.xml +++ b/doc/classes/VisibilityNotifier.xml @@ -14,12 +14,12 @@ </return> <description> If [code]true[/code], the bounding box is on the screen. - Note: It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. + [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. </description> </method> </methods> <members> - <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb"> + <member name="aabb" type="AABB" setter="set_aabb" getter="get_aabb" default="AABB( -1, -1, -1, 2, 2, 2 )"> The VisibilityNotifier's bounding box. </member> </members> diff --git a/doc/classes/VisibilityNotifier2D.xml b/doc/classes/VisibilityNotifier2D.xml index 787a33d752..7e1d933c44 100644 --- a/doc/classes/VisibilityNotifier2D.xml +++ b/doc/classes/VisibilityNotifier2D.xml @@ -14,12 +14,12 @@ </return> <description> If [code]true[/code], the bounding rectangle is on the screen. - Note: It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. + [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. </description> </method> </methods> <members> - <member name="rect" type="Rect2" setter="set_rect" getter="get_rect"> + <member name="rect" type="Rect2" setter="set_rect" getter="get_rect" default="Rect2( -10, -10, 20, 20 )"> The VisibilityNotifier2D's bounding rectangle. </member> </members> diff --git a/doc/classes/VisualInstance.xml b/doc/classes/VisualInstance.xml index 59f0a531dd..7576bf7ad8 100644 --- a/doc/classes/VisualInstance.xml +++ b/doc/classes/VisualInstance.xml @@ -49,7 +49,7 @@ </argument> <description> Sets the base of the VisualInstance, which changes how the engine handles the VisualInstance under the hood. - It is recommended to only use set_base if you know what you're doing. + It is recommended to only use [method set_base] if you know what you're doing. </description> </method> <method name="set_layer_mask_bit"> @@ -64,7 +64,7 @@ </method> </methods> <members> - <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask"> + <member name="layers" type="int" setter="set_layer_mask" getter="get_layer_mask" default="1"> The render layer(s) this VisualInstance is drawn on. This object will only be visible for [Camera]s whose cull mask includes the render object this VisualInstance is set to. </member> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 565d8b3ae0..5e054ce7ce 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -257,7 +257,7 @@ <argument index="3" name="normal_map" type="RID"> </argument> <description> - Adds a particles system to the [CanvasItem]'s draw commands. + Adds a particle system to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_add_polygon"> @@ -606,7 +606,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> - If this is enabled, the z-index of the parent will be added to the children's z-index. + If this is enabled, the Z index of the parent will be added to the children's Z index. </description> </method> <method name="canvas_item_set_z_index"> @@ -617,7 +617,7 @@ <argument index="1" name="z_index" type="int"> </argument> <description> - Sets the [CanvasItem]'s z-index, i.e. its draw order (lower indexes are drawn first). + Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first). </description> </method> <method name="canvas_light_attach_to_canvas"> @@ -675,7 +675,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> - The light mask. See [LightOccluder2D] for more information on light masks + The light mask. See [LightOccluder2D] for more information on light masks. </description> </method> <method name="canvas_light_occluder_set_polygon"> @@ -752,7 +752,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> - The light mask. See [LightOccluder2D] for more information on light masks + The light mask. See [LightOccluder2D] for more information on light masks. </description> </method> <method name="canvas_light_set_item_shadow_cull_mask"> @@ -763,7 +763,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> - The shadow mask. binary about which layers this canvas light affects which canvas item's shadows. See [LightOccluder2D] for more information on light masks. + The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks. </description> </method> <method name="canvas_light_set_layer_range"> @@ -787,7 +787,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode"> </argument> <description> - The mode of the light, see CANVAS_LIGHT_MODE_* constants. + The mode of the light, see [code]CANVAS_LIGHT_MODE_*[/code] constants. </description> </method> <method name="canvas_light_set_scale"> @@ -841,7 +841,7 @@ <argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter"> </argument> <description> - Sets the canvas light's shadow's filter, see CANVAS_LIGHT_SHADOW_FILTER_* constants. + Sets the canvas light's shadow's filter, see [code]CANVAS_LIGHT_SHADOW_FILTER_*[/code] constants. </description> </method> <method name="canvas_light_set_shadow_gradient_length"> @@ -863,7 +863,7 @@ <argument index="1" name="smooth" type="float"> </argument> <description> - Smoothens the shadow. The lower, the more smooth. + Smoothens the shadow. The lower, the smoother. </description> </method> <method name="canvas_light_set_texture"> @@ -924,7 +924,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode"> </argument> <description> - Sets an occluder polygons cull mode. See CANVAS_OCCLUDER_POLYGON_CULL_MODE_* constants. + Sets an occluder polygons cull mode. See [code]CANVAS_OCCLUDER_POLYGON_CULL_MODE_*[/code] constants. </description> </method> <method name="canvas_occluder_polygon_set_shape"> @@ -1330,7 +1330,7 @@ <argument index="0" name="info" type="int" enum="VisualServer.RenderInfo"> </argument> <description> - Returns a certain information, see RENDER_INFO_* for options. + Returns a certain information, see [code]RENDER_INFO_*[/code] for options. </description> </method> <method name="get_test_cube"> @@ -1952,7 +1952,7 @@ </argument> <description> Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. - Warning: this function is primarily intended for editor usage. For in-game use cases, prefer physics collision. + [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="light_directional_set_blend_splits"> @@ -2252,7 +2252,7 @@ <argument index="1" name="width" type="float"> </argument> <description> - Sets a materials line width. + Sets a material's line width. </description> </method> <method name="material_set_next_pass"> @@ -2263,7 +2263,7 @@ <argument index="1" name="next_material" type="RID"> </argument> <description> - Sets an objects next material. + Sets an object's next material. </description> </method> <method name="material_set_param"> @@ -2276,7 +2276,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets a materials parameter. + Sets a material's parameter. </description> </method> <method name="material_set_render_priority"> @@ -2315,7 +2315,7 @@ <argument index="4" name="compress_format" type="int" default="97280"> </argument> <description> - Adds a surface generated from the Arrays to a mesh. See PRIMITIVE_TYPE_* constants for types. + Adds a surface generated from the Arrays to a mesh. See [code]PRIMITIVE_TYPE_*[/code] constants for types. </description> </method> <method name="mesh_clear"> @@ -2477,7 +2477,7 @@ <argument index="1" name="surface" type="int"> </argument> <description> - Returns a mesh's surface's arrays for blend shapes + Returns a mesh's surface's arrays for blend shapes. </description> </method> <method name="mesh_surface_get_format" qualifiers="const"> @@ -3098,8 +3098,8 @@ <argument index="2" name="userdata" type="Variant"> </argument> <description> - Schedules a callback to the corresponding named 'method' on 'where' after a frame has been drawn. - The callback method must use only 1 argument which will be called with 'userdata'. + Schedules a callback to the corresponding named [code]method[/code] on [code]where[/code] after a frame has been drawn. + The callback method must use only 1 argument which will be called with [code]userdata[/code]. </description> </method> <method name="scenario_create"> @@ -3527,7 +3527,7 @@ <argument index="1" name="flags" type="int"> </argument> <description> - Sets the texture's flags. See [enum TextureFlags] for options + Sets the texture's flags. See [enum TextureFlags] for options. </description> </method> <method name="texture_set_path"> @@ -3639,7 +3639,7 @@ <argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo"> </argument> <description> - Returns a viewport's render info. for options see VIEWPORT_RENDER_INFO* constants. + Returns a viewport's render information. For options, see the [code]VIEWPORT_RENDER_INFO*[/code] constants. </description> </method> <method name="viewport_get_texture" qualifiers="const"> @@ -3797,7 +3797,7 @@ <argument index="1" name="msaa" type="int" enum="VisualServer.ViewportMSAA"> </argument> <description> - Sets the anti-aliasing mode. see [enum ViewportMSAA] for options. + Sets the anti-aliasing mode. See [enum ViewportMSAA] for options. </description> </method> <method name="viewport_set_parent_viewport"> @@ -3986,29 +3986,29 @@ <constant name="TEXTURE_TYPE_3D" value="3" enum="TextureType"> </constant> <constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags"> - Generate mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. + Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. </constant> <constant name="TEXTURE_FLAG_REPEAT" value="2" enum="TextureFlags"> - Repeat (instead of clamp to edge). + Repeats the texture (instead of clamp to edge). </constant> <constant name="TEXTURE_FLAG_FILTER" value="4" enum="TextureFlags"> - Turn on magnifying filter, to enable smooth zooming in of the texture. + Uses a magnifying filter, to enable smooth zooming in of the texture. </constant> <constant name="TEXTURE_FLAG_ANISOTROPIC_FILTER" value="8" enum="TextureFlags"> - Anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. - More effective on planes often shown going to the horrizon as those textures (Walls or Ground for example) get squashed in the viewport to different aspect ratios and regular mipmaps keep the aspect ratio so they don't optimize storage that well in those cases. + Uses anisotropic mipmap filtering. Generates smaller versions of the same texture with different aspect ratios. + This results in better-looking textures when viewed from oblique angles. </constant> <constant name="TEXTURE_FLAG_CONVERT_TO_LINEAR" value="16" enum="TextureFlags"> - Converts texture to SRGB color space. + Converts the texture to the sRGB color space. </constant> <constant name="TEXTURE_FLAG_MIRRORED_REPEAT" value="32" enum="TextureFlags"> - Repeat texture with alternate sections mirrored. + Repeats the texture with alternate sections mirrored. </constant> <constant name="TEXTURE_FLAG_USED_FOR_STREAMING" value="2048" enum="TextureFlags"> Texture is a video surface. </constant> <constant name="TEXTURE_FLAGS_DEFAULT" value="7" enum="TextureFlags"> - Default flags. Generate mipmaps, repeat, and filter are enabled. + Default flags. [constant TEXTURE_FLAG_MIPMAPS], [constant TEXTURE_FLAG_REPEAT] and [constant TEXTURE_FLAG_FILTER] are enabled. </constant> <constant name="SHADER_SPATIAL" value="0" enum="ShaderMode"> Shader is a 3D shader. @@ -4035,10 +4035,10 @@ Array is a color array. </constant> <constant name="ARRAY_TEX_UV" value="4" enum="ArrayType"> - Array is a uv coordinates array. + Array is an UV coordinates array. </constant> <constant name="ARRAY_TEX_UV2" value="5" enum="ArrayType"> - Array is a uv coordinates array for the second uv coordinates. + Array is an UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_BONES" value="6" enum="ArrayType"> Array contains bone information. @@ -4065,10 +4065,10 @@ Flag used to mark a color array. </constant> <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> - Flag used to mark a uv coordinates array. + Flag used to mark an UV coordinates array. </constant> <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> - Flag used to mark a uv coordinates array for the second uv coordinates. + Flag used to mark an UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_FORMAT_BONES" value="64" enum="ArrayFormat"> Flag used to mark a bone information array. @@ -4077,7 +4077,7 @@ Flag used to mark a weights array. </constant> <constant name="ARRAY_FORMAT_INDEX" value="256" enum="ArrayFormat"> - Flag used to mark a index array. + Flag used to mark an index array. </constant> <constant name="ARRAY_COMPRESS_VERTEX" value="512" enum="ArrayFormat"> Flag used to mark a compressed (half float) vertex array. @@ -4092,10 +4092,10 @@ Flag used to mark a compressed (half float) color array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV" value="8192" enum="ArrayFormat"> - Flag used to mark a compressed (half float) uv coordinates array. + Flag used to mark a compressed (half float) UV coordinates array. </constant> <constant name="ARRAY_COMPRESS_TEX_UV2" value="16384" enum="ArrayFormat"> - Flag used to mark a compressed (half float) uv coordinates array for the second uv coordinates. + Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> </constant> @@ -4108,10 +4108,10 @@ Flag used to mark that the array contains 2D vertices. </constant> <constant name="ARRAY_FLAG_USE_16_BIT_BONES" value="524288" enum="ArrayFormat"> - Flag used to mark that the array uses 16 bit bones instead of 8 bit. + Flag used to mark that the array uses 16-bit bones instead of 8-bit. </constant> <constant name="ARRAY_COMPRESS_DEFAULT" value="97280" enum="ArrayFormat"> - Used to set flags ARRAY_COMPRESS_VERTEX, ARRAY_COMPRESS_NORMAL, ARRAY_COMPRESS_TANGENT, ARRAY_COMPRESS_COLOR, ARRAY_COMPRESS_TEX_UV, ARRAY_COMPRESS_TEX_UV2 and ARRAY_COMPRESS_WEIGHTS quickly. + Used to set flags [constant ARRAY_COMPRESS_VERTEX], [constant ARRAY_COMPRESS_NORMAL], [constant ARRAY_COMPRESS_TANGENT], [constant ARRAY_COMPRESS_COLOR], [constant ARRAY_COMPRESS_TEX_UV], [constant ARRAY_COMPRESS_TEX_UV2] and [constant ARRAY_COMPRESS_WEIGHTS] quickly. </constant> <constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType"> Primitive to draw consists of points. @@ -4145,10 +4145,10 @@ Is a directional (sun) light. </constant> <constant name="LIGHT_OMNI" value="1" enum="LightType"> - is an omni light. + Is an omni light. </constant> <constant name="LIGHT_SPOT" value="2" enum="LightType"> - is an spot light. + Is a spot light. </constant> <constant name="LIGHT_PARAM_ENERGY" value="0" enum="LightParam"> The light's energy. @@ -4227,16 +4227,16 @@ Multisample antialiasing is disabled. </constant> <constant name="VIEWPORT_MSAA_2X" value="1" enum="ViewportMSAA"> - Multisample antialiasing is set to 2X. + Multisample antialiasing is set to 2×. </constant> <constant name="VIEWPORT_MSAA_4X" value="2" enum="ViewportMSAA"> - Multisample antialiasing is set to 4X. + Multisample antialiasing is set to 4×. </constant> <constant name="VIEWPORT_MSAA_8X" value="3" enum="ViewportMSAA"> - Multisample antialiasing is set to 8X. + Multisample antialiasing is set to 8×. </constant> <constant name="VIEWPORT_MSAA_16X" value="4" enum="ViewportMSAA"> - Multisample antialiasing is set to 16X. + Multisample antialiasing is set to 16×. </constant> <constant name="VIEWPORT_USAGE_2D" value="0" enum="ViewportUsage"> The Viewport does not render 3D but samples. diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 0c9292930d..4bd3de4fc8 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -183,7 +183,7 @@ </method> </methods> <members> - <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset"> + <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 4fa80d8c82..19495a8859 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -27,9 +27,9 @@ </method> </methods> <members> - <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values"> + <member name="default_input_values" type="Array" setter="_set_default_input_values" getter="_get_default_input_values" default="[ 0, Vector3( 0, 0, 0 ) ]"> </member> - <member name="output_port_for_preview" type="int" setter="set_output_port_for_preview" getter="get_output_port_for_preview"> + <member name="output_port_for_preview" type="int" setter="set_output_port_for_preview" getter="get_output_port_for_preview" default="-1"> </member> </members> <signals> diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml index fd406db053..b46905cfea 100644 --- a/doc/classes/VisualShaderNodeBooleanConstant.xml +++ b/doc/classes/VisualShaderNodeBooleanConstant.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="constant" type="bool" setter="set_constant" getter="get_constant"> + <member name="constant" type="bool" setter="set_constant" getter="get_constant" default="false"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml index d9a927e75d..282966a9ca 100644 --- a/doc/classes/VisualShaderNodeColorConstant.xml +++ b/doc/classes/VisualShaderNodeColorConstant.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="constant" type="Color" setter="set_constant" getter="get_constant"> + <member name="constant" type="Color" setter="set_constant" getter="get_constant" default="Color( 1, 1, 1, 1 )"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index 23223587a5..b37a669ee9 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeColorFunc.Function"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeColorFunc.Function" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml index b78efa2adc..77c5361f4d 100644 --- a/doc/classes/VisualShaderNodeColorOp.xml +++ b/doc/classes/VisualShaderNodeColorOp.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeColorOp.Operator"> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeColorOp.Operator" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeCubeMap.xml b/doc/classes/VisualShaderNodeCubeMap.xml index 09f68a0e9a..9a4cb5b17c 100644 --- a/doc/classes/VisualShaderNodeCubeMap.xml +++ b/doc/classes/VisualShaderNodeCubeMap.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map"> + <member name="cube_map" type="CubeMap" setter="set_cube_map" getter="get_cube_map" default="null"> </member> - <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType"> + <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeCubeMap.TextureType" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeExpression.xml b/doc/classes/VisualShaderNodeExpression.xml index 8a5477280f..ddb85d7e43 100644 --- a/doc/classes/VisualShaderNodeExpression.xml +++ b/doc/classes/VisualShaderNodeExpression.xml @@ -15,7 +15,7 @@ </method> </methods> <members> - <member name="expression" type="String" setter="set_expression" getter="get_expression"> + <member name="expression" type="String" setter="set_expression" getter="get_expression" default=""""> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 32398b8545..25fd2ec8d8 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="input_name" type="String" setter="set_input_name" getter="get_input_name"> + <member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default=""[None]""> </member> </members> <signals> diff --git a/doc/classes/VisualShaderNodeScalarConstant.xml b/doc/classes/VisualShaderNodeScalarConstant.xml index b18ac46fbd..0af09e74e3 100644 --- a/doc/classes/VisualShaderNodeScalarConstant.xml +++ b/doc/classes/VisualShaderNodeScalarConstant.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="constant" type="float" setter="set_constant" getter="get_constant"> + <member name="constant" type="float" setter="set_constant" getter="get_constant" default="0.0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml index 6c3eb95b6f..09e2d2fa72 100644 --- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarDerivativeFunc.Function"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarDerivativeFunc.Function" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeScalarFunc.xml b/doc/classes/VisualShaderNodeScalarFunc.xml index b0ee422bbd..ef52086d6e 100644 --- a/doc/classes/VisualShaderNodeScalarFunc.xml +++ b/doc/classes/VisualShaderNodeScalarFunc.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeScalarFunc.Function" default="13"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeScalarOp.xml b/doc/classes/VisualShaderNodeScalarOp.xml index b2939a55ee..0aa692c228 100644 --- a/doc/classes/VisualShaderNodeScalarOp.xml +++ b/doc/classes/VisualShaderNodeScalarOp.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator"> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeScalarOp.Operator" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index 7a73868c2b..1f4d3b16d1 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -9,11 +9,11 @@ <methods> </methods> <members> - <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source"> + <member name="source" type="int" setter="set_source" getter="get_source" enum="VisualShaderNodeTexture.Source" default="0"> </member> - <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture" default="null"> </member> - <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTexture.TextureType"> + <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTexture.TextureType" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index 9312c24fe7..3d58ec88c5 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureUniform.ColorDefault"> + <member name="color_default" type="int" setter="set_color_default" getter="get_color_default" enum="VisualShaderNodeTextureUniform.ColorDefault" default="0"> </member> - <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureUniform.TextureType"> + <member name="texture_type" type="int" setter="set_texture_type" getter="get_texture_type" enum="VisualShaderNodeTextureUniform.TextureType" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index 5b4c046ce1..b184a3d337 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="constant" type="Transform" setter="set_constant" getter="get_constant"> + <member name="constant" type="Transform" setter="set_constant" getter="get_constant" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index e74f449212..7fb17b1a79 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeTransformFunc.Function"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeTransformFunc.Function" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml index 6082434beb..0406050025 100644 --- a/doc/classes/VisualShaderNodeTransformMult.xml +++ b/doc/classes/VisualShaderNodeTransformMult.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformMult.Operator"> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformMult.Operator" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index 46d3be2ded..881d0cf3cf 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformVecMult.Operator"> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformVecMult.Operator" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml index 09371f91de..6835a30baa 100644 --- a/doc/classes/VisualShaderNodeUniform.xml +++ b/doc/classes/VisualShaderNodeUniform.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name"> + <member name="uniform_name" type="String" setter="set_uniform_name" getter="get_uniform_name" default=""""> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml index 1ea7e8115e..b17f56e1f8 100644 --- a/doc/classes/VisualShaderNodeVec3Constant.xml +++ b/doc/classes/VisualShaderNodeVec3Constant.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="constant" type="Vector3" setter="set_constant" getter="get_constant"> + <member name="constant" type="Vector3" setter="set_constant" getter="get_constant" default="Vector3( 0, 0, 0 )"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml index 678df0fe3b..56f89ffc38 100644 --- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorDerivativeFunc.Function"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorDerivativeFunc.Function" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index e67cb2e07f..3725a43395 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorFunc.Function"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeVectorFunc.Function" default="0"> </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml index cfcd16bbff..0ec49a3845 100644 --- a/doc/classes/VisualShaderNodeVectorOp.xml +++ b/doc/classes/VisualShaderNodeVectorOp.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeVectorOp.Operator"> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeVectorOp.Operator" default="0"> </member> </members> <constants> diff --git a/doc/classes/WindowDialog.xml b/doc/classes/WindowDialog.xml index c5d66af984..595aaeecee 100644 --- a/doc/classes/WindowDialog.xml +++ b/doc/classes/WindowDialog.xml @@ -18,10 +18,10 @@ </method> </methods> <members> - <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable"> - If [code]true[/code], the user can resize the window. Default value: [code]false[/code]. + <member name="resizable" type="bool" setter="set_resizable" getter="get_resizable" default="false"> + If [code]true[/code], the user can resize the window. </member> - <member name="window_title" type="String" setter="set_title" getter="get_title"> + <member name="window_title" type="String" setter="set_title" getter="get_title" default=""""> The text displayed in the window's title bar. </member> </members> @@ -30,21 +30,21 @@ <theme_items> <theme_item name="close" type="Texture"> </theme_item> - <theme_item name="close_h_ofs" type="int"> + <theme_item name="close_h_ofs" type="int" default="18"> </theme_item> <theme_item name="close_highlight" type="Texture"> </theme_item> - <theme_item name="close_v_ofs" type="int"> + <theme_item name="close_v_ofs" type="int" default="18"> </theme_item> <theme_item name="panel" type="StyleBox"> </theme_item> - <theme_item name="scaleborder_size" type="int"> + <theme_item name="scaleborder_size" type="int" default="4"> </theme_item> - <theme_item name="title_color" type="Color"> + <theme_item name="title_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> <theme_item name="title_font" type="Font"> </theme_item> - <theme_item name="title_height" type="int"> + <theme_item name="title_height" type="int" default="20"> </theme_item> </theme_items> </class> diff --git a/doc/classes/World.xml b/doc/classes/World.xml index c8e6944b83..adb3286c51 100644 --- a/doc/classes/World.xml +++ b/doc/classes/World.xml @@ -15,10 +15,10 @@ <member name="direct_space_state" type="PhysicsDirectSpaceState" setter="" getter="get_direct_space_state"> The World's physics direct space state, used for making various queries. Might be used only during [code]_physics_process[/code]. </member> - <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> + <member name="environment" type="Environment" setter="set_environment" getter="get_environment" default="null"> The World's [Environment]. </member> - <member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment"> + <member name="fallback_environment" type="Environment" setter="set_fallback_environment" getter="get_fallback_environment" default="null"> The World's fallback_environment will be used if the World's [Environment] fails or is missing. </member> <member name="scenario" type="RID" setter="" getter="get_scenario"> diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index b4524bfea0..a2a454d1b3 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -14,7 +14,7 @@ <methods> </methods> <members> - <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> + <member name="environment" type="Environment" setter="set_environment" getter="get_environment" default="null"> The [Environment] resource used by this [WorldEnvironment], defining the default properties. </member> </members> diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 55dfb5d489..6989246e24 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="XMLParser" inherits="Reference" category="Core" version="3.2"> <brief_description> - Low-level class for creating parsers for XML files. + Low-level class for creating parsers for [url=https://en.wikipedia.org/wiki/XML]XML[/url] files. </brief_description> <description> - This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low level so it can be applied to any possible schema. + This class can serve as base to make custom XML parsers. Since XML is a very flexible standard, this interface is low-level so it can be applied to any possible schema. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <return type="int"> </return> <description> - Get the amount of attributes in the current element. + Gets the amount of attributes in the current element. </description> </method> <method name="get_attribute_name" qualifiers="const"> @@ -22,7 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the name of the attribute specified by the index in [code]idx[/code] argument. + Gets the name of the attribute specified by the index in [code]idx[/code] argument. </description> </method> <method name="get_attribute_value" qualifiers="const"> @@ -31,14 +31,14 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Get the value of the attribute specified by the index in [code]idx[/code] argument. + Gets the value of the attribute specified by the index in [code]idx[/code] argument. </description> </method> <method name="get_current_line" qualifiers="const"> <return type="int"> </return> <description> - Get the current line in the parsed file (currently not implemented). + Gets the current line in the parsed file (currently not implemented). </description> </method> <method name="get_named_attribute_value" qualifiers="const"> @@ -47,7 +47,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Get the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. + Gets the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. </description> </method> <method name="get_named_attribute_value_safe" qualifiers="const"> @@ -56,35 +56,35 @@ <argument index="0" name="name" type="String"> </argument> <description> - Get the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found. + Gets the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found. </description> </method> <method name="get_node_data" qualifiers="const"> <return type="String"> </return> <description> - Get the contents of a text node. This will raise an error in any other type of node. + Gets the contents of a text node. This will raise an error in any other type of node. </description> </method> <method name="get_node_name" qualifiers="const"> <return type="String"> </return> <description> - Get the name of the current element node. This will raise an error if the current node type is not [constant NODE_ELEMENT] nor [constant NODE_ELEMENT_END] + Gets the name of the current element node. This will raise an error if the current node type is neither [constant NODE_ELEMENT] nor [constant NODE_ELEMENT_END]. </description> </method> <method name="get_node_offset" qualifiers="const"> <return type="int"> </return> <description> - Get the byte offset of the current node since the beginning of the file or buffer. + Gets the byte offset of the current node since the beginning of the file or buffer. </description> </method> <method name="get_node_type"> <return type="int" enum="XMLParser.NodeType"> </return> <description> - Get the type of the current node. Compare with [code]NODE_*[/code] constants. + Gets the type of the current node. Compare with [code]NODE_*[/code] constants. </description> </method> <method name="has_attribute" qualifiers="const"> @@ -93,14 +93,14 @@ <argument index="0" name="name" type="String"> </argument> <description> - Check whether or not the current element has a certain attribute. + Check whether the current element has a certain attribute. </description> </method> <method name="is_empty" qualifiers="const"> <return type="bool"> </return> <description> - Check whether the current element is empty (this only works for completely empty tags, e.g. <element \>). + Check whether the current element is empty (this only works for completely empty tags, e.g. [code]<element \>[/code]). </description> </method> <method name="open"> @@ -109,7 +109,7 @@ <argument index="0" name="file" type="String"> </argument> <description> - Open a XML file for parsing. This returns an error code. + Opens an XML file for parsing. This returns an error code. </description> </method> <method name="open_buffer"> @@ -118,14 +118,14 @@ <argument index="0" name="buffer" type="PoolByteArray"> </argument> <description> - Open a XML raw buffer for parsing. This returns an error code. + Opens an XML raw buffer for parsing. This returns an error code. </description> </method> <method name="read"> <return type="int" enum="Error"> </return> <description> - Read the next node of the file. This returns an error code. + Reads the next node of the file. This returns an error code. </description> </method> <method name="seek"> @@ -134,7 +134,7 @@ <argument index="0" name="position" type="int"> </argument> <description> - Move the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. + Moves the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. </description> </method> <method name="skip_section"> diff --git a/doc/classes/YSort.xml b/doc/classes/YSort.xml index b9f3fa914b..6045a5713c 100644 --- a/doc/classes/YSort.xml +++ b/doc/classes/YSort.xml @@ -12,8 +12,8 @@ <methods> </methods> <members> - <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled"> - If [code]true[/code], child nodes are sorted, otherwise sorting is disabled. Default: [code]true[/code]. + <member name="sort_enabled" type="bool" setter="set_sort_enabled" getter="is_sort_enabled" default="true"> + If [code]true[/code], child nodes are sorted, otherwise sorting is disabled. </member> </members> <constants> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 9ed029a500..533963b460 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="bool" category="Built-In Types" version="3.2"> <brief_description> - Boolean built-in type + Boolean built-in type. </brief_description> <description> Boolean built-in type. @@ -24,7 +24,7 @@ <argument index="0" name="from" type="float"> </argument> <description> - Cast a [float] value to a boolean value, this method will return [code]true[/code] if called with a floating point value different to 0 and [code]false[/code] in other case. + Cast a [float] value to a boolean value, this method will return [code]true[/code] if called with a floating-point value different to 0 and [code]false[/code] in other case. </description> </method> <method name="bool"> @@ -33,7 +33,7 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a boolean value, this method will return [code]true[/code] if called with a non empty string and [code]false[/code] in other case. Examples: [code]bool('False')[/code] returns [code]true[/code], [code]bool('')[/code] returns [code]false[/code]. + Cast a [String] value to a boolean value, this method will return [code]true[/code] if called with a non-empty string and [code]false[/code] in other case. Examples: [code]bool("False")[/code] returns [code]true[/code], [code]bool("")[/code] returns [code]false[/code]. </description> </method> </methods> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 506fb643e1..4c4ea83157 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -15,7 +15,7 @@ <argument index="0" name="from" type="bool"> </argument> <description> - Cast a [bool] value to a floating point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. + Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. </description> </method> <method name="float"> @@ -24,7 +24,7 @@ <argument index="0" name="from" type="int"> </argument> <description> - Cast an [int] value to a floating point value, [code]float(1)[/code] will be equal to 1.0. + Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to 1.0. </description> </method> <method name="float"> @@ -33,7 +33,7 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a floating point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. + Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. </description> </method> </methods> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 454c71d3c7..763c29ab4e 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -37,12 +37,13 @@ class TypeName: class PropertyDef: - def __init__(self, name, type_name, setter, getter, text): # type: (str, TypeName, Optional[str], Optional[str], Optional[str]) -> None + def __init__(self, name, type_name, setter, getter, text, default_value): # type: (str, TypeName, Optional[str], Optional[str], Optional[str], Optional[str]) -> None self.name = name self.type_name = type_name self.setter = setter self.getter = getter self.text = text + self.default_value = default_value class ParameterDef: def __init__(self, name, type_name, default_value): # type: (str, TypeName, Optional[str]) -> None @@ -81,9 +82,10 @@ class EnumDef: class ThemeItemDef: - def __init__(self, name, type_name): # type: (str, TypeName) -> None + def __init__(self, name, type_name, default_value): # type: (str, TypeName, Optional[str]) -> None self.name = name self.type_name = type_name + self.default_value = default_value class ClassDef: @@ -144,8 +146,9 @@ class State: type_name = TypeName.from_element(property) setter = property.get("setter") or None # Use or None so '' gets turned into None. getter = property.get("getter") or None + default_value = property.get("default") or None - property_def = PropertyDef(property_name, type_name, setter, getter, property.text) + property_def = PropertyDef(property_name, type_name, setter, getter, property.text, default_value) class_def.properties[property_name] = property_def methods = class_root.find("methods") @@ -230,7 +233,8 @@ class State: assert theme_item.tag == "theme_item" theme_item_name = theme_item.attrib["name"] - theme_item_def = ThemeItemDef(theme_item_name, TypeName.from_element(theme_item)) + default_value = theme_item.get("default") or None + theme_item_def = ThemeItemDef(theme_item_name, TypeName.from_element(theme_item), default_value) if theme_item_name not in class_def.theme_items: class_def.theme_items[theme_item_name] = [] class_def.theme_items[theme_item_name].append(theme_item_def) @@ -400,8 +404,9 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S for property_def in class_def.properties.values(): type_rst = property_def.type_name.to_rst(state) ref = ":ref:`{0}<class_{1}_property_{0}>`".format(property_def.name, class_name) - ml.append((type_rst, ref)) - format_table(f, ml) + default = property_def.default_value + ml.append((type_rst, ref, default)) + format_table(f, ml, True) # Methods overview if len(class_def.methods) > 0: @@ -415,11 +420,11 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S # Theme properties if class_def.theme_items is not None and len(class_def.theme_items) > 0: f.write(make_heading('Theme Properties', '-')) - ml = [] + pl = [] for theme_item_list in class_def.theme_items.values(): for theme_item in theme_item_list: - ml.append((theme_item.type_name.to_rst(state), theme_item.name)) - format_table(f, ml) + pl.append((theme_item.type_name.to_rst(state), theme_item.name, theme_item.default_value)) + format_table(f, pl, True) # Signals if len(class_def.signals) > 0: @@ -488,14 +493,16 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write(".. _class_{}_property_{}:\n\n".format(class_name, property_def.name)) f.write('- {} **{}**\n\n'.format(property_def.type_name.to_rst(state), property_def.name)) - setget = [] + info = [] + if property_def.default_value is not None: + info.append(("*Default*", property_def.default_value)) if property_def.setter is not None and not property_def.setter.startswith("_"): - setget.append(("*Setter*", property_def.setter + '(value)')) + info.append(("*Setter*", property_def.setter + '(value)')) if property_def.getter is not None and not property_def.getter.startswith("_"): - setget.append(('*Getter*', property_def.getter + '()')) + info.append(('*Getter*', property_def.getter + '()')) - if len(setget) > 0: - format_table(f, setget) + if len(info) > 0: + format_table(f, info) if property_def.text is not None and property_def.text.strip() != '': f.write(rstize_text(property_def.text.strip(), state)) @@ -873,33 +880,33 @@ def rstize_text(text, state): # type: (str, State) -> str return text -def format_table(f, pp): # type: (TextIO, Iterable[Tuple[str, ...]]) -> None - longest_t = 0 - longest_s = 0 - for s in pp: - sl = len(s[0]) - if sl > longest_s: - longest_s = sl - tl = len(s[1]) - if tl > longest_t: - longest_t = tl - - sep = "+" - for i in range(longest_s + 2): - sep += "-" - sep += "+" - for i in range(longest_t + 2): - sep += "-" +def format_table(f, data, remove_empty_columns=False): # type: (TextIO, Iterable[Tuple[str, ...]]) -> None + if len(data) == 0: + return + + column_sizes = [0] * len(data[0]) + for row in data: + for i, text in enumerate(row): + text_length = len(text or '') + if text_length > column_sizes[i]: + column_sizes[i] = text_length + + sep = "" + for size in column_sizes: + if size == 0 and remove_empty_columns: + continue + sep += "+" + "-" * (size + 2) sep += "+\n" f.write(sep) - for s in pp: - rt = s[0] - while len(rt) < longest_s: - rt += " " - st = s[1] - while len(st) < longest_t: - st += " " - f.write("| " + rt + " | " + st + " |\n") + + for row in data: + row_text = "|" + for i, text in enumerate(row): + if column_sizes[i] == 0 and remove_empty_columns: + continue + row_text += " " + (text or '').ljust(column_sizes[i]) + " |" + row_text += "\n" + f.write(row_text) f.write(sep) f.write('\n') diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 2aef913ae8..ca222362e7 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -262,7 +262,7 @@ void light_compute( #endif SRGB_APPROX(specular_brdf_NL) - specular_interp += specular_brdf_NL * light_color * attenuation; + specular_interp += specular_brdf_NL * light_color * attenuation * (1.0 / M_PI); } } @@ -1641,18 +1641,30 @@ FRAGMENT_SHADER_CODE #endif // defined(USE_REFLECTION_PROBE1) || defined(USE_REFLECTION_PROBE2) - // scales the specular reflections, needs to be 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 - 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, eye_position), 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; + // environment BRDF approximation - vec3 f0 = F0(metallic, specular, albedo); - specular_light *= env.x * f0 + env.y; + { + +#if defined(DIFFUSE_TOON) + //simplify for toon, as + specular_light *= specular * metallic * albedo * 2.0; +#else + + // scales the specular reflections, needs to be 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 + 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, eye_position), 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; + + vec3 f0 = F0(metallic, specular, albedo); + specular_light *= env.x * f0 + env.y; + +#endif + } #ifdef USE_LIGHTMAP //ambient light will come entirely from lightmap is lightmap is used @@ -2048,6 +2060,17 @@ FRAGMENT_SHADER_CODE specular_light += specular_interp * specular_blob_intensity * light_att; diffuse_light += diffuse_interp * albedo * light_att; + // Same as above, needed for VERTEX_LIGHTING or else lights are too bright + 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, eye_position), 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; + + vec3 f0 = F0(metallic, specular, albedo); + specular_light *= env.x * f0 + env.y; + #else //fragment lighting light_compute( @@ -2115,16 +2138,6 @@ FRAGMENT_SHADER_CODE diffuse_light *= 1.0 - metallic; ambient_light *= 1.0 - metallic; - // environment BRDF approximation - - { - -#if defined(DIFFUSE_TOON) - //simplify for toon, as - specular_light *= specular * metallic * albedo * 2.0; -#endif - } - gl_FragColor = vec4(ambient_light + diffuse_light + specular_light, alpha); //add emission if in base pass diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 0f6db2dfb8..b280898188 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -4644,7 +4644,6 @@ Transform2D RasterizerStorageGLES3::multimesh_instance_get_transform_2d(RID p_mu } Color RasterizerStorageGLES3::multimesh_instance_get_color(RID p_multimesh, int p_index) const { - MultiMesh *multimesh = multimesh_owner.getornull(p_multimesh); ERR_FAIL_COND_V(!multimesh, Color()); ERR_FAIL_INDEX_V(p_index, multimesh->size, Color()); diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp index 950979a78e..251bab5783 100644 --- a/drivers/unix/dir_access_unix.cpp +++ b/drivers/unix/dir_access_unix.cpp @@ -313,7 +313,7 @@ Error DirAccessUnix::change_dir(String p_dir) { // try_dir is the directory we are trying to change into String try_dir = ""; if (p_dir.is_rel_path()) { - String next_dir = current_dir + "/" + p_dir; + String next_dir = current_dir.plus_file(p_dir); next_dir = next_dir.simplify_path(); try_dir = next_dir; } else { diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index 39ca9a823e..ce66f07a19 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -56,7 +56,6 @@ #endif // MINGW hack #endif #else // UNIX -#include <net/if.h> #include <netdb.h> #ifdef ANDROID_ENABLED // We could drop this file once we up our API level to 24, @@ -73,6 +72,7 @@ #ifdef __FreeBSD__ #include <netinet/in.h> #endif +#include <net/if.h> // Order is important on OpenBSD, leave as last #endif static IP_Address _sockaddr2ip(struct sockaddr *p_addr) { diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index c10443acde..f8e771aea0 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -55,10 +55,6 @@ #include <netinet/tcp.h> -#if defined(__APPLE__) -#define MSG_NOSIGNAL SO_NOSIGPIPE -#endif - // BSD calls this flag IPV6_JOIN_GROUP #if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP) #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP @@ -87,10 +83,6 @@ #define SOCK_IOCTL ioctlsocket #define SOCK_CLOSE closesocket -// Windows doesn't have this flag -#ifndef MSG_NOSIGNAL -#define MSG_NOSIGNAL 0 -#endif // Workaround missing flag in MinGW #if defined(__MINGW32__) && !defined(SIO_UDP_NETRESET) #define SIO_UDP_NETRESET _WSAIOW(IOC_VENDOR, 15) @@ -342,6 +334,13 @@ Error NetSocketPosix::open(Type p_sock_type, IP::Type &ip_type) { } } #endif +#if defined(SO_NOSIGPIPE) + // Disable SIGPIPE (should only be relevant to stream sockets, but seems to affect UDP too on iOS) + int par = 1; + if (setsockopt(_sock, SOL_SOCKET, SO_NOSIGPIPE, SOCK_CBUF(&par), sizeof(int)) != 0) { + print_verbose("Unable to turn off SIGPIPE on socket"); + } +#endif return OK; } @@ -546,8 +545,10 @@ Error NetSocketPosix::send(const uint8_t *p_buffer, int p_len, int &r_sent) { ERR_FAIL_COND_V(!is_open(), ERR_UNCONFIGURED); int flags = 0; +#ifdef MSG_NOSIGNAL if (_is_stream) flags = MSG_NOSIGNAL; +#endif r_sent = ::send(_sock, SOCK_CBUF(p_buffer), p_len, flags); if (r_sent < 0) { @@ -683,10 +684,10 @@ Ref<NetSocket> NetSocketPosix::accept(IP_Address &r_ip, uint16_t &r_port) { return Ref<NetSocket>(ns); } -Error NetSocketPosix::join_multicast_group(const IP_Address &p_ip, String p_if_name) { - return _change_multicast_group(p_ip, p_if_name, true); +Error NetSocketPosix::join_multicast_group(const IP_Address &p_multi_address, String p_if_name) { + return _change_multicast_group(p_multi_address, p_if_name, true); } -Error NetSocketPosix::leave_multicast_group(const IP_Address &p_ip, String p_if_name) { - return _change_multicast_group(p_ip, p_if_name, false); +Error NetSocketPosix::leave_multicast_group(const IP_Address &p_multi_address, String p_if_name) { + return _change_multicast_group(p_multi_address, p_if_name, false); } diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp index e524dffd43..14ea18f885 100644 --- a/editor/animation_bezier_editor.cpp +++ b/editor/animation_bezier_editor.cpp @@ -275,8 +275,6 @@ void AnimationBezierTrackEdit::_notification(int p_what) { int margin = 0; { - int ofs = 0; - NodePath path = animation->track_get_path(track); Node *node = NULL; @@ -290,6 +288,8 @@ void AnimationBezierTrackEdit::_notification(int p_what) { int h = font->get_height(); if (node) { + int ofs = 0; + Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(node, "Node"); h = MAX(h, icon->get_height()); diff --git a/editor/animation_track_editor_plugins.cpp b/editor/animation_track_editor_plugins.cpp index 07dbc1fd81..226eef9c1e 100644 --- a/editor/animation_track_editor_plugins.cpp +++ b/editor/animation_track_editor_plugins.cpp @@ -1009,7 +1009,7 @@ void AnimationTrackEditTypeAudio::drop_data(const Point2 &p_point, const Variant } } - return AnimationTrackEdit::drop_data(p_point, p_data); + AnimationTrackEdit::drop_data(p_point, p_data); } void AnimationTrackEditTypeAudio::_gui_input(const Ref<InputEvent> &p_event) { diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index 848921d870..ed50c7914e 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -166,6 +166,8 @@ bool FindReplaceBar::_search(uint32_t p_flags, int p_from_line, int p_from_col) result_line = -1; result_col = -1; text_edit->set_search_text(""); + text_edit->set_search_flags(p_flags); + text_edit->set_current_search_result(line, col); set_error(text.empty() ? "" : TTR("No Matches")); } diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp index 4bc9dff26c..57c00e1bef 100644 --- a/editor/collada/collada.cpp +++ b/editor/collada/collada.cpp @@ -308,7 +308,7 @@ void Collada::_parse_image(XMLParser &parser) { String path = parser.get_attribute_value("source").strip_edges(); if (path.find("://") == -1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path.percent_decode()); + image.path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path.percent_decode())); } } else { @@ -325,7 +325,7 @@ void Collada::_parse_image(XMLParser &parser) { if (path.find("://") == -1 && path.is_rel_path()) { // path is relative to file being loaded, so convert to a resource path - path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir() + "/" + path); + path = ProjectSettings::get_singleton()->localize_path(state.local_path.get_base_dir().plus_file(path)); } else if (path.find("file:///") == 0) { path = path.replace_first("file:///", ""); diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp index e84602b29f..547d627925 100644 --- a/editor/create_dialog.cpp +++ b/editor/create_dialog.cpp @@ -191,24 +191,36 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p item->set_custom_color(0, get_color("disabled_font_color", "Editor")); item->set_selectable(0, false); } else if (!(*to_select && (*to_select)->get_text(0) == search_box->get_text())) { - bool is_search_subsequence = search_box->get_text().is_subsequence_ofi(p_type); - String to_select_type = *to_select ? (*to_select)->get_text(0) : ""; - to_select_type = to_select_type.split(" ")[0]; - bool current_item_is_preferred; - if (cpp_type) { - String cpp_to_select_type = to_select_type; - if (ScriptServer::is_global_class(to_select_type)) - cpp_to_select_type = ScriptServer::get_global_class_native_base(to_select_type); - current_item_is_preferred = ClassDB::is_parent_class(p_type, preferred_search_result_type) && !ClassDB::is_parent_class(cpp_to_select_type, preferred_search_result_type); - } else { - current_item_is_preferred = ed.script_class_is_parent(p_type, preferred_search_result_type) && !ed.script_class_is_parent(to_select_type, preferred_search_result_type) && search_box->get_text() != to_select_type; - } - if (search_box->get_text() == p_type || (*to_select && p_type.length() < (*to_select)->get_text(0).length())) { - current_item_is_preferred = true; + bool current_type_prefered = _is_type_prefered(p_type); + bool selected_type_prefered = *to_select ? _is_type_prefered((*to_select)->get_text(0).split(" ")[0]) : false; + + String search_term = search_box->get_text().to_lower(); + bool is_subsequence_of_type = search_box->get_text().is_subsequence_ofi(p_type); + bool is_substring_of_type = p_type.to_lower().find(search_term) >= 0; + bool is_substring_of_selected = false; + bool is_subsequence_of_selected = false; + bool is_selected_equal = false; + + if (*to_select) { + String name = (*to_select)->get_text(0).split(" ")[0].to_lower(); + is_substring_of_selected = name.find(search_term) >= 0; + is_subsequence_of_selected = search_term.is_subsequence_of(name); + is_selected_equal = name == search_term; } - if (((!*to_select || current_item_is_preferred) && is_search_subsequence)) { - *to_select = item; + if (is_subsequence_of_type && !is_selected_equal) { + if (is_substring_of_type) { + if (!is_substring_of_selected || (is_substring_of_selected && (current_type_prefered && !selected_type_prefered))) { + *to_select = item; + } + } else { + // substring results weigh more than subsequences, so let's make sure we don't override them + if (!is_substring_of_selected) { + if (!is_subsequence_of_selected || (is_subsequence_of_selected && (current_type_prefered && !selected_type_prefered))) { + *to_select = item; + } + } + } } } @@ -232,6 +244,16 @@ void CreateDialog::add_type(const String &p_type, HashMap<String, TreeItem *> &p p_types[p_type] = item; } +bool CreateDialog::_is_type_prefered(const String &type) { + bool cpp_type = ClassDB::class_exists(type); + EditorData &ed = EditorNode::get_editor_data(); + + if (cpp_type) { + return ClassDB::is_parent_class(type, preferred_search_result_type); + } + return ed.script_class_is_parent(type, preferred_search_result_type); +} + bool CreateDialog::_is_class_disabled_by_feature_profile(const StringName &p_class) { Ref<EditorFeatureProfile> profile = EditorFeatureProfileManager::get_singleton()->get_current_profile(); @@ -275,7 +297,6 @@ void CreateDialog::select_type(const String &p_type) { } void CreateDialog::_update_search() { - search_options->clear(); favorite->set_disabled(true); @@ -308,8 +329,9 @@ void CreateDialog::_update_search() { if (cpp_type && !ClassDB::can_instance(type)) continue; // can't create what can't be instanced - bool skip = false; if (cpp_type) { + bool skip = false; + for (Set<StringName>::Element *E = type_blacklist.front(); E && !skip; E = E->next()) { if (ClassDB::is_parent_class(type, E->get())) skip = true; diff --git a/editor/create_dialog.h b/editor/create_dialog.h index 0eddbc3ceb..f6c3b57589 100644 --- a/editor/create_dialog.h +++ b/editor/create_dialog.h @@ -90,6 +90,7 @@ class CreateDialog : public ConfirmationDialog { void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from); bool _is_class_disabled_by_feature_profile(const StringName &p_class); + bool _is_type_prefered(const String &type); protected: void _notification(int p_what); diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp index 041f81d063..6ee07d3661 100644 --- a/editor/doc/doc_data.cpp +++ b/editor/doc/doc_data.cpp @@ -248,6 +248,28 @@ void DocData::generate(bool p_basic_types) { prop.setter = setter; prop.getter = getter; + Variant default_value = Variant(); + bool default_value_valid = false; + + if (ClassDB::can_instance(name)) { + default_value = ClassDB::class_get_default_property_value(name, E->get().name, &default_value_valid); + } else { + // Cannot get default value of classes that can't be instanced + List<StringName> inheriting_classes; + ClassDB::get_direct_inheriters_from_class(name, &inheriting_classes); + for (List<StringName>::Element *E2 = inheriting_classes.front(); E2; E2 = E2->next()) { + if (ClassDB::can_instance(E2->get())) { + default_value = ClassDB::class_get_default_property_value(E2->get(), E->get().name, &default_value_valid); + if (default_value_valid) + break; + } + } + } + + if (default_value_valid) { + prop.default_value = default_value.get_construct_string(); + } + bool found_type = false; if (getter != StringName()) { MethodBind *mb = ClassDB::get_method(name, getter); @@ -412,6 +434,7 @@ void DocData::generate(bool p_basic_types) { PropertyDoc pd; pd.name = E->get(); pd.type = "int"; + pd.default_value = itos(Theme::get_default()->get_constant(E->get(), cname)); c.theme_properties.push_back(pd); } @@ -422,6 +445,7 @@ void DocData::generate(bool p_basic_types) { PropertyDoc pd; pd.name = E->get(); pd.type = "Color"; + pd.default_value = Variant(Theme::get_default()->get_color(E->get(), cname)).get_construct_string(); c.theme_properties.push_back(pd); } @@ -530,6 +554,7 @@ void DocData::generate(bool p_basic_types) { PropertyDoc property; property.name = pi.name; property.type = Variant::get_type_name(pi.type); + property.default_value = v.get(pi.name).get_construct_string(); c.properties.push_back(property); } @@ -1063,12 +1088,15 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri for (int i = 0; i < c.properties.size(); i++) { - String enum_text; + String additional_attributes; if (c.properties[i].enumeration != String()) { - enum_text = " enum=\"" + c.properties[i].enumeration + "\""; + additional_attributes += " enum=\"" + c.properties[i].enumeration + "\""; + } + if (c.properties[i].default_value != String()) { + additional_attributes += " default=\"" + c.properties[i].default_value.xml_escape(true) + "\""; } const PropertyDoc &p = c.properties[i]; - _write_string(f, 2, "<member name=\"" + p.name + "\" type=\"" + p.type + "\" setter=\"" + p.setter + "\" getter=\"" + p.getter + "\"" + enum_text + ">"); + _write_string(f, 2, "<member name=\"" + p.name + "\" type=\"" + p.type + "\" setter=\"" + p.setter + "\" getter=\"" + p.getter + "\"" + additional_attributes + ">"); _write_string(f, 3, p.description.strip_edges().xml_escape()); _write_string(f, 2, "</member>"); } @@ -1125,8 +1153,14 @@ Error DocData::save_classes(const String &p_default_path, const Map<String, Stri for (int i = 0; i < c.theme_properties.size(); i++) { const PropertyDoc &p = c.theme_properties[i]; - _write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\">"); + + if (p.default_value != "") + _write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\" default=\"" + p.default_value.xml_escape(true) + "\">"); + else + _write_string(f, 2, "<theme_item name=\"" + p.name + "\" type=\"" + p.type + "\">"); + _write_string(f, 3, p.description.strip_edges().xml_escape()); + _write_string(f, 2, "</theme_item>"); } _write_string(f, 1, "</theme_items>"); diff --git a/editor/doc/doc_data.h b/editor/doc/doc_data.h index d3844adb7e..3d5867dcca 100644 --- a/editor/doc/doc_data.h +++ b/editor/doc/doc_data.h @@ -73,6 +73,7 @@ public: String enumeration; String description; String setter, getter; + String default_value; bool operator<(const PropertyDoc &p_prop) const { return name < p_prop.name; } diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 8025fc9795..24c5a788b6 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -672,6 +672,18 @@ bool EditorFileDialog::_is_open_should_be_disabled() { return false; } +void EditorFileDialog::update_file_name() { + int idx = filter->get_selected() - 1; + if ((idx == -1 && filter->get_item_count() == 2) || (filter->get_item_count() > 2 && idx >= 0 && idx < filter->get_item_count() - 2)) { + if (idx == -1) idx += 1; + String filter_str = filters[idx]; + String file_str = file->get_text(); + String base_name = file_str.get_basename(); + file_str = base_name + "." + filter_str.split(";")[1].strip_edges().to_lower(); + file->set_text(file_str); + } +} + // DO NOT USE THIS FUNCTION UNLESS NEEDED, CALL INVALIDATE() INSTEAD. void EditorFileDialog::update_file_list() { @@ -865,7 +877,7 @@ void EditorFileDialog::update_file_list() { } void EditorFileDialog::_filter_selected(int) { - + update_file_name(); update_file_list(); } @@ -1364,6 +1376,7 @@ void EditorFileDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("_select_drive"), &EditorFileDialog::_select_drive); ClassDB::bind_method(D_METHOD("_make_dir"), &EditorFileDialog::_make_dir); ClassDB::bind_method(D_METHOD("_make_dir_confirm"), &EditorFileDialog::_make_dir_confirm); + ClassDB::bind_method(D_METHOD("_update_file_name"), &EditorFileDialog::update_file_name); ClassDB::bind_method(D_METHOD("_update_file_list"), &EditorFileDialog::update_file_list); ClassDB::bind_method(D_METHOD("_update_dir"), &EditorFileDialog::update_dir); ClassDB::bind_method(D_METHOD("_thumbnail_done"), &EditorFileDialog::_thumbnail_done); diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h index 6578be8563..86bf0f0eb3 100644 --- a/editor/editor_file_dialog.h +++ b/editor/editor_file_dialog.h @@ -148,6 +148,7 @@ private: bool invalidated; void update_dir(); + void update_file_name(); void update_file_list(); void update_filters(); diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 3c7c6ec9ed..87a37acac6 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -96,7 +96,7 @@ String EditorFileSystemDirectory::get_path() const { String p; const EditorFileSystemDirectory *d = this; while (d->parent) { - p = d->name + "/" + p; + p = d->name.plus_file(p); d = d->parent; } @@ -108,7 +108,7 @@ String EditorFileSystemDirectory::get_file_path(int p_idx) const { String file = get_file(p_idx); const EditorFileSystemDirectory *d = this; while (d->parent) { - file = d->name + "/" + file; + file = d->name.plus_file(file); d = d->parent; } diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 9918b655fb..d1f765a312 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -48,9 +48,9 @@ void EditorHelp::_init_colors() { text_color = get_color("default_color", "RichTextLabel"); headline_color = get_color("headline_color", "EditorHelp"); base_type_color = title_color.linear_interpolate(text_color, 0.5); - comment_color = text_color * Color(1, 1, 1, 0.6); + comment_color = text_color * Color(1, 1, 1, 0.4); symbol_color = comment_color; - value_color = text_color * Color(1, 1, 1, 0.4); + value_color = text_color * Color(1, 1, 1, 0.6); qualifier_color = text_color * Color(1, 1, 1, 0.8); type_color = get_color("accent_color", "Editor").linear_interpolate(text_color, 0.5); class_desc->add_color_override("selection_color", get_color("accent_color", "Editor") * Color(1, 1, 1, 0.4)); @@ -258,9 +258,11 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview if (p_method.arguments[j].default_value != "") { class_desc->push_color(symbol_color); - class_desc->add_text("="); + class_desc->add_text(" = "); class_desc->pop(); + class_desc->push_color(value_color); _add_text(_fix_constant(p_method.arguments[j].default_value)); + class_desc->pop(); } class_desc->pop(); @@ -471,23 +473,37 @@ void EditorHelp::_update_doc() { if (cd.properties[i].description != "") { describe = true; } + class_desc->push_cell(); + class_desc->push_font(doc_code_font); + class_desc->push_color(headline_color); + if (describe) { class_desc->push_meta("@member " + cd.properties[i].name); } - class_desc->push_font(doc_code_font); - class_desc->push_color(headline_color); _add_text(cd.properties[i].name); - class_desc->pop(); - class_desc->pop(); - if (describe) { class_desc->pop(); property_descr = true; } + if (cd.properties[i].default_value != "") { + class_desc->push_color(symbol_color); + class_desc->add_text(" [default: "); + class_desc->pop(); + class_desc->push_color(value_color); + _add_text(_fix_constant(cd.properties[i].default_value)); + class_desc->pop(); + class_desc->push_color(symbol_color); + class_desc->add_text("]"); + class_desc->pop(); + } + + class_desc->pop(); + class_desc->pop(); + class_desc->pop(); } @@ -613,6 +629,19 @@ void EditorHelp::_update_doc() { class_desc->push_color(headline_color); _add_text(cd.theme_properties[i].name); class_desc->pop(); + + if (cd.theme_properties[i].default_value != "") { + class_desc->push_color(symbol_color); + class_desc->add_text(" [default: "); + class_desc->pop(); + class_desc->push_color(value_color); + _add_text(_fix_constant(cd.theme_properties[i].default_value)); + class_desc->pop(); + class_desc->push_color(symbol_color); + class_desc->add_text("]"); + class_desc->pop(); + } + class_desc->pop(); if (cd.theme_properties[i].description != "") { @@ -671,7 +700,7 @@ void EditorHelp::_update_doc() { if (cd.signals[i].arguments[j].default_value != "") { class_desc->push_color(symbol_color); - class_desc->add_text("="); + class_desc->add_text(" = "); class_desc->pop(); _add_text(cd.signals[i].arguments[j].default_value); } @@ -777,7 +806,7 @@ void EditorHelp::_update_doc() { class_desc->add_text(" = "); class_desc->pop(); class_desc->push_color(value_color); - _add_text(enum_list[i].value); + _add_text(_fix_constant(enum_list[i].value)); class_desc->pop(); class_desc->pop(); if (enum_list[i].description != "") { @@ -843,7 +872,7 @@ void EditorHelp::_update_doc() { class_desc->add_text(" = "); class_desc->pop(); class_desc->push_color(value_color); - _add_text(constants[i].value); + _add_text(_fix_constant(constants[i].value)); class_desc->pop(); class_desc->pop(); @@ -963,6 +992,21 @@ void EditorHelp::_update_doc() { class_desc->push_color(headline_color); _add_text(cd.properties[i].name); class_desc->pop(); // color + + if (cd.properties[i].default_value != "") { + class_desc->push_color(symbol_color); + class_desc->add_text(" [default: "); + class_desc->pop(); // color + + class_desc->push_color(value_color); + _add_text(_fix_constant(cd.properties[i].default_value)); + class_desc->pop(); // color + + class_desc->push_color(symbol_color); + class_desc->add_text("]"); + class_desc->pop(); // color + } + class_desc->pop(); // font class_desc->pop(); // cell @@ -1290,7 +1334,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { end = bbcode.length(); String image = bbcode.substr(brk_end + 1, end - brk_end - 1); - Ref<Texture> texture = ResourceLoader::load(base_path + "/" + image, "Texture"); + Ref<Texture> texture = ResourceLoader::load(base_path.plus_file(image), "Texture"); if (texture.is_valid()) p_rt->add_image(texture); @@ -1346,7 +1390,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt) { String fnt = tag.substr(5, tag.length()); - Ref<Font> font = ResourceLoader::load(base_path + "/" + fnt, "Font"); + Ref<Font> font = ResourceLoader::load(base_path.plus_file(fnt), "Font"); if (font.is_valid()) p_rt->push_font(font); else { diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 3d640b4d35..865ffd1baa 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -2818,7 +2818,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, Ref<ConfigFile> cf; cf.instance(); - String addon_path = "res://addons/" + p_addon + "/plugin.cfg"; + String addon_path = String("res://addons").plus_file(p_addon).plus_file("plugin.cfg"); if (!DirAccess::exists(addon_path.get_base_dir())) { ProjectSettings *ps = ProjectSettings::get_singleton(); PoolStringArray enabled_plugins = ps->get("editor_plugins/enabled"); @@ -2845,7 +2845,7 @@ void EditorNode::set_addon_plugin_enabled(const String &p_addon, bool p_enabled, } String path = cf->get_value("plugin", "script"); - path = "res://addons/" + p_addon + "/" + path; + path = String("res://addons").plus_file(p_addon).plus_file(path); Ref<Script> script = ResourceLoader::load(path); @@ -6342,6 +6342,10 @@ EditorNode::EditorNode() { Ref<ParticlesMaterialConversionPlugin> particles_mat_convert; particles_mat_convert.instance(); resource_conversion_plugins.push_back(particles_mat_convert); + + Ref<VisualShaderConversionPlugin> vshader_convert; + vshader_convert.instance(); + resource_conversion_plugins.push_back(vshader_convert); } update_spinner_step_msec = OS::get_singleton()->get_ticks_msec(); update_spinner_step_frame = Engine::get_singleton()->get_frames_drawn(); diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index 78c38af555..90d6c3a983 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -200,7 +200,7 @@ ScriptEditor *EditorInterface::get_script_editor() { } void EditorInterface::select_file(const String &p_file) { - return EditorNode::get_singleton()->get_filesystem_dock()->select_file(p_file); + EditorNode::get_singleton()->get_filesystem_dock()->select_file(p_file); } String EditorInterface::get_selected_path() const { diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp index 8e4ec47435..a8ef563368 100644 --- a/editor/editor_properties.cpp +++ b/editor/editor_properties.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "editor_properties.h" + #include "editor/editor_resource_preview.h" #include "editor_node.h" #include "editor_properties_array_dict.h" @@ -207,7 +208,13 @@ EditorPropertyTextEnum::EditorPropertyTextEnum() { void EditorPropertyPath::_path_selected(const String &p_path) { - emit_changed(get_edited_property(), p_path); + String final_path = p_path; + if (final_path.is_abs_path()) { + String res_path = OS::get_singleton()->get_resource_dir() + "/"; + final_path = res_path.path_to_file(final_path); + } + + emit_changed(get_edited_property(), final_path); update_property(); } void EditorPropertyPath::_path_pressed() { @@ -220,6 +227,13 @@ void EditorPropertyPath::_path_pressed() { } String full_path = get_edited_object()->get(get_edited_property()); + if (full_path.is_rel_path()) { + + if (!DirAccess::exists(full_path.get_base_dir())) { + DirAccessRef da(DirAccess::create(DirAccess::ACCESS_FILESYSTEM)); + da->make_dir_recursive(full_path.get_base_dir()); + } + } dialog->clear_filters(); @@ -925,6 +939,9 @@ void EditorPropertyEasing::_drag_easing(const Ref<InputEvent> &p_ev) { preset->set_global_position(easing_draw->get_global_transform().xform(mb->get_position())); preset->popup(); } + if (mb.is_valid() && mb->is_doubleclick() && mb->get_button_index() == BUTTON_LEFT) { + _setup_spin(); + } Ref<InputEventMouseMotion> mm = p_ev; @@ -963,7 +980,6 @@ void EditorPropertyEasing::_draw_easing() { Size2 s = easing_draw->get_size(); Rect2 r(Point2(), s); r = r.grow(3); - //get_stylebox("normal", "LineEdit")->draw(ci, r); int points = 48; @@ -1006,6 +1022,31 @@ void EditorPropertyEasing::_set_preset(int p_preset) { easing_draw->update(); } +void EditorPropertyEasing::_setup_spin() { + setting = true; + spin->setup_and_show(); + spin->get_line_edit()->set_text(rtos(get_edited_object()->get(get_edited_property()))); + setting = false; + spin->show(); +} + +void EditorPropertyEasing::_spin_value_changed(double p_value) { + if (setting) + return; + + // 0 is a singularity, but both positive and negative values + // are otherwise allowed. Enforce 0+ as workaround. + if (Math::is_zero_approx(p_value)) { + p_value = 0.00001; + } + emit_changed(get_edited_property(), p_value); + _spin_focus_exited(); +} + +void EditorPropertyEasing::_spin_focus_exited() { + spin->hide(); +} + void EditorPropertyEasing::setup(bool p_full, bool p_flip) { flip = p_flip; @@ -1028,9 +1069,6 @@ void EditorPropertyEasing::_notification(int p_what) { } easing_draw->set_custom_minimum_size(Size2(0, get_font("font", "Label")->get_height() * 2)); } break; - case NOTIFICATION_RESIZED: { - - } break; } } @@ -1039,6 +1077,9 @@ void EditorPropertyEasing::_bind_methods() { ClassDB::bind_method("_draw_easing", &EditorPropertyEasing::_draw_easing); ClassDB::bind_method("_drag_easing", &EditorPropertyEasing::_drag_easing); ClassDB::bind_method("_set_preset", &EditorPropertyEasing::_set_preset); + + ClassDB::bind_method("_spin_value_changed", &EditorPropertyEasing::_spin_value_changed); + ClassDB::bind_method("_spin_focus_exited", &EditorPropertyEasing::_spin_focus_exited); } EditorPropertyEasing::EditorPropertyEasing() { @@ -1053,6 +1094,19 @@ EditorPropertyEasing::EditorPropertyEasing() { add_child(preset); preset->connect("id_pressed", this, "_set_preset"); + spin = memnew(EditorSpinSlider); + spin->set_flat(true); + spin->set_min(-100); + spin->set_max(100); + spin->set_step(0); + spin->set_hide_slider(true); + spin->set_allow_lesser(true); + spin->set_allow_greater(true); + spin->connect("value_changed", this, "_spin_value_changed"); + spin->get_line_edit()->connect("focus_exited", this, "_spin_focus_exited"); + spin->hide(); + add_child(spin); + flip = false; full = false; } @@ -2808,6 +2862,7 @@ EditorPropertyResource::EditorPropertyResource() { assign->set_drag_forwarding(this); assign->connect("draw", this, "_button_draw"); hbc->add_child(assign); + add_focusable(assign); preview = memnew(TextureRect); preview->set_expand(true); @@ -2828,6 +2883,7 @@ EditorPropertyResource::EditorPropertyResource() { edit->connect("pressed", this, "_update_menu"); hbc->add_child(edit); edit->connect("gui_input", this, "_button_input"); + add_focusable(edit); file = NULL; scene_tree = NULL; diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 02d9349f2d..0a4a07cdc0 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -32,12 +32,12 @@ #define EDITOR_PROPERTIES_H #include "editor/create_dialog.h" -#include "editor/editor_file_system.h" #include "editor/editor_inspector.h" #include "editor/editor_spin_slider.h" #include "editor/property_selector.h" #include "editor/scene_tree_editor.h" #include "scene/gui/color_picker.h" +#include "scene/gui/line_edit.h" class EditorPropertyNil : public EditorProperty { GDCLASS(EditorPropertyNil, EditorProperty); @@ -308,7 +308,11 @@ class EditorPropertyEasing : public EditorProperty { GDCLASS(EditorPropertyEasing, EditorProperty); Control *easing_draw; PopupMenu *preset; + EditorSpinSlider *spin; + bool setting; + bool full; + bool flip; enum { EASING_ZERO, @@ -321,13 +325,16 @@ class EditorPropertyEasing : public EditorProperty { }; - bool flip; - void _drag_easing(const Ref<InputEvent> &p_ev); void _draw_easing(); - void _notification(int p_what); void _set_preset(int); + void _setup_spin(); + void _spin_value_changed(double p_value); + void _spin_focus_exited(); + + void _notification(int p_what); + protected: static void _bind_methods(); diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 6cca0a0ffa..f2e4d1086b 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -218,6 +218,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref< void EditorResourcePreview::_thread() { #ifndef SERVER_ENABLED + exited = false; while (!exit) { preview_sem->wait(); @@ -452,8 +453,8 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) { void EditorResourcePreview::start() { ERR_FAIL_COND(thread); thread = Thread::create(_thread_func, this); - exited = false; } + void EditorResourcePreview::stop() { if (thread) { exit = true; diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 8521c0c723..ecc63b1a8d 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -938,7 +938,7 @@ fail: Vector<String> list = extra_config->get_value("init_projects", "list"); for (int i = 0; i < list.size(); i++) { - list.write[i] = exe_path + "/" + list[i]; + list.write[i] = exe_path.plus_file(list[i]); }; extra_config->set_value("init_projects", "list", list); }; @@ -1473,6 +1473,10 @@ void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) { Ref<ShortCut> ED_GET_SHORTCUT(const String &p_path) { + if (!EditorSettings::get_singleton()) { + return NULL; + } + Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(p_path); if (!sc.is_valid()) { ERR_EXPLAIN("Used ED_GET_SHORTCUT with invalid shortcut: " + p_path); @@ -1508,6 +1512,15 @@ Ref<ShortCut> ED_SHORTCUT(const String &p_path, const String &p_name, uint32_t p ie->set_metakey(bool(p_keycode & KEY_MASK_META)); } + if (!EditorSettings::get_singleton()) { + Ref<ShortCut> sc; + sc.instance(); + sc->set_name(p_name); + sc->set_shortcut(ie); + sc->set_meta("original", ie); + return sc; + } + Ref<ShortCut> sc = EditorSettings::get_singleton()->get_shortcut(p_path); if (sc.is_valid()) { diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h index 1523c20f48..d91380e175 100644 --- a/editor/editor_spin_slider.h +++ b/editor/editor_spin_slider.h @@ -102,6 +102,9 @@ public: void set_custom_label_color(bool p_use_custom_label_color, Color p_custom_label_color); + void setup_and_show() { _focus_entered(); } + LineEdit *get_line_edit() { return value_input; } + virtual Size2 get_minimum_size() const; EditorSpinSlider(); }; diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 83e529ac35..9301d8c1a4 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1329,7 +1329,7 @@ void FileSystemDock::_duplicate_operation_confirm() { if (to_duplicate.is_file) { new_path = base_dir.plus_file(new_name); } else { - new_path = base_dir.substr(0, base_dir.find_last("/")) + "/" + new_name; + new_path = base_dir.substr(0, base_dir.find_last("/")).plus_file(new_name); } //Present a more user friendly warning for name conflict diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp index 3cf3bbf0f2..5a8dc205c2 100644 --- a/editor/groups_editor.cpp +++ b/editor/groups_editor.cpp @@ -59,7 +59,7 @@ void GroupDialog::_group_selected() { void GroupDialog::_load_nodes(Node *p_current) { String item_name = p_current->get_name(); if (p_current != scene_tree->get_edited_scene_root()) { - item_name = String(p_current->get_parent()->get_name()) + "/" + String(item_name); + item_name = String(p_current->get_parent()->get_name()) + "/" + item_name; } bool keep = true; @@ -69,7 +69,7 @@ void GroupDialog::_load_nodes(Node *p_current) { keep = false; } - TreeItem *node; + TreeItem *node = NULL; NodePath path = scene_tree->get_edited_scene_root()->get_path_to(p_current); if (keep && p_current->is_in_group(selected_group)) { if (remove_filter->get_text().is_subsequence_ofi(String(p_current->get_name()))) { diff --git a/editor/icons/SCsub b/editor/icons/SCsub index 109e1aa83b..b39c74c66a 100644 --- a/editor/icons/SCsub +++ b/editor/icons/SCsub @@ -10,4 +10,12 @@ make_editor_icons_builder = Builder(action=run_in_subprocess(editor_icons_builde src_suffix='.svg') env['BUILDERS']['MakeEditorIconsBuilder'] = make_editor_icons_builder -env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#editor/editor_icons.gen.h', Glob("*.svg"))]) + +# Editor's own icons +icon_sources = Glob("*.svg") + +# Module icons +for module_icons in env.module_icons_paths: + icon_sources += Glob('#' + module_icons + "/*.svg") + +env.Alias('editor_icons', [env.MakeEditorIconsBuilder('#editor/editor_icons.gen.h', icon_sources)]) diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h index 965e6c8827..10a1a6bd98 100644 --- a/editor/plugins/collision_shape_2d_editor_plugin.h +++ b/editor/plugins/collision_shape_2d_editor_plugin.h @@ -89,7 +89,7 @@ class CollisionShape2DEditorPlugin : public EditorPlugin { public: virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return collision_shape_2d_editor->forward_canvas_gui_input(p_event); } - virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { return collision_shape_2d_editor->forward_canvas_draw_over_viewport(p_overlay); } + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { collision_shape_2d_editor->forward_canvas_draw_over_viewport(p_overlay); } virtual String get_name() const { return "CollisionShape2D"; } bool has_main_screen() const { return false; } diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp index 3b1d728b8b..d2d2b8f130 100644 --- a/editor/plugins/curve_editor_plugin.cpp +++ b/editor/plugins/curve_editor_plugin.cpp @@ -156,9 +156,9 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) { Vector2 mpos = mm.get_position(); if (_dragging && _curve_ref.is_valid()) { - Curve &curve = **_curve_ref; if (_selected_point != -1) { + Curve &curve = **_curve_ref; if (!_has_undo_data) { // Save full curve state before dragging points, diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h index 4edd17d146..44472f7a81 100644 --- a/editor/plugins/path_2d_editor_plugin.h +++ b/editor/plugins/path_2d_editor_plugin.h @@ -123,7 +123,7 @@ class Path2DEditorPlugin : public EditorPlugin { public: virtual bool forward_canvas_gui_input(const Ref<InputEvent> &p_event) { return path2d_editor->forward_gui_input(p_event); } - virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { return path2d_editor->forward_canvas_draw_over_viewport(p_overlay); } + virtual void forward_canvas_draw_over_viewport(Control *p_overlay) { path2d_editor->forward_canvas_draw_over_viewport(p_overlay); } virtual String get_name() const { return "Path2D"; } bool has_main_screen() const { return false; } diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index 1b00889e9a..d999f3189e 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -3463,7 +3463,7 @@ void ScriptEditorPlugin::get_window_layout(Ref<ConfigFile> p_layout) { void ScriptEditorPlugin::get_breakpoints(List<String> *p_breakpoints) { - return script_editor->get_breakpoints(p_breakpoints); + script_editor->get_breakpoints(p_breakpoints); } void ScriptEditorPlugin::edited_scene_changed() { diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index 9bf3a9f0eb..f705970d79 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -574,8 +574,8 @@ void ScriptTextEditor::_validate_script() { Connection connection = E->get(); String base_path = base->get_name(); - String source_path = base == connection.source ? base_path : base_path + "/" + String(base->get_path_to(Object::cast_to<Node>(connection.source))); - String target_path = base == connection.target ? base_path : base_path + "/" + String(base->get_path_to(Object::cast_to<Node>(connection.target))); + String source_path = base == connection.source ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.source)); + String target_path = base == connection.target ? base_path : base_path + "/" + base->get_path_to(Object::cast_to<Node>(connection.target)); warnings_panel->push_cell(); warnings_panel->push_color(warnings_panel->get_color("warning_color", "Editor")); @@ -644,6 +644,43 @@ void ScriptTextEditor::_validate_script() { emit_signal("edited_script_changed"); } +void ScriptTextEditor::_update_bookmark_list() { + + bookmarks_menu->get_popup()->clear(); + + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV); + + Array bookmark_list = code_editor->get_text_edit()->get_bookmarks_array(); + if (bookmark_list.size() == 0) { + return; + } + + bookmarks_menu->get_popup()->add_separator(); + + for (int i = 0; i < bookmark_list.size(); i++) { + String line = code_editor->get_text_edit()->get_line(bookmark_list[i]).strip_edges(); + // Limit the size of the line if too big. + if (line.length() > 50) { + line = line.substr(0, 50); + } + + bookmarks_menu->get_popup()->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\""); + bookmarks_menu->get_popup()->set_item_metadata(bookmarks_menu->get_popup()->get_item_count() - 1, bookmark_list[i]); + } +} + +void ScriptTextEditor::_bookmark_item_pressed(int p_idx) { + + if (p_idx < 4) { // Any item before the separator. + _edit_option(bookmarks_menu->get_popup()->get_item_id(p_idx)); + } else { + code_editor->goto_line(bookmarks_menu->get_popup()->get_item_metadata(p_idx)); + } +} + static Vector<Node *> _find_all_node_for_script(Node *p_base, Node *p_current, const Ref<Script> &p_script) { Vector<Node *> nodes; @@ -1092,7 +1129,7 @@ void ScriptTextEditor::_edit_option(int p_op) { String selected_text = code_editor->get_text_edit()->get_selection_text(); // Yep, because it doesn't make sense to instance this dialog for every single script open... - // So this will be delegated to the ScriptEditor + // So this will be delegated to the ScriptEditor. emit_signal("search_in_files_requested", selected_text); } break; @@ -1258,6 +1295,8 @@ void ScriptTextEditor::_change_syntax_highlighter(int p_idx) { void ScriptTextEditor::_bind_methods() { ClassDB::bind_method("_validate_script", &ScriptTextEditor::_validate_script); + ClassDB::bind_method("_update_bookmark_list", &ScriptTextEditor::_update_bookmark_list); + ClassDB::bind_method("_bookmark_item_pressed", &ScriptTextEditor::_bookmark_item_pressed); ClassDB::bind_method("_load_theme_settings", &ScriptTextEditor::_load_theme_settings); ClassDB::bind_method("_breakpoint_toggled", &ScriptTextEditor::_breakpoint_toggled); ClassDB::bind_method("_lookup_connections", &ScriptTextEditor::_lookup_connections); @@ -1708,18 +1747,16 @@ ScriptTextEditor::ScriptTextEditor() { search_menu->get_popup()->connect("id_pressed", this, "_edit_option"); - PopupMenu *bookmarks = memnew(PopupMenu); - bookmarks->set_name("bookmarks"); - edit_menu->get_popup()->add_child(bookmarks); - edit_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "bookmarks"); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV); - bookmarks->connect("id_pressed", this, "_edit_option"); - edit_hb->add_child(edit_menu); + bookmarks_menu = memnew(MenuButton); + edit_hb->add_child(bookmarks_menu); + bookmarks_menu->set_text(TTR("Bookmarks")); + bookmarks_menu->set_switch_on_hover(true); + _update_bookmark_list(); + bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list"); + bookmarks_menu->get_popup()->connect("index_pressed", this, "_bookmark_item_pressed"); + quick_open = memnew(ScriptEditorQuickOpen); add_child(quick_open); quick_open->connect("goto_line", this, "_goto_line"); diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h index 89975e061e..f83f1ea759 100644 --- a/editor/plugins/script_text_editor.h +++ b/editor/plugins/script_text_editor.h @@ -70,6 +70,7 @@ class ScriptTextEditor : public ScriptEditorBase { MenuButton *edit_menu; MenuButton *search_menu; + MenuButton *bookmarks_menu; PopupMenu *highlighter_menu; PopupMenu *context_menu; @@ -144,8 +145,9 @@ protected: static void _code_complete_scripts(void *p_ud, const String &p_code, List<String> *r_options, bool &r_force); void _breakpoint_toggled(int p_row); - //no longer virtual - void _validate_script(); + void _validate_script(); // No longer virtual. + void _update_bookmark_list(); + void _bookmark_item_pressed(int p_idx); void _code_complete_script(const String &p_code, List<String> *r_options, bool &r_force); void _load_theme_settings(); void _set_theme_for_script(); diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp index d02817f6e8..04d13f0027 100644 --- a/editor/plugins/shader_editor_plugin.cpp +++ b/editor/plugins/shader_editor_plugin.cpp @@ -386,6 +386,9 @@ void ShaderEditor::_bind_methods() { ClassDB::bind_method("_editor_settings_changed", &ShaderEditor::_editor_settings_changed); ClassDB::bind_method("_text_edit_gui_input", &ShaderEditor::_text_edit_gui_input); + ClassDB::bind_method("_update_bookmark_list", &ShaderEditor::_update_bookmark_list); + ClassDB::bind_method("_bookmark_item_pressed", &ShaderEditor::_bookmark_item_pressed); + ClassDB::bind_method("_menu_option", &ShaderEditor::_menu_option); ClassDB::bind_method("_params_changed", &ShaderEditor::_params_changed); ClassDB::bind_method("apply_shaders", &ShaderEditor::apply_shaders); @@ -521,6 +524,43 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) { } } +void ShaderEditor::_update_bookmark_list() { + + bookmarks_menu->get_popup()->clear(); + + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV); + + Array bookmark_list = shader_editor->get_text_edit()->get_bookmarks_array(); + if (bookmark_list.size() == 0) { + return; + } + + bookmarks_menu->get_popup()->add_separator(); + + for (int i = 0; i < bookmark_list.size(); i++) { + String line = shader_editor->get_text_edit()->get_line(bookmark_list[i]).strip_edges(); + // Limit the size of the line if too big. + if (line.length() > 50) { + line = line.substr(0, 50); + } + + bookmarks_menu->get_popup()->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\""); + bookmarks_menu->get_popup()->set_item_metadata(bookmarks_menu->get_popup()->get_item_count() - 1, bookmark_list[i]); + } +} + +void ShaderEditor::_bookmark_item_pressed(int p_idx) { + + if (p_idx < 4) { // Any item before the separator. + _menu_option(bookmarks_menu->get_popup()->get_item_id(p_idx)); + } else { + shader_editor->goto_line(bookmarks_menu->get_popup()->get_item_metadata(p_idx)); + } +} + void ShaderEditor::_make_context_menu(bool p_selection) { context_menu->clear(); @@ -539,6 +579,7 @@ void ShaderEditor::_make_context_menu(bool p_selection) { context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); context_menu->set_position(get_global_transform().xform(get_local_mouse_position())); context_menu->set_size(Vector2(1, 1)); @@ -609,20 +650,18 @@ ShaderEditor::ShaderEditor(EditorNode *p_node) { search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE); search_menu->get_popup()->connect("id_pressed", this, "_menu_option"); - PopupMenu *bookmarks = memnew(PopupMenu); - bookmarks->set_name("bookmarks"); - edit_menu->get_popup()->add_child(bookmarks); - edit_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "bookmarks"); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV); - bookmarks->connect("id_pressed", this, "_edit_option"); + bookmarks_menu = memnew(MenuButton); + bookmarks_menu->set_text(TTR("Bookmarks")); + bookmarks_menu->set_switch_on_hover(true); + _update_bookmark_list(); + bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list"); + bookmarks_menu->get_popup()->connect("index_pressed", this, "_bookmark_item_pressed"); add_child(main_container); main_container->add_child(hbc); hbc->add_child(search_menu); hbc->add_child(edit_menu); + hbc->add_child(bookmarks_menu); hbc->add_style_override("panel", p_node->get_gui_base()->get_stylebox("ScriptEditorPanel", "EditorStyles")); main_container->add_child(shader_editor); diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h index b56c1451ad..f01e39189f 100644 --- a/editor/plugins/shader_editor_plugin.h +++ b/editor/plugins/shader_editor_plugin.h @@ -99,6 +99,7 @@ class ShaderEditor : public PanelContainer { MenuButton *edit_menu; MenuButton *search_menu; + MenuButton *bookmarks_menu; MenuButton *settings_menu; PopupMenu *context_menu; uint64_t idle; @@ -124,6 +125,9 @@ protected: void _make_context_menu(bool p_selection); void _text_edit_gui_input(const Ref<InputEvent> &ev); + void _update_bookmark_list(); + void _bookmark_item_pressed(int p_idx); + public: void apply_shaders(); diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp index c509202a88..d91de6cbf6 100644 --- a/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/editor/plugins/sprite_frames_editor_plugin.cpp @@ -232,7 +232,8 @@ void SpriteFramesEditor::_notification(int p_what) { _delete->set_icon(get_icon("Remove", "EditorIcons")); new_anim->set_icon(get_icon("New", "EditorIcons")); remove_anim->set_icon(get_icon("Remove", "EditorIcons")); - } // Fallthrough. + FALLTHROUGH; + } case NOTIFICATION_THEME_CHANGED: { splite_sheet_scroll->add_style_override("bg", get_stylebox("bg", "Tree")); } break; diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index 787813336d..fae88f4eb7 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -219,6 +219,43 @@ void TextEditor::_validate_script() { emit_signal("edited_script_changed"); } +void TextEditor::_update_bookmark_list() { + + bookmarks_menu->get_popup()->clear(); + + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT); + bookmarks_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV); + + Array bookmark_list = code_editor->get_text_edit()->get_bookmarks_array(); + if (bookmark_list.size() == 0) { + return; + } + + bookmarks_menu->get_popup()->add_separator(); + + for (int i = 0; i < bookmark_list.size(); i++) { + String line = code_editor->get_text_edit()->get_line(bookmark_list[i]).strip_edges(); + // Limit the size of the line if too big. + if (line.length() > 50) { + line = line.substr(0, 50); + } + + bookmarks_menu->get_popup()->add_item(String::num((int)bookmark_list[i] + 1) + " - \"" + line + "\""); + bookmarks_menu->get_popup()->set_item_metadata(bookmarks_menu->get_popup()->get_item_count() - 1, bookmark_list[i]); + } +} + +void TextEditor::_bookmark_item_pressed(int p_idx) { + + if (p_idx < 4) { // Any item before the separator. + _edit_option(bookmarks_menu->get_popup()->get_item_id(p_idx)); + } else { + code_editor->goto_line(bookmarks_menu->get_popup()->get_item_metadata(p_idx)); + } +} + void TextEditor::apply_code() { text_file->set_text(code_editor->get_text_edit()->get_text()); } @@ -471,6 +508,8 @@ void TextEditor::_convert_case(CodeTextEditor::CaseStyle p_case) { void TextEditor::_bind_methods() { ClassDB::bind_method("_validate_script", &TextEditor::_validate_script); + ClassDB::bind_method("_update_bookmark_list", &TextEditor::_update_bookmark_list); + ClassDB::bind_method("_bookmark_item_pressed", &TextEditor::_bookmark_item_pressed); ClassDB::bind_method("_load_theme_settings", &TextEditor::_load_theme_settings); ClassDB::bind_method("_edit_option", &TextEditor::_edit_option); ClassDB::bind_method("_change_syntax_highlighter", &TextEditor::_change_syntax_highlighter); @@ -547,6 +586,7 @@ void TextEditor::_make_context_menu(bool p_selection, bool p_can_fold, bool p_is context_menu->add_separator(); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT); context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT); + context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); if (p_selection) { context_menu->add_separator(); @@ -584,6 +624,7 @@ TextEditor::TextEditor() { search_menu = memnew(MenuButton); edit_hb->add_child(search_menu); search_menu->set_text(TTR("Search")); + search_menu->set_switch_on_hover(true); search_menu->get_popup()->connect("id_pressed", this, "_edit_option"); search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND); @@ -598,6 +639,7 @@ TextEditor::TextEditor() { edit_menu = memnew(MenuButton); edit_menu->set_text(TTR("Edit")); + edit_menu->set_switch_on_hover(true); edit_menu->get_popup()->connect("id_pressed", this, "_edit_option"); edit_hb->add_child(edit_menu); @@ -642,15 +684,13 @@ TextEditor::TextEditor() { highlighter_menu->add_radio_check_item(TTR("Standard")); highlighter_menu->connect("id_pressed", this, "_change_syntax_highlighter"); - PopupMenu *bookmarks = memnew(PopupMenu); - bookmarks->set_name("bookmarks"); - edit_menu->get_popup()->add_child(bookmarks); - edit_menu->get_popup()->add_submenu_item(TTR("Bookmarks"), "bookmarks"); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_bookmark"), BOOKMARK_TOGGLE); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_bookmarks"), BOOKMARK_REMOVE_ALL); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_next_bookmark"), BOOKMARK_GOTO_NEXT); - bookmarks->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_previous_bookmark"), BOOKMARK_GOTO_PREV); - bookmarks->connect("id_pressed", this, "_edit_option"); + bookmarks_menu = memnew(MenuButton); + edit_hb->add_child(bookmarks_menu); + bookmarks_menu->set_text(TTR("Bookmarks")); + bookmarks_menu->set_switch_on_hover(true); + _update_bookmark_list(); + bookmarks_menu->connect("about_to_show", this, "_update_bookmark_list"); + bookmarks_menu->get_popup()->connect("index_pressed", this, "_bookmark_item_pressed"); code_editor->get_text_edit()->set_drag_forwarding(this); } diff --git a/editor/plugins/text_editor.h b/editor/plugins/text_editor.h index 277e93fd39..ae0c0bcf93 100644 --- a/editor/plugins/text_editor.h +++ b/editor/plugins/text_editor.h @@ -46,6 +46,7 @@ private: MenuButton *edit_menu; PopupMenu *highlighter_menu; MenuButton *search_menu; + MenuButton *bookmarks_menu; PopupMenu *context_menu; GotoLineDialog *goto_line_dialog; @@ -110,6 +111,9 @@ protected: void _validate_script(); + void _update_bookmark_list(); + void _bookmark_item_pressed(int p_idx); + public: virtual void add_syntax_highlighter(SyntaxHighlighter *p_highlighter); virtual void set_syntax_highlighter(SyntaxHighlighter *p_highlighter); diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp index 4e15bd5116..8f58fbd6ab 100644 --- a/editor/plugins/texture_region_editor_plugin.cpp +++ b/editor/plugins/texture_region_editor_plugin.cpp @@ -192,8 +192,8 @@ void TextureRegionEditor::_region_draw() { } updating_scroll = false; - float margins[4]; if (node_ninepatch || obj_styleBox.is_valid()) { + float margins[4]; if (node_ninepatch) { margins[0] = node_ninepatch->get_patch_margin(MARGIN_TOP); margins[1] = node_ninepatch->get_patch_margin(MARGIN_BOTTOM); @@ -204,6 +204,11 @@ void TextureRegionEditor::_region_draw() { margins[1] = obj_styleBox->get_margin_size(MARGIN_BOTTOM); margins[2] = obj_styleBox->get_margin_size(MARGIN_LEFT); margins[3] = obj_styleBox->get_margin_size(MARGIN_RIGHT); + } else { + margins[0] = 0; + margins[1] = 0; + margins[2] = 0; + margins[3] = 0; } Vector2 pos[4] = { mtx.basis_xform(Vector2(0, margins[0])) + Vector2(0, endpoints[0].y - draw_ofs.y * draw_zoom), diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 82e8248216..6e47d82847 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -61,8 +61,8 @@ void TileMapEditor::_notification(int p_what) { if (is_visible_in_tree()) { _update_palette(); } - - } // fallthrough + FALLTHROUGH; + } case NOTIFICATION_ENTER_TREE: { diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index 069d9d25ee..35cfdf15be 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -974,6 +974,7 @@ void TileSetEditor::_on_workspace_draw() { workspace->draw_rect(region, c, false); } } + delete tiles; if (edit_mode == EDITMODE_REGION) { if (workspace_mode != WORKSPACE_EDIT) { @@ -1068,6 +1069,7 @@ void TileSetEditor::_on_workspace_overlay_draw() { c = Color(0.1, 0.1, 0.1); workspace_overlay->draw_string(font, region.position, tile_id_name, c); } + delete tiles; } int t_id = get_current_tile(); @@ -1115,10 +1117,12 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) { set_current_tile(t_id); workspace->update(); workspace_overlay->update(); + delete tiles; return; } } } + delete tiles; } } @@ -3118,6 +3122,7 @@ void TileSetEditor::update_workspace_minsize() { workspace_min_size.y = region.position.y + region.size.y; } } + delete tiles; workspace->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2); workspace_container->set_custom_minimum_size(workspace_min_size + WORKSPACE_MARGIN * 2); diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp index b4200d5662..e1929d7489 100644 --- a/editor/plugins/visual_shader_editor_plugin.cpp +++ b/editor/plugins/visual_shader_editor_plugin.cpp @@ -2049,23 +2049,23 @@ VisualShaderEditor::VisualShaderEditor() { // INPUT // SPATIAL-FOR-ALL - - add_options.push_back(AddOption("Camera", "Input", "All", "VisualShaderNodeInput", TTR("'camera' input parameter for all shader modes."), "camera", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("InvCamera", "Input", "All", "VisualShaderNodeInput", TTR("'inv_camera' input parameter for all shader modes."), "inv_camera", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("InvProjection", "Input", "All", "VisualShaderNodeInput", TTR("'inv_projection' input parameter for all shader modes."), "inv_projection", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Normal", "Input", "All", "VisualShaderNodeInput", TTR("'normal' input parameter for all shader modes."), "normal", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Projection", "Input", "All", "VisualShaderNodeInput", TTR("'projection' input parameter for all shader modes."), "projection", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Time", "Input", "All", "VisualShaderNodeInput", TTR("'time' input parameter for all shader modes."), "time", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("ViewportSize", "Input", "All", "VisualShaderNodeInput", TTR("'viewport_size' input parameter for all shader modes."), "viewport_size", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("World", "Input", "All", "VisualShaderNodeInput", TTR("'world' input parameter for all shader modes."), "world", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); + const String input_param_shader_modes = "'%s' input parameter for all shader modes."; + add_options.push_back(AddOption("Camera", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "camera"), "camera", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("InvCamera", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "inv_camera"), "inv_camera", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("InvProjection", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "inv_projection"), "inv_projection", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Normal", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "normal"), "normal", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Projection", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "camera"), "projection", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Time", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("ViewportSize", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "viewport_size"), "viewport_size", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("World", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "world"), "world", VisualShaderNode::PORT_TYPE_TRANSFORM, -1, Shader::MODE_SPATIAL)); // CANVASITEM-FOR-ALL - add_options.push_back(AddOption("Alpha", "Input", "All", "VisualShaderNodeInput", TTR("'alpha' input parameter for all shader modes."), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("Color", "Input", "All", "VisualShaderNodeInput", TTR("'color' input parameter for all shader modes."), "color", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("TexturePixelSize", "Input", "All", "VisualShaderNodeInput", TTR("'texture_pixel_size' input parameter for all shader modes."), "texture_pixel_size", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("Time", "Input", "All", "VisualShaderNodeInput", TTR("'time' input parameter for all shader modes."), "time", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("UV", "Input", "All", "VisualShaderNodeInput", TTR("'uv' input parameter for all shader modes."), "uv", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Alpha", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Color", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("TexturePixelSize", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "texture_pixel_size"), "texture_pixel_size", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Time", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, -1, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("UV", "Input", "All", "VisualShaderNodeInput", vformat(TTR(input_param_shader_modes), "uv"), "uv", VisualShaderNode::PORT_TYPE_VECTOR, -1, Shader::MODE_CANVAS_ITEM)); ///////////////// @@ -2073,81 +2073,88 @@ VisualShaderEditor::VisualShaderEditor() { // SPATIAL INPUTS - add_options.push_back(AddOption("Alpha", "Input", "Fragment", "VisualShaderNodeInput", TTR("'alpha' input parameter for vertex and fragment shader modes."), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Binormal", "Input", "Fragment", "VisualShaderNodeInput", TTR("'binormal' input parameter for vertex and fragment shader modes."), "binormal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Color", "Input", "Fragment", "VisualShaderNodeInput", TTR("'color' input parameter for vertex and fragment shader modes."), "color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("FragCoord", "Input", "Fragment", "VisualShaderNodeInput", TTR("'fragcoord' input parameter for fragment and light shader modes."), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("PointCoord", "Input", "Fragment", "VisualShaderNodeInput", TTR("'point_coord' input parameter for fragment shader mode."), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("ScreenUV", "Input", "Fragment", "VisualShaderNodeInput", TTR("'screen_uv' input parameter for fragment shader mode."), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Side", "Input", "Fragment", "VisualShaderNodeInput", TTR("'side' input parameter for fragment shader mode."), "side", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Tangent", "Input", "Fragment", "VisualShaderNodeInput", TTR("'tangent' input parameter for vertex and fragment shader modes."), "tangent", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("UV", "Input", "Fragment", "VisualShaderNodeInput", TTR("'uv' input parameter for vertex and fragment shader modes."), "uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("UV2", "Input", "Fragment", "VisualShaderNodeInput", TTR("'uv2' input parameter for vertex and fragment shader modes."), "uv2", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Vertex", "Input", "Fragment", "VisualShaderNodeInput", TTR("'vertex' input parameter for vertex and fragment shader modes."), "vertex", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("View", "Input", "Fragment", "VisualShaderNodeInput", TTR("'view' input parameter for fragment and light shader modes."), "view", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); - - add_options.push_back(AddOption("Albedo", "Input", "Light", "VisualShaderNodeInput", TTR("'albedo' input parameter for light shader mode."), "albedo", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Attenuation", "Input", "Light", "VisualShaderNodeInput", TTR("'attenuation' input parameter for light shader mode."), "attenuation", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Diffuse", "Input", "Light", "VisualShaderNodeInput", TTR("'diffuse' input parameter for light shader mode."), "diffuse", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("FragCoord", "Input", "Light", "VisualShaderNodeInput", TTR("'fragcoord' input parameter for fragment and light shader modes."), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Light", "Input", "Light", "VisualShaderNodeInput", TTR("'light' input parameter for light shader mode."), "light", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("LightColor", "Input", "Light", "VisualShaderNodeInput", TTR("'light_color' input parameter for light shader mode."), "light_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Roughness", "Input", "Light", "VisualShaderNodeInput", TTR("'roughness' input parameter for light shader mode."), "roughness", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Specular", "Input", "Light", "VisualShaderNodeInput", TTR("'specular' input parameter for light shader mode."), "specular", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Transmission", "Input", "Light", "VisualShaderNodeInput", TTR("'transmission' input parameter for light shader mode."), "transmission", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("View", "Input", "Light", "VisualShaderNodeInput", TTR("'view' input parameter for fragment and light shader modes."), "view", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); - - add_options.push_back(AddOption("Alpha", "Input", "Vertex", "VisualShaderNodeInput", TTR("'alpha' input parameter for vertex and fragment shader modes."), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Binormal", "Input", "Vertex", "VisualShaderNodeInput", TTR("'binormal' input parameter for vertex and fragment shader modes."), "binormal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Color", "Input", "Vertex", "VisualShaderNodeInput", TTR("'color' input parameter for vertex and fragment shader modes."), "color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("ModelView", "Input", "Vertex", "VisualShaderNodeInput", TTR("'modelview' input parameter for vertex shader mode."), "modelview", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("PointSize", "Input", "Vertex", "VisualShaderNodeInput", TTR("'point_size' input parameter for vertex shader mode."), "point_size", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Tangent", "Input", "Vertex", "VisualShaderNodeInput", TTR("'tangent' input parameter for vertex and fragment shader mode."), "tangent", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("UV", "Input", "Vertex", "VisualShaderNodeInput", TTR("'uv' input parameter for vertex and fragment shader modes."), "uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("UV2", "Input", "Vertex", "VisualShaderNodeInput", TTR("'uv2' input parameter for vertex and fragment shader modes."), "uv2", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); - add_options.push_back(AddOption("Vertex", "Input", "Vertex", "VisualShaderNodeInput", TTR("'vertex' input parameter for vertex and fragment shader modes."), "vertex", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + const String input_param_for_vertex_and_fragment_shader_modes = "'%s' input parameter for vertex and fragment shader modes."; + const String input_param_for_fragment_and_light_shader_modes = "'%s' input parameter for fragment and light shader modes."; + const String input_param_for_fragment_shader_mode = "'%s' input parameter for fragment shader mode."; + const String input_param_for_light_shader_mode = "'%s' input parameter for light shader mode."; + const String input_param_for_vertex_shader_mode = "'%s' input parameter for vertex shader mode."; + const String input_param_for_vertex_and_fragment_shader_mode = "'%s' input parameter for vertex and fragment shader mode."; + + add_options.push_back(AddOption("Alpha", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Binormal", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "binormal"), "binormal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Color", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("FragCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("PointCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_shader_mode), "point_coord"), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("ScreenUV", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_shader_mode), "screen_uv"), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Side", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_shader_mode), "side"), "side", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Tangent", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "tangent"), "tangent", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("UV", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "uv"), "uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("UV2", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "uv2"), "uv2", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Vertex", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "vertex"), "vertex", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("View", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "view"), "view", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_SPATIAL)); + + add_options.push_back(AddOption("Albedo", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "albedo"), "albedo", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Attenuation", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "attenuation"), "attenuation", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Diffuse", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "diffuse"), "diffuse", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("FragCoord", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Light", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "light"), "light", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("LightColor", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "light_color"), "light_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Roughness", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "roughness"), "roughness", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Specular", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "specular"), "specular", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Transmission", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "transmission"), "transmission", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("View", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "view"), "view", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_SPATIAL)); + + add_options.push_back(AddOption("Alpha", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Binormal", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "binormal"), "binormal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Color", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("ModelView", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "modelview"), "modelview", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("PointSize", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "point_size"), "point_size", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Tangent", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_mode), "tangent"), "tangent", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("UV", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "uv"), "uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("UV2", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "uv2"), "uv2", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); + add_options.push_back(AddOption("Vertex", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "vertex"), "vertex", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_SPATIAL)); // CANVASITEM INPUTS - add_options.push_back(AddOption("FragCoord", "Input", "Fragment", "VisualShaderNodeInput", TTR("'fragcoord' input parameter for fragment and light shader modes."), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("LightPass", "Input", "Fragment", "VisualShaderNodeInput", TTR("'light_pass' input parameter for vertex and fragment shader modes."), "light_pass", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("PointCoord", "Input", "Fragment", "VisualShaderNodeInput", TTR("'point_coord' input parameter for fragment and light shader modes."), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("ScreenPixelSize", "Input", "Fragment", "VisualShaderNodeInput", TTR("'screen_pixel_size' input parameter for fragment shader mode."), "screen_pixel_size", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("ScreenUV", "Input", "Fragment", "VisualShaderNodeInput", TTR("'screen_uv' input parameter for fragment and light shader modes."), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); - - add_options.push_back(AddOption("FragCoord", "Input", "Light", "VisualShaderNodeInput", TTR("'fragcoord' input parameter for fragment and light shader modes."), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("LightAlpha", "Input", "Light", "VisualShaderNodeInput", TTR("'light_alpha' input parameter for light shader mode."), "light_alpha", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("LightColor", "Input", "Light", "VisualShaderNodeInput", TTR("'light_color' input parameter for light shader mode."), "light_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("LightHeight", "Input", "Light", "VisualShaderNodeInput", TTR("'light_height' input parameter for light shader mode."), "light_height", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("LightUV", "Input", "Light", "VisualShaderNodeInput", TTR("'light_uv' input parameter for light shader mode."), "light_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("LightVector", "Input", "Light", "VisualShaderNodeInput", TTR("'light_vec' input parameter for light shader mode."), "light_vec", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("Normal", "Input", "Light", "VisualShaderNodeInput", TTR("'normal' input parameter for light shader mode."), "normal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("PointCoord", "Input", "Light", "VisualShaderNodeInput", TTR("'point_coord' input parameter for fragment and light shader modes."), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("ScreenUV", "Input", "Light", "VisualShaderNodeInput", TTR("'screen_uv' input parameter for fragment and light shader modes."), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("ShadowColor", "Input", "Light", "VisualShaderNodeInput", TTR("'shadow_color' input parameter for light shader mode."), "shadow_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); - - add_options.push_back(AddOption("Extra", "Input", "Vertex", "VisualShaderNodeInput", TTR("'extra' input parameter for vertex shader mode."), "extra", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("LightPass", "Input", "Vertex", "VisualShaderNodeInput", TTR("'light_pass' input parameter for vertex and fragment shader modes."), "light_pass", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("PointSize", "Input", "Vertex", "VisualShaderNodeInput", TTR("'point_size' input parameter for vertex shader mode."), "point_size", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("Projection", "Input", "Vertex", "VisualShaderNodeInput", TTR("'projection' input parameter for vertex shader mode."), "projection", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("Vertex", "Input", "Vertex", "VisualShaderNodeInput", TTR("'vertex' input parameter for vertex shader mode."), "vertex", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); - add_options.push_back(AddOption("World", "Input", "Vertex", "VisualShaderNodeInput", TTR("'world' input parameter for vertex shader mode."), "world", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("FragCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("LightPass", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "light_pass"), "light_pass", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("PointCoord", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "point_coord"), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("ScreenPixelSize", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_shader_mode), "screen_pixel_size"), "screen_pixel_size", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("ScreenUV", "Input", "Fragment", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "screen_uv"), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_FRAGMENT, Shader::MODE_CANVAS_ITEM)); + + add_options.push_back(AddOption("FragCoord", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "fragcoord"), "fragcoord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("LightAlpha", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "light_alpha"), "light_alpha", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("LightColor", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "light_color"), "light_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("LightHeight", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "light_height"), "light_height", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("LightUV", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "light_uv"), "light_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("LightVector", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "light_vec"), "light_vec", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Normal", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "normal"), "normal", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("PointCoord", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "point_coord"), "point_coord", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("ScreenUV", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_fragment_and_light_shader_modes), "screen_uv"), "screen_uv", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("ShadowColor", "Input", "Light", "VisualShaderNodeInput", vformat(TTR(input_param_for_light_shader_mode), "shadow_color"), "shadow_color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_LIGHT, Shader::MODE_CANVAS_ITEM)); + + add_options.push_back(AddOption("Extra", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "extra"), "extra", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("LightPass", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_and_fragment_shader_modes), "light_pass"), "light_pass", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("PointSize", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "point_size"), "point_size", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Projection", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "projection"), "projection", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("Vertex", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "vertex"), "vertex", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); + add_options.push_back(AddOption("World", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "world"), "world", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_CANVAS_ITEM)); // PARTICLES INPUTS - add_options.push_back(AddOption("Active", "Input", "Vertex", "VisualShaderNodeInput", TTR("'active' input parameter for vertex shader mode."), "active", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Alpha", "Input", "Vertex", "VisualShaderNodeInput", TTR("'alpha' input parameter for vertex shader mode."), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Color", "Input", "Vertex", "VisualShaderNodeInput", TTR("'color' input parameter for vertex shader mode."), "color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Custom", "Input", "Vertex", "VisualShaderNodeInput", TTR("'custom' input parameter for vertex shader mode."), "custom", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("CustomAlpha", "Input", "Vertex", "VisualShaderNodeInput", TTR("'custom_alpha' input parameter for vertex shader mode."), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Delta", "Input", "Vertex", "VisualShaderNodeInput", TTR("'delta' input parameter for vertex shader mode."), "delta", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("EmissionTransform", "Input", "Vertex", "VisualShaderNodeInput", TTR("'emission_transform' input parameter for vertex shader mode."), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", TTR("'index' input parameter for vertex shader mode."), "index", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("LifeTime", "Input", "Vertex", "VisualShaderNodeInput", TTR("'lifetime' input parameter for vertex shader mode."), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Restart", "Input", "Vertex", "VisualShaderNodeInput", TTR("'restart' input parameter for vertex shader mode."), "restart", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Time", "Input", "Vertex", "VisualShaderNodeInput", TTR("'time' input parameter for vertex shader mode."), "time", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Transform", "Input", "Vertex", "VisualShaderNodeInput", TTR("'transform' input parameter for vertex shader mode."), "transform", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); - add_options.push_back(AddOption("Velocity", "Input", "Vertex", "VisualShaderNodeInput", TTR("'velocity' input parameter for vertex shader mode."), "velocity", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Active", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "active"), "active", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Alpha", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "alpha"), "alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Color", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "color"), "color", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Custom", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "custom"), "custom", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("CustomAlpha", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "custom_alpha"), "custom_alpha", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Delta", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "delta"), "delta", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("EmissionTransform", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "emission_transform"), "emission_transform", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Index", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "index"), "index", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("LifeTime", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "lifetime"), "lifetime", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Restart", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "restart"), "restart", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Time", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "time"), "time", VisualShaderNode::PORT_TYPE_SCALAR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Transform", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "transform"), "transform", VisualShaderNode::PORT_TYPE_TRANSFORM, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); + add_options.push_back(AddOption("Velocity", "Input", "Vertex", "VisualShaderNodeInput", vformat(TTR(input_param_for_vertex_shader_mode), "velocity"), "velocity", VisualShaderNode::PORT_TYPE_VECTOR, VisualShader::TYPE_VERTEX, Shader::MODE_PARTICLES)); // SCALAR @@ -2764,3 +2771,30 @@ void VisualShaderNodePortPreview::_bind_methods() { VisualShaderNodePortPreview::VisualShaderNodePortPreview() { } + +////////////////////////////////// + +String VisualShaderConversionPlugin::converts_to() const { + + return "Shader"; +} + +bool VisualShaderConversionPlugin::handles(const Ref<Resource> &p_resource) const { + + Ref<VisualShader> vshader = p_resource; + return vshader.is_valid(); +} + +Ref<Resource> VisualShaderConversionPlugin::convert(const Ref<Resource> &p_resource) const { + + Ref<VisualShader> vshader = p_resource; + ERR_FAIL_COND_V(!vshader.is_valid(), Ref<Resource>()); + + Ref<Shader> shader; + shader.instance(); + + String code = vshader->get_code(); + shader->set_code(code); + + return shader; +} diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h index 49a7a21ea7..fa72b5ec29 100644 --- a/editor/plugins/visual_shader_editor_plugin.h +++ b/editor/plugins/visual_shader_editor_plugin.h @@ -302,4 +302,13 @@ public: VisualShaderNodePortPreview(); }; +class VisualShaderConversionPlugin : public EditorResourceConversionPlugin { + GDCLASS(VisualShaderConversionPlugin, EditorResourceConversionPlugin); + +public: + virtual String converts_to() const; + virtual bool handles(const Ref<Resource> &p_resource) const; + virtual Ref<Resource> convert(const Ref<Resource> &p_resource) const; +}; + #endif // VISUAL_SHADER_EDITOR_PLUGIN_H diff --git a/editor/project_export.cpp b/editor/project_export.cpp index 956da92c35..c78a81dbe0 100644 --- a/editor/project_export.cpp +++ b/editor/project_export.cpp @@ -931,8 +931,17 @@ void ProjectExportDialog::_export_project() { export_project->add_filter("*." + extension_list[i] + " ; " + platform->get_name() + " Export"); } - if (current->get_export_path() != "") { - export_project->set_current_path(current->get_export_path()); + String current_preset_export_path = current->get_export_path(); + + if (current_preset_export_path != "") { + + if (!DirAccess::exists(current_preset_export_path.get_base_dir())) { + + DirAccessRef da(DirAccess::create(DirAccess::ACCESS_FILESYSTEM)); + da->make_dir_recursive(current_preset_export_path.get_base_dir()); + } + + export_project->set_current_path(current_preset_export_path); } else { if (extension_list.size() >= 1) { export_project->set_current_file(default_filename + "." + extension_list[0]); diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index df0dd8781e..001846604c 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -42,10 +42,10 @@ ProjectSettingsEditor *ProjectSettingsEditor::singleton = NULL; static const char *_button_names[JOY_BUTTON_MAX] = { - "PS Cross, XBox A, Nintendo B", - "PS Circle, XBox B, Nintendo A", - "PS Square, XBox X, Nintendo Y", - "PS Triangle, XBox Y, Nintendo X", + "DualShock Cross, Xbox A, Nintendo B", + "DualShock Circle, Xbox B, Nintendo A", + "DualShock Square, Xbox X, Nintendo Y", + "DualShock Triangle, Xbox Y, Nintendo X", "L, L1", "R, R1", "L2", @@ -257,7 +257,7 @@ void ProjectSettingsEditor::_device_input_add() { Ref<InputEventJoypadMotion> jm; jm.instance(); jm->set_axis(device_index->get_selected() >> 1); - jm->set_axis_value(device_index->get_selected() & 1 ? 1 : -1); + jm->set_axis_value((device_index->get_selected() & 1) ? 1 : -1); jm->set_device(_get_current_device()); for (int i = 0; i < events.size(); i++) { @@ -483,7 +483,7 @@ void ProjectSettingsEditor::_add_item(int p_item, Ref<InputEvent> p_exiting_even for (int i = 0; i < JOY_AXIS_MAX * 2; i++) { String desc = _axis_names[i]; - device_index->add_item(TTR("Axis") + " " + itos(i / 2) + " " + (i & 1 ? "+" : "-") + desc); + device_index->add_item(TTR("Axis") + " " + itos(i / 2) + " " + ((i & 1) ? "+" : "-") + desc); } device_input->popup_centered_minsize(Size2(350, 95) * EDSCALE); diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 6072e11a78..8130744b4e 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1495,7 +1495,6 @@ void SceneTreeDock::_do_reparent(Node *p_new_parent, int p_position_in_parent, V if (p_nodes.find(validate) != -1) { ERR_EXPLAIN("Selection changed at some point.. can't reparent"); ERR_FAIL(); - return; } validate = validate->get_parent(); } diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 00c8ed6ad3..8fd1064427 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -626,8 +626,7 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da d["frame"] = i; s->set_metadata(0, d); - //String line = itos(i)+" - "+String(d["file"])+":"+itos(d["line"])+" - at func: "+d["function"]; - String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]); + String line = itos(i) + " - " + String(d["file"]) + ":" + itos(d["line"]) + " - at function: " + d["function"]; s->set_text(0, line); if (i == 0) diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp index fc4ff2ecfc..fe6d9dd8c7 100644 --- a/editor/spatial_editor_gizmos.cpp +++ b/editor/spatial_editor_gizmos.cpp @@ -147,7 +147,7 @@ void EditorSpatialGizmo::set_handle(int p_idx, Camera *p_camera, const Point2 &p } ERR_FAIL_COND(!gizmo_plugin); - return gizmo_plugin->set_handle(this, p_idx, p_camera, p_point); + gizmo_plugin->set_handle(this, p_idx, p_camera, p_point); } void EditorSpatialGizmo::commit_handle(int p_idx, const Variant &p_restore, bool p_cancel) { @@ -158,7 +158,7 @@ void EditorSpatialGizmo::commit_handle(int p_idx, const Variant &p_restore, bool } ERR_FAIL_COND(!gizmo_plugin); - return gizmo_plugin->commit_handle(this, p_idx, p_restore, p_cancel); + gizmo_plugin->commit_handle(this, p_idx, p_restore, p_cancel); } void EditorSpatialGizmo::set_spatial_node(Spatial *p_node) { diff --git a/editor/translations/extract.py b/editor/translations/extract.py index 70eb15da62..07b34f7562 100755 --- a/editor/translations/extract.py +++ b/editor/translations/extract.py @@ -116,7 +116,7 @@ shutil.move("editor.pot", "editor/translations/editor.pot") # TODO: Make that in a portable way, if we care; if not, kudos to Unix users if (os.name == "posix"): - added = subprocess.check_output("git diff editor/translations/editor.pot | grep \+msgid | wc -l", shell=True) - removed = subprocess.check_output("git diff editor/translations/editor.pot | grep \\\-msgid | wc -l", shell=True) + added = subprocess.check_output(r"git diff editor/translations/editor.pot | grep \+msgid | wc -l", shell=True) + removed = subprocess.check_output(r"git diff editor/translations/editor.pot | grep \\\-msgid | wc -l", shell=True) print("\n# Template changes compared to the staged status:") print("# Additions: %s msgids.\n# Deletions: %s msgids." % (int(added), int(removed))) diff --git a/main/main.cpp b/main/main.cpp index 9183dab58c..3f84eca1d2 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -599,6 +599,10 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph auto_build_solutions = true; editor = true; + } else if (I->get() == "--export" || I->get() == "--export-debug") { // Export project + + editor = true; + main_args.push_back(I->get()); #endif } else if (I->get() == "--path") { // set path of project to start or edit @@ -1343,20 +1347,10 @@ bool Main::start() { removal_docs.push_back(args[j]); } else if (args[i] == "--export") { editor = true; //needs editor - if (i + 1 < args.size()) { - _export_preset = args[i + 1]; - } else { - ERR_PRINT("Export preset name not specified"); - return false; - } + _export_preset = args[i + 1]; } else if (args[i] == "--export-debug") { editor = true; //needs editor - if (i + 1 < args.size()) { - _export_preset = args[i + 1]; - } else { - ERR_PRINT("Export preset name not specified"); - return false; - } + _export_preset = args[i + 1]; export_debug = true; #endif } else { @@ -1375,6 +1369,8 @@ bool Main::start() { #ifdef TOOLS_ENABLED if (doc_tool != "") { + Engine::get_singleton()->set_editor_hint(true); // Needed to instance editor-only classes for their default values + { DirAccessRef da = DirAccess::open(doc_tool); if (!da) { @@ -1713,13 +1709,13 @@ bool Main::start() { if (sep == -1) { DirAccess *da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM); - local_game_path = da->get_current_dir() + "/" + local_game_path; + local_game_path = da->get_current_dir().plus_file(local_game_path); memdelete(da); } else { DirAccess *da = DirAccess::open(local_game_path.substr(0, sep)); if (da) { - local_game_path = da->get_current_dir() + "/" + local_game_path.substr(sep + 1, local_game_path.length()); + local_game_path = da->get_current_dir().plus_file(local_game_path.substr(sep + 1, local_game_path.length())); memdelete(da); } } diff --git a/methods.py b/methods.py index af20619416..3ed44329a7 100644 --- a/methods.py +++ b/methods.py @@ -181,7 +181,7 @@ def win32_spawn(sh, escape, cmd, args, env): env[e] = str(env[e]) proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo, shell=False, env=env) - data, err = proc.communicate() + _, err = proc.communicate() rv = proc.wait() if rv: print("=====") @@ -242,7 +242,7 @@ def use_windows_spawn_fix(self, platform=None): startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW proc = subprocess.Popen(cmdline, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, startupinfo=startupinfo, shell=False, env=env) - data, err = proc.communicate() + _, err = proc.communicate() rv = proc.wait() if rv: print("=====") @@ -487,7 +487,7 @@ def find_visual_c_batch_file(env): from SCons.Tool.MSCommon.vc import get_default_version, get_host_target, find_batch_file version = get_default_version(env) - (host_platform, target_platform,req_target_platform) = get_host_target(env) + (host_platform, target_platform, _) = get_host_target(env) return find_batch_file(env, version, host_platform, target_platform)[0] def generate_cpp_hint_file(filename): @@ -598,7 +598,7 @@ def detect_darwin_sdk_path(platform, env): sdk_path = decode_utf8(subprocess.check_output(['xcrun', '--sdk', sdk_name, '--show-sdk-path']).strip()) if sdk_path: env[var_name] = sdk_path - except (subprocess.CalledProcessError, OSError) as e: + except (subprocess.CalledProcessError, OSError): print("Failed to find SDK path while running xcrun --sdk {} --show-sdk-path.".format(sdk_name)) raise diff --git a/modules/arkit/SCsub b/modules/arkit/SCsub new file mode 100644 index 0000000000..b43d936768 --- /dev/null +++ b/modules/arkit/SCsub @@ -0,0 +1,10 @@ +#!/usr/bin/env python + +Import('env') +Import('env_modules') + +env_arkit = env_modules.Clone() + +# Add source files +env_arkit.add_source_files(env.modules_sources, "*.cpp") +env_arkit.add_source_files(env.modules_sources, "*.mm") diff --git a/modules/arkit/arkit_interface.h b/modules/arkit/arkit_interface.h new file mode 100644 index 0000000000..8129611287 --- /dev/null +++ b/modules/arkit/arkit_interface.h @@ -0,0 +1,125 @@ +/*************************************************************************/ +/* arkit_interface.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 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 ARKIT_INTERFACE_H +#define ARKIT_INTERFACE_H + +#include "servers/arvr/arvr_interface.h" +#include "servers/arvr/arvr_positional_tracker.h" +#include "servers/camera/camera_feed.h" + +/** + @author Bastiaan Olij <mux213@gmail.com> + + ARKit interface between iPhone and Godot +*/ + +// forward declaration for some needed objects +class ARKitShader; + +class ARKitInterface : public ARVRInterface { + GDCLASS(ARKitInterface, ARVRInterface); + +private: + bool initialized; + bool session_was_started; + bool plane_detection_is_enabled; + bool light_estimation_is_enabled; + real_t ambient_intensity; + real_t ambient_color_temperature; + + Transform transform; + CameraMatrix projection; + float eye_height, z_near, z_far; + + Ref<CameraFeed> feed; + int image_width[2]; + int image_height[2]; + PoolVector<uint8_t> img_data[2]; + + struct anchor_map { + ARVRPositionalTracker *tracker; + unsigned char uuid[16]; + }; + + ///@TODO should use memory map object from Godot? + unsigned int num_anchors; + unsigned int max_anchors; + anchor_map *anchors; + ARVRPositionalTracker *get_anchor_for_uuid(const unsigned char *p_uuid); + void remove_anchor_for_uuid(const unsigned char *p_uuid); + void remove_all_anchors(); + +protected: + static void _bind_methods(); + +public: + void start_session(); + void stop_session(); + + bool get_anchor_detection_is_enabled() const; + void set_anchor_detection_is_enabled(bool p_enable); + virtual int get_camera_feed_id(); + + bool get_light_estimation_is_enabled() const; + void set_light_estimation_is_enabled(bool p_enable); + + real_t get_ambient_intensity() const; + real_t get_ambient_color_temperature() const; + + /* while Godot has its own raycast logic this takes ARKits camera into account and hits on any ARAnchor */ + Array raycast(Vector2 p_screen_coord); + + void notification(int p_what); + + virtual StringName get_name() const; + virtual int get_capabilities() const; + + virtual bool is_initialized() const; + virtual bool initialize(); + virtual void uninitialize(); + + virtual Size2 get_render_targetsize(); + virtual bool is_stereo(); + virtual Transform get_transform_for_eye(ARVRInterface::Eyes p_eye, const Transform &p_cam_transform); + virtual CameraMatrix get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far); + virtual void commit_for_eye(ARVRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect); + + virtual void process(); + + // called by delegate (void * because C++ and Obj-C don't always mix, should really change all platform/iphone/*.cpp files to .mm) + void _add_or_update_anchor(void *p_anchor); + void _remove_anchor(void *p_anchor); + + ARKitInterface(); + ~ARKitInterface(); +}; + +#endif /* !ARKIT_INTERFACE_H */ diff --git a/modules/arkit/arkit_interface.mm b/modules/arkit/arkit_interface.mm new file mode 100644 index 0000000000..de58f93276 --- /dev/null +++ b/modules/arkit/arkit_interface.mm @@ -0,0 +1,738 @@ +/*************************************************************************/ +/* arkit_interface.mm */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 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 "camera_ios.h" +#include "core/os/input.h" +#include "core/os/os.h" +#include "scene/resources/surface_tool.h" +#include "servers/visual/visual_server_globals.h" + +#import <ARKit/ARKit.h> +#import <UIKit/UIKit.h> + +#include "arkit_interface.h" +#include "arkit_session_delegate.h" + +// just a dirty workaround for now, declare these as globals. I'll probably encapsulate ARSession and associated logic into an mm object and change ARKitInterface to a normal cpp object that consumes it. +ARSession *ar_session; +ARKitSessionDelegate *ar_delegate; +NSTimeInterval last_timestamp; + +/* this is called when we initialize or when we come back from having our app pushed to the background, just (re)start our session */ +void ARKitInterface::start_session() { + // We're active... + session_was_started = true; + + // Ignore this if we're not initialized... + if (initialized) { + print_line("Starting ARKit session"); + ARWorldTrackingConfiguration *configuration = [ARWorldTrackingConfiguration new]; + configuration.lightEstimationEnabled = light_estimation_is_enabled; + if (plane_detection_is_enabled) { + configuration.planeDetection = ARPlaneDetectionVertical | ARPlaneDetectionHorizontal; + } else { + configuration.planeDetection = 0; + } + + // make sure our camera is on + if (feed.is_valid()) { + feed->set_active(true); + } + + [ar_session runWithConfiguration:configuration]; + } +} + +void ARKitInterface::stop_session() { + session_was_started = false; + + // Ignore this if we're not initialized... + if (initialized) { + // make sure our camera is off + if (feed.is_valid()) { + feed->set_active(false); + } + + [ar_session pause]; + } +} + +void ARKitInterface::notification(int p_what) { + // TODO, this is not being called, need to find out why, possibly because this is not a node. + // in that case we need to find a way to get these notifications! + switch (p_what) { + case MainLoop::NOTIFICATION_WM_FOCUS_IN: { + print_line("Focus in"); + + start_session(); + }; break; + case MainLoop::NOTIFICATION_WM_FOCUS_OUT: { + print_line("Focus out"); + + stop_session(); + }; break; + default: + break; + } +} + +bool ARKitInterface::get_anchor_detection_is_enabled() const { + return plane_detection_is_enabled; +} + +void ARKitInterface::set_anchor_detection_is_enabled(bool p_enable) { + if (plane_detection_is_enabled != p_enable) { + plane_detection_is_enabled = p_enable; + + // Restart our session (this will be ignore if we're not initialised) + if (session_was_started) { + start_session(); + } + } +} + +int ARKitInterface::get_camera_feed_id() { + if (feed.is_null()) { + return 0; + } else { + return feed->get_id(); + } +} + +bool ARKitInterface::get_light_estimation_is_enabled() const { + return light_estimation_is_enabled; +} + +void ARKitInterface::set_light_estimation_is_enabled(bool p_enable) { + if (light_estimation_is_enabled != p_enable) { + light_estimation_is_enabled = p_enable; + + // Restart our session (this will be ignore if we're not initialised) + if (session_was_started) { + start_session(); + } + } +} + +real_t ARKitInterface::get_ambient_intensity() const { + return ambient_intensity; +} + +real_t ARKitInterface::get_ambient_color_temperature() const { + return ambient_color_temperature; +} + +StringName ARKitInterface::get_name() const { + return "ARKit"; +} + +int ARKitInterface::get_capabilities() const { + return ARKitInterface::ARVR_MONO + ARKitInterface::ARVR_AR; +} + +Array ARKitInterface::raycast(Vector2 p_screen_coord) { + Array arr; + Size2 screen_size = OS::get_singleton()->get_window_size(); + CGPoint point; + point.x = p_screen_coord.x / screen_size.x; + point.y = p_screen_coord.y / screen_size.y; + + ///@TODO maybe give more options here, for now we're taking just ARAchors into account that were found during plane detection keeping their size into account + NSArray<ARHitTestResult *> *results = [ar_session.currentFrame hittest:point types:ARHitTestResultTypeExistingPlaneUsingExtent]; + + for (ARHitTestResult *result in results) { + Transform transform; + + matrix_float4x4 m44 = result.worldTransform; + transform.basis.elements[0].x = m44.columns[0][0]; + transform.basis.elements[1].x = m44.columns[0][1]; + transform.basis.elements[2].x = m44.columns[0][2]; + transform.basis.elements[0].y = m44.columns[1][0]; + transform.basis.elements[1].y = m44.columns[1][1]; + transform.basis.elements[2].y = m44.columns[1][2]; + transform.basis.elements[0].z = m44.columns[2][0]; + transform.basis.elements[1].z = m44.columns[2][1]; + transform.basis.elements[2].z = m44.columns[2][2]; + transform.origin.x = m44.columns[3][0]; + transform.origin.y = m44.columns[3][1]; + transform.origin.z = m44.columns[3][2]; + + /* important, NOT scaled to world_scale !! */ + arr.push_back(transform); + } + + return arr; +} + +void ARKitInterface::_bind_methods() { + ClassDB::bind_method(D_METHOD("_notification", "what"), &ARKitInterface::_notification); + + ClassDB::bind_method(D_METHOD("set_light_estimation_is_enabled", "enable"), &ARKitInterface::set_light_estimation_is_enabled); + ClassDB::bind_method(D_METHOD("get_light_estimation_is_enabled"), &ARKitInterface::get_light_estimation_is_enabled); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "light_estimation"), "set_light_estimation_is_enabled", "get_light_estimation_is_enabled"); + + ClassDB::bind_method(D_METHOD("get_ambient_intensity"), &ARKitInterface::get_ambient_intensity); + ClassDB::bind_method(D_METHOD("get_ambient_color_temperature"), &ARKitInterface::get_ambient_color_temperature); + + ClassDB::bind_method(D_METHOD("raycast", "screen_coord"), &ARKitInterface::raycast); +} + +bool ARKitInterface::is_stereo() { + // this is a mono device... + return false; +} + +bool ARKitInterface::is_initialized() const { + return initialized; +} + +bool ARKitInterface::initialize() { + ARVRServer *arvr_server = ARVRServer::get_singleton(); + ERR_FAIL_NULL_V(arvr_server, false); + + if (!initialized) { + print_line("initializing ARKit"); + + // create our ar session and delegate + ar_session = [ARSession new]; + ar_delegate = [ARKitSessionDelegate new]; + ar_delegate.arkit_interface = this; + ar_session.delegate = ar_delegate; + + // reset our transform + transform = Transform(); + + // make this our primary interface + arvr_server->set_primary_interface(this); + + // make sure we have our feed setup + if (feed.is_null()) { + feed.instance(); + feed->set_name("ARKit"); + + CameraServer *cs = CameraServer::get_singleton(); + if (cs != NULL) { + cs->add_feed(feed); + } + } + feed->set_active(true); + + // yeah! + initialized = true; + + // Start our session... + start_session(); + } + + return true; +} + +void ARKitInterface::uninitialize() { + if (initialized) { + ARVRServer *arvr_server = ARVRServer::get_singleton(); + if (arvr_server != NULL) { + // no longer our primary interface + arvr_server->clear_primary_interface_if(this); + } + + if (feed.is_valid()) { + CameraServer *cs = CameraServer::get_singleton(); + if ((cs != NULL)) { + cs->remove_feed(feed); + } + feed.unref(); + } + + remove_all_anchors(); + + [ar_session release]; + [ar_delegate release]; + ar_session = NULL; + ar_delegate = NULL; + initialized = false; + session_was_started = false; + } +} + +Size2 ARKitInterface::get_render_targetsize() { + _THREAD_SAFE_METHOD_ + + Size2 target_size = OS::get_singleton()->get_window_size(); + + return target_size; +} + +Transform ARKitInterface::get_transform_for_eye(ARVRInterface::Eyes p_eye, const Transform &p_cam_transform) { + _THREAD_SAFE_METHOD_ + + Transform transform_for_eye; + + ARVRServer *arvr_server = ARVRServer::get_singleton(); + ERR_FAIL_NULL_V(arvr_server, transform_for_eye); + + if (initialized) { + float world_scale = arvr_server->get_world_scale(); + + // just scale our origin point of our transform, note that we really shouldn't be using world_scale in ARKit but.... + transform_for_eye = transform; + transform_for_eye.origin *= world_scale; + + transform_for_eye = p_cam_transform * arvr_server->get_reference_frame() * transform_for_eye; + } else { + // huh? well just return what we got.... + transform_for_eye = p_cam_transform; + } + + return transform_for_eye; +} + +CameraMatrix ARKitInterface::get_projection_for_eye(ARVRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far) { + // Remember our near and far, it will be used in process when we obtain our projection from our ARKit session. + z_near = p_z_near; + z_far = p_z_far; + + return projection; +} + +void ARKitInterface::commit_for_eye(ARVRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) { + _THREAD_SAFE_METHOD_ + + // We must have a valid render target + ERR_FAIL_COND(!p_render_target.is_valid()); + + // Because we are rendering to our device we must use our main viewport! + ERR_FAIL_COND(p_screen_rect == Rect2()); + + // get the size of our screen + Rect2 screen_rect = p_screen_rect; + + // screen_rect.position.x += screen_rect.size.x; + // screen_rect.size.x = -screen_rect.size.x; + // screen_rect.position.y += screen_rect.size.y; + // screen_rect.size.y = -screen_rect.size.y; + + VSG::rasterizer->set_current_render_target(RID()); + VSG::rasterizer->blit_render_target_to_screen(p_render_target, screen_rect, 0); +} + +ARVRPositionalTracker *ARKitInterface::get_anchor_for_uuid(const unsigned char *p_uuid) { + if (anchors == NULL) { + num_anchors = 0; + max_anchors = 10; + anchors = (anchor_map *)malloc(sizeof(anchor_map) * max_anchors); + } + + ERR_FAIL_NULL_V(anchors, NULL); + + for (unsigned int i = 0; i < num_anchors; i++) { + if (memcmp(anchors[i].uuid, p_uuid, 16) == 0) { + return anchors[i].tracker; + } + } + + if (num_anchors + 1 == max_anchors) { + max_anchors += 10; + anchors = (anchor_map *)realloc(anchors, sizeof(anchor_map) * max_anchors); + ERR_FAIL_NULL_V(anchors, NULL); + } + + ARVRPositionalTracker *new_tracker = memnew(ARVRPositionalTracker); + new_tracker->set_type(ARVRServer::TRACKER_ANCHOR); + + char tracker_name[256]; + sprintf(tracker_name, "Anchor %02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", p_uuid[0], p_uuid[1], p_uuid[2], p_uuid[3], p_uuid[4], p_uuid[5], p_uuid[6], p_uuid[7], p_uuid[8], p_uuid[9], p_uuid[10], p_uuid[11], p_uuid[12], p_uuid[13], p_uuid[14], p_uuid[15]); + + String name = tracker_name; + print_line("Adding tracker " + name); + new_tracker->set_name(name); + + // add our tracker + ARVRServer::get_singleton()->add_tracker(new_tracker); + anchors[num_anchors].tracker = new_tracker; + memcpy(anchors[num_anchors].uuid, p_uuid, 16); + num_anchors++; + + return new_tracker; +} + +void ARKitInterface::remove_anchor_for_uuid(const unsigned char *p_uuid) { + if (anchors != NULL) { + for (unsigned int i = 0; i < num_anchors; i++) { + if (memcmp(anchors[i].uuid, p_uuid, 16) == 0) { + // remove our tracker + ARVRServer::get_singleton()->remove_tracker(anchors[i].tracker); + memdelete(anchors[i].tracker); + + // bring remaining forward + for (unsigned int j = i + 1; j < num_anchors; j++) { + anchors[j - 1] = anchors[j]; + }; + + // decrease count + num_anchors--; + return; + } + } + } +} + +void ARKitInterface::remove_all_anchors() { + if (anchors != NULL) { + for (unsigned int i = 0; i < num_anchors; i++) { + // remove our tracker + ARVRServer::get_singleton()->remove_tracker(anchors[i].tracker); + memdelete(anchors[i].tracker); + }; + + free(anchors); + anchors = NULL; + num_anchors = 0; + } +} + +void ARKitInterface::process() { + _THREAD_SAFE_METHOD_ + + if (@available(iOS 11.0, *)) { + if (initialized) { + // get our next ARFrame + ARFrame *current_frame = ar_session.currentFrame; + if (last_timestamp != current_frame.timestamp) { + // only process if we have a new frame + last_timestamp = current_frame.timestamp; + + // get some info about our screen and orientation + Size2 screen_size = OS::get_singleton()->get_window_size(); + UIDeviceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; + + // Grab our camera image for our backbuffer + CVPixelBufferRef pixelBuffer = current_frame.capturedImage; + if ((CVPixelBufferGetPlaneCount(pixelBuffer) == 2) && (feed != NULL)) { + // Plane 0 is our Y and Plane 1 is our CbCr buffer + + // ignored, we check each plane separately + // image_width = CVPixelBufferGetWidth(pixelBuffer); + // image_height = CVPixelBufferGetHeight(pixelBuffer); + + // printf("Pixel buffer %i - %i\n", image_width, image_height); + + CVPixelBufferLockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly); + + // get our buffers + unsigned char *dataY = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 0); + unsigned char *dataCbCr = (unsigned char *)CVPixelBufferGetBaseAddressOfPlane(pixelBuffer, 1); + + if (dataY == NULL) { + print_line("Couldn't access Y pixel buffer data"); + } else if (dataCbCr == NULL) { + print_line("Couldn't access CbCr pixel buffer data"); + } else { + Ref<Image> img[2]; + size_t extraLeft, extraRight, extraTop, extraBottom; + + CVPixelBufferGetExtendedPixels(pixelBuffer, &extraLeft, &extraRight, &extraTop, &extraBottom); + + { + // do Y + int new_width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 0); + int new_height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 0); + int bytes_per_row = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0); + + if ((image_width[0] != new_width) || (image_height[0] != new_height)) { + printf("- Camera padding l:%lu r:%lu t:%lu b:%lu\n", extraLeft, extraRight, extraTop, extraBottom); + printf("- Camera Y plane size: %i, %i - %i\n", new_width, new_height, bytes_per_row); + + image_width[0] = new_width; + image_height[0] = new_height; + img_data[0].resize(new_width * new_height); + } + + PoolVector<uint8_t>::Write w = img_data[0].write(); + if (new_width == bytes_per_row) { + memcpy(w.ptr(), dataY, new_width * new_height); + } else { + int offset_a = 0; + int offset_b = extraLeft + (extraTop * bytes_per_row); + for (int r = 0; r < new_height; r++) { + memcpy(w.ptr() + offset_a, dataY + offset_b, new_width); + offset_a += new_width; + offset_b += bytes_per_row; + } + } + + img[0].instance(); + img[0]->create(new_width, new_height, 0, Image::FORMAT_R8, img_data[0]); + } + + { + // do CbCr + int new_width = CVPixelBufferGetWidthOfPlane(pixelBuffer, 1); + int new_height = CVPixelBufferGetHeightOfPlane(pixelBuffer, 1); + int bytes_per_row = CVPixelBufferGetBytesPerRowOfPlane(pixelBuffer, 0); + + if ((image_width[1] != new_width) || (image_height[1] != new_height)) { + printf("- Camera CbCr plane size: %i, %i - %i\n", new_width, new_height, bytes_per_row); + + image_width[1] = new_width; + image_height[1] = new_height; + img_data[1].resize(2 * new_width * new_height); + } + + PoolVector<uint8_t>::Write w = img_data[1].write(); + if ((2 * new_width) == bytes_per_row) { + memcpy(w.ptr(), dataCbCr, 2 * new_width * new_height); + } else { + int offset_a = 0; + int offset_b = extraLeft + (extraTop * bytes_per_row); + for (int r = 0; r < new_height; r++) { + memcpy(w.ptr() + offset_a, dataCbCr + offset_b, 2 * new_width); + offset_a += 2 * new_width; + offset_b += bytes_per_row; + } + } + + img[1].instance(); + img[1]->create(new_width, new_height, 0, Image::FORMAT_RG8, img_data[1]); + } + + // set our texture... + feed->set_YCbCr_imgs(img[0], img[1]); + + // now build our transform to display this as a background image that matches our camera + CGAffineTransform affine_transform = [current_frame displayTransformForOrientation:orientation viewportSize:CGSizeMake(screen_size.width, screen_size.height)]; + + // we need to invert this, probably row v.s. column notation + affine_transform = CGAffineTransformInvert(affine_transform); + + if (orientation != UIDeviceOrientationPortrait) { + affine_transform.b = -affine_transform.b; + affine_transform.d = -affine_transform.d; + affine_transform.ty = 1.0 - affine_transform.ty; + } else { + affine_transform.c = -affine_transform.c; + affine_transform.a = -affine_transform.a; + affine_transform.tx = 1.0 - affine_transform.tx; + } + + Transform2D display_transform = Transform2D( + affine_transform.a, affine_transform.b, + affine_transform.c, affine_transform.d, + affine_transform.tx, affine_transform.ty); + + feed->set_transform(display_transform); + } + + // and unlock + CVPixelBufferUnlockBaseAddress(pixelBuffer, kCVPixelBufferLock_ReadOnly); + } + + // Record light estimation to apply to our scene + if (light_estimation_is_enabled) { + ambient_intensity = current_frame.lightEstimate.ambientIntensity; + + ///@TODO it's there, but not there.. what to do with this... + // https://developer.apple.com/documentation/arkit/arlightestimate?language=objc + // ambient_color_temperature = current_frame.lightEstimate.ambientColorTemperature; + } + + // Process our camera + ARCamera *camera = current_frame.camera; + + // strangely enough we have to states, rolling them up into one + if (camera.trackingState == ARTrackingStateNotAvailable) { + // no tracking, would be good if we black out the screen or something... + tracking_state = ARVRInterface::ARVR_NOT_TRACKING; + } else { + if (camera.trackingState == ARTrackingStateNormal) { + tracking_state = ARVRInterface::ARVR_NORMAL_TRACKING; + } else if (camera.trackingStateReason == ARTrackingStateReasonExcessiveMotion) { + tracking_state = ARVRInterface::ARVR_EXCESSIVE_MOTION; + } else if (camera.trackingStateReason == ARTrackingStateReasonInsufficientFeatures) { + tracking_state = ARVRInterface::ARVR_INSUFFICIENT_FEATURES; + } else { + tracking_state = ARVRInterface::ARVR_UNKNOWN_TRACKING; + } + + // copy our current frame transform + matrix_float4x4 m44 = camera.transform; + if (orientation == UIDeviceOrientationLandscapeLeft) { + transform.basis.elements[0].x = m44.columns[0][0]; + transform.basis.elements[1].x = m44.columns[0][1]; + transform.basis.elements[2].x = m44.columns[0][2]; + transform.basis.elements[0].y = m44.columns[1][0]; + transform.basis.elements[1].y = m44.columns[1][1]; + transform.basis.elements[2].y = m44.columns[1][2]; + } else if (orientation == UIDeviceOrientationPortrait) { + transform.basis.elements[0].x = m44.columns[1][0]; + transform.basis.elements[1].x = m44.columns[1][1]; + transform.basis.elements[2].x = m44.columns[1][2]; + transform.basis.elements[0].y = -m44.columns[0][0]; + transform.basis.elements[1].y = -m44.columns[0][1]; + transform.basis.elements[2].y = -m44.columns[0][2]; + } else if (orientation == UIDeviceOrientationLandscapeRight) { + transform.basis.elements[0].x = -m44.columns[0][0]; + transform.basis.elements[1].x = -m44.columns[0][1]; + transform.basis.elements[2].x = -m44.columns[0][2]; + transform.basis.elements[0].y = -m44.columns[1][0]; + transform.basis.elements[1].y = -m44.columns[1][1]; + transform.basis.elements[2].y = -m44.columns[1][2]; + } else if (orientation == UIDeviceOrientationPortraitUpsideDown) { + // this may not be correct + transform.basis.elements[0].x = m44.columns[1][0]; + transform.basis.elements[1].x = m44.columns[1][1]; + transform.basis.elements[2].x = m44.columns[1][2]; + transform.basis.elements[0].y = m44.columns[0][0]; + transform.basis.elements[1].y = m44.columns[0][1]; + transform.basis.elements[2].y = m44.columns[0][2]; + } + transform.basis.elements[0].z = m44.columns[2][0]; + transform.basis.elements[1].z = m44.columns[2][1]; + transform.basis.elements[2].z = m44.columns[2][2]; + transform.origin.x = m44.columns[3][0]; + transform.origin.y = m44.columns[3][1]; + transform.origin.z = m44.columns[3][2]; + + // copy our current frame projection, investigate using projectionMatrixWithViewportSize:orientation:zNear:zFar: so we can set our own near and far + m44 = [camera projectionMatrixForOrientation:orientation viewportSize:CGSizeMake(screen_size.width, screen_size.height) zNear:z_near zFar:z_far]; + projection.matrix[0][0] = m44.columns[0][0]; + projection.matrix[1][0] = m44.columns[1][0]; + projection.matrix[2][0] = m44.columns[2][0]; + projection.matrix[3][0] = m44.columns[3][0]; + projection.matrix[0][1] = m44.columns[0][1]; + projection.matrix[1][1] = m44.columns[1][1]; + projection.matrix[2][1] = m44.columns[2][1]; + projection.matrix[3][1] = m44.columns[3][1]; + projection.matrix[0][2] = m44.columns[0][2]; + projection.matrix[1][2] = m44.columns[1][2]; + projection.matrix[2][2] = m44.columns[2][2]; + projection.matrix[3][2] = m44.columns[3][2]; + projection.matrix[0][3] = m44.columns[0][3]; + projection.matrix[1][3] = m44.columns[1][3]; + projection.matrix[2][3] = m44.columns[2][3]; + projection.matrix[3][3] = m44.columns[3][3]; + } + } + } + } +} + +void ARKitInterface::_add_or_update_anchor(void *p_anchor) { + _THREAD_SAFE_METHOD_ + + ARAnchor *anchor = (ARAnchor *)p_anchor; + + unsigned char uuid[16]; + [anchor.identifier getUUIDBytes:uuid]; + + ARVRPositionalTracker *tracker = get_anchor_for_uuid(uuid); + if (tracker != NULL) { + // lets update our mesh! (using Arjens code as is for now) + // we should also probably limit how often we do this... + + // can we safely cast this? + ARPlaneAnchor *planeAnchor = (ARPlaneAnchor *)anchor; + + if (planeAnchor.geometry.triangleCount > 0) { + Ref<SurfaceTool> surftool; + surftool.instance(); + surftool->begin(Mesh::PRIMITIVE_TRIANGLES); + + for (int j = planeAnchor.geometry.triangleCount * 3 - 1; j >= 0; j--) { + int16_t index = planeAnchor.geometry.triangleIndices[j]; + simd_float3 vrtx = planeAnchor.geometry.vertices[index]; + simd_float2 textcoord = planeAnchor.geometry.textureCoordinates[index]; + surftool->add_uv(Vector2(textcoord[0], textcoord[1])); + surftool->add_color(Color(0.8, 0.8, 0.8)); + surftool->add_vertex(Vector3(vrtx[0], vrtx[1], vrtx[2])); + } + + surftool->generate_normals(); + tracker->set_mesh(surftool->commit()); + } else { + Ref<Mesh> nomesh; + tracker->set_mesh(nomesh); + } + + // Note, this also contains a scale factor which gives us an idea of the size of the anchor + // We may extract that in our ARVRAnchor class + Basis b; + matrix_float4x4 m44 = anchor.transform; + b.elements[0].x = m44.columns[0][0]; + b.elements[1].x = m44.columns[0][1]; + b.elements[2].x = m44.columns[0][2]; + b.elements[0].y = m44.columns[1][0]; + b.elements[1].y = m44.columns[1][1]; + b.elements[2].y = m44.columns[1][2]; + b.elements[0].z = m44.columns[2][0]; + b.elements[1].z = m44.columns[2][1]; + b.elements[2].z = m44.columns[2][2]; + tracker->set_orientation(b); + tracker->set_rw_position(Vector3(m44.columns[3][0], m44.columns[3][1], m44.columns[3][2])); + } +} + +void ARKitInterface::_remove_anchor(void *p_anchor) { + _THREAD_SAFE_METHOD_ + + ARAnchor *anchor = (ARAnchor *)p_anchor; + + unsigned char uuid[16]; + [anchor.identifier getUUIDBytes:uuid]; + + remove_anchor_for_uuid(uuid); +} + +ARKitInterface::ARKitInterface() { + initialized = false; + session_was_started = false; + plane_detection_is_enabled = false; + light_estimation_is_enabled = false; + ar_session = NULL; + z_near = 0.01; + z_far = 1000.0; + projection.set_perspective(60.0, 1.0, z_near, z_far, false); + anchors = NULL; + num_anchors = 0; + ambient_intensity = 1.0; + ambient_color_temperature = 1.0; + image_width[0] = 0; + image_width[1] = 0; + image_height[0] = 0; + image_height[1] = 0; +} + +ARKitInterface::~ARKitInterface() { + remove_all_anchors(); + + // and make sure we cleanup if we haven't already + if (is_initialized()) { + uninitialize(); + } +} diff --git a/modules/arkit/arkit_session_delegate.h b/modules/arkit/arkit_session_delegate.h new file mode 100644 index 0000000000..afe093656b --- /dev/null +++ b/modules/arkit/arkit_session_delegate.h @@ -0,0 +1,50 @@ +/*************************************************************************/ +/* arkit_session_delegate.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 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 ARKIT_SESSION_DELEGATE_H +#define ARKIT_SESSION_DELEGATE_H + +#import <ARKit/ARKit.h> +#import <UIKit/UIKit.h> + +class ARKitInterface; + +@interface ARKitSessionDelegate : NSObject <ARSessionDelegate> { + ARKitInterface *arkit_interface; +} + +@property(nonatomic) ARKitInterface *arkit_interface; + +- (void)session:(ARSession *)session didAddAnchors:(NSArray<ARAnchor *> *)anchors; +- (void)session:(ARSession *)session didRemoveAnchors:(NSArray<ARAnchor *> *)anchors; +- (void)session:(ARSession *)session didUpdateAnchors:(NSArray<ARAnchor *> *)anchors; +@end + +#endif /* !ARKIT_SESSION_DELEGATE_H */ diff --git a/modules/arkit/arkit_session_delegate.mm b/modules/arkit/arkit_session_delegate.mm new file mode 100644 index 0000000000..56485c987c --- /dev/null +++ b/modules/arkit/arkit_session_delegate.mm @@ -0,0 +1,56 @@ +/*************************************************************************/ +/* arkit_session_delegate.mm */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* http://www.godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2017 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 "arkit_session_delegate.h" +#include "arkit_interface.h" + +@implementation ARKitSessionDelegate + +@synthesize arkit_interface; + +- (void)session:(ARSession *)session didAddAnchors:(NSArray<ARAnchor *> *)anchors { + for (ARAnchor *anchor in anchors) { + arkit_interface->_add_or_update_anchor(anchor); + } +} + +- (void)session:(ARSession *)session didRemoveAnchors:(NSArray<ARAnchor *> *)anchors { + for (ARAnchor *anchor in anchors) { + arkit_interface->_remove_anchor(anchor); + } +} + +- (void)session:(ARSession *)session didUpdateAnchors:(NSArray<ARAnchor *> *)anchors { + for (ARAnchor *anchor in anchors) { + arkit_interface->_add_or_update_anchor(anchor); + } +} + +@end
\ No newline at end of file diff --git a/modules/arkit/config.py b/modules/arkit/config.py new file mode 100644 index 0000000000..96e41826c5 --- /dev/null +++ b/modules/arkit/config.py @@ -0,0 +1,5 @@ +def can_build(env, platform): + return platform == 'iphone' + +def configure(env): + pass diff --git a/modules/arkit/register_types.cpp b/modules/arkit/register_types.cpp new file mode 100644 index 0000000000..af35828004 --- /dev/null +++ b/modules/arkit/register_types.cpp @@ -0,0 +1,45 @@ +/*************************************************************************/ +/* register_types.cpp */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 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 "register_types.h" + +#include "arkit_interface.h" + +void register_arkit_types() { + // does it make sense to register the class? + + Ref<ARKitInterface> arkit_interface; + arkit_interface.instance(); + ARVRServer::get_singleton()->add_interface(arkit_interface); +} + +void unregister_arkit_types() { + // should clean itself up nicely :) +} diff --git a/modules/arkit/register_types.h b/modules/arkit/register_types.h new file mode 100644 index 0000000000..6ed2065de2 --- /dev/null +++ b/modules/arkit/register_types.h @@ -0,0 +1,32 @@ +/*************************************************************************/ +/* register_types.h */ +/*************************************************************************/ +/* This file is part of: */ +/* GODOT ENGINE */ +/* https://godotengine.org */ +/*************************************************************************/ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 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. */ +/*************************************************************************/ + +void register_arkit_types(); +void unregister_arkit_types(); diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp index 8c3c04674b..093e2f3006 100644 --- a/modules/assimp/editor_scene_importer_assimp.cpp +++ b/modules/assimp/editor_scene_importer_assimp.cpp @@ -848,7 +848,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta if (AI_SUCCESS == ai_material->GetTexture(tex_normal, 0, &ai_filename, NULL, NULL, NULL, NULL, map_mode)) { filename = _assimp_raw_string_to_string(ai_filename); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -869,7 +869,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_NORMAL_TEXTURE, ai_filename)) { filename = _assimp_raw_string_to_string(ai_filename); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -892,7 +892,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta if (AI_SUCCESS == ai_material->GetTexture(tex_emissive, 0, &ai_filename, NULL, NULL, NULL, NULL, map_mode)) { filename = _assimp_raw_string_to_string(ai_filename); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -914,7 +914,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiTextureMapMode map_mode[2]; if (AI_SUCCESS == ai_material->GetTexture(tex_albedo, 0, &ai_filename, NULL, NULL, NULL, NULL, map_mode)) { filename = _assimp_raw_string_to_string(ai_filename); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -944,7 +944,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiTextureMapMode map_mode[2]; if (AI_SUCCESS == ai_material->GetTexture(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_BASE_COLOR_TEXTURE, &tex_gltf_base_color_path, NULL, NULL, NULL, NULL, map_mode)) { String filename = _assimp_raw_string_to_string(tex_gltf_base_color_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -973,7 +973,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_base_color_path = aiString(); if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_BASE_COLOR_TEXTURE, tex_fbx_pbs_base_color_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_base_color_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1005,7 +1005,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_normal_path = aiString(); if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_NORMAL_TEXTURE, tex_fbx_pbs_normal_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_normal_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1027,7 +1027,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_stingray_normal_path = aiString(); if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_STINGRAY_NORMAL_TEXTURE, tex_fbx_stingray_normal_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_stingray_normal_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1045,7 +1045,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_base_color_path = aiString(); if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_STINGRAY_COLOR_TEXTURE, tex_fbx_pbs_base_color_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_base_color_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1077,7 +1077,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_emissive_path = aiString(); if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_STINGRAY_EMISSIVE_TEXTURE, tex_fbx_pbs_emissive_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_emissive_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1107,7 +1107,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_gltf_pbr_metallicroughness_path; if (AI_SUCCESS == ai_material->GetTexture(AI_MATKEY_GLTF_PBRMETALLICROUGHNESS_METALLICROUGHNESS_TEXTURE, &tex_gltf_pbr_metallicroughness_path)) { String filename = _assimp_raw_string_to_string(tex_gltf_pbr_metallicroughness_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1134,7 +1134,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_metallic_path; if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_STINGRAY_METALLIC_TEXTURE, tex_fbx_pbs_metallic_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_metallic_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1154,7 +1154,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_rough_path; if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_STINGRAY_ROUGHNESS_TEXTURE, tex_fbx_pbs_rough_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_rough_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1177,7 +1177,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_metallic_path; if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_METALNESS_TEXTURE, tex_fbx_pbs_metallic_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_metallic_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1197,7 +1197,7 @@ Ref<Material> EditorSceneImporterAssimp::_generate_material_from_index(ImportSta aiString tex_fbx_pbs_rough_path; if (AI_SUCCESS == ai_material->Get(AI_MATKEY_FBX_MAYA_DIFFUSE_ROUGHNESS_TEXTURE, tex_fbx_pbs_rough_path)) { String filename = _assimp_raw_string_to_string(tex_fbx_pbs_rough_path); - String path = state.path.get_base_dir() + "/" + filename.replace("\\", "/"); + String path = state.path.get_base_dir().plus_file(filename.replace("\\", "/")); bool found = false; _find_texture_path(state.path, path, found); if (found) { @@ -1684,7 +1684,7 @@ void EditorSceneImporterAssimp::_find_texture_path(const String &p_path, _Direct path = name; return; } - String name_ignore_sub_directory = p_path.get_base_dir() + "/" + path.get_file().get_basename() + extension; + String name_ignore_sub_directory = p_path.get_base_dir().plus_file(path.get_file().get_basename()) + extension; if (dir.file_exists(name_ignore_sub_directory)) { found = true; path = name_ignore_sub_directory; diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index 733a900396..085cce9733 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -866,7 +866,7 @@ void RigidBodyBullet::on_enter_area(AreaBullet *p_area) { if (p_area->is_spOv_gravityPoint()) { ++countGravityPointSpaces; - assert(0 < countGravityPointSpaces); + ERR_FAIL_COND(countGravityPointSpaces <= 0); } } @@ -888,7 +888,7 @@ void RigidBodyBullet::on_exit_area(AreaBullet *p_area) { if (wasTheAreaFound) { if (p_area->is_spOv_gravityPoint()) { --countGravityPointSpaces; - assert(0 <= countGravityPointSpaces); + ERR_FAIL_COND(countGravityPointSpaces < 0); } --areaWhereIamCount; diff --git a/modules/csg/doc_classes/CSGBox.xml b/modules/csg/doc_classes/CSGBox.xml index e508468415..d100c01205 100644 --- a/modules/csg/doc_classes/CSGBox.xml +++ b/modules/csg/doc_classes/CSGBox.xml @@ -11,16 +11,16 @@ <methods> </methods> <members> - <member name="depth" type="float" setter="set_depth" getter="get_depth"> + <member name="depth" type="float" setter="set_depth" getter="get_depth" default="2.0"> Depth of the box measured from the center of the box. </member> - <member name="height" type="float" setter="set_height" getter="get_height"> + <member name="height" type="float" setter="set_height" getter="get_height" default="2.0"> Height of the box measured from the center of the box. </member> - <member name="material" type="Material" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> The material used to render the box. </member> - <member name="width" type="float" setter="set_width" getter="get_width"> + <member name="width" type="float" setter="set_width" getter="get_width" default="2.0"> Width of the box measured from the center of the box. </member> </members> diff --git a/modules/csg/doc_classes/CSGCylinder.xml b/modules/csg/doc_classes/CSGCylinder.xml index 24c3f8ba2e..643eb7c7f4 100644 --- a/modules/csg/doc_classes/CSGCylinder.xml +++ b/modules/csg/doc_classes/CSGCylinder.xml @@ -11,22 +11,22 @@ <methods> </methods> <members> - <member name="cone" type="bool" setter="set_cone" getter="is_cone"> + <member name="cone" type="bool" setter="set_cone" getter="is_cone" default="false"> If [code]true[/code] a cone is created, the [member radius] will only apply to one side. </member> - <member name="height" type="float" setter="set_height" getter="get_height"> + <member name="height" type="float" setter="set_height" getter="get_height" default="1.0"> The height of the cylinder. </member> - <member name="material" type="Material" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> The material used to render the cylinder. </member> - <member name="radius" type="float" setter="set_radius" getter="get_radius"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> The radius of the cylinder. </member> - <member name="sides" type="int" setter="set_sides" getter="get_sides"> + <member name="sides" type="int" setter="set_sides" getter="get_sides" default="8"> The number of sides of the cylinder, the higher this number the more detail there will be in the cylinder. </member> - <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces"> + <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="true"> If [code]true[/code] the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If [code]false[/code] the cylinder will have a flat shaded look. </member> </members> diff --git a/modules/csg/doc_classes/CSGMesh.xml b/modules/csg/doc_classes/CSGMesh.xml index afe0bc262d..daa08decb6 100644 --- a/modules/csg/doc_classes/CSGMesh.xml +++ b/modules/csg/doc_classes/CSGMesh.xml @@ -11,9 +11,9 @@ <methods> </methods> <members> - <member name="material" type="Material" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> </member> - <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh"> + <member name="mesh" type="Mesh" setter="set_mesh" getter="get_mesh" default="null"> The mesh resource to use as a CSG shape. </member> </members> diff --git a/modules/csg/doc_classes/CSGPolygon.xml b/modules/csg/doc_classes/CSGPolygon.xml index 2c5d298222..48f5d730cc 100644 --- a/modules/csg/doc_classes/CSGPolygon.xml +++ b/modules/csg/doc_classes/CSGPolygon.xml @@ -11,13 +11,13 @@ <methods> </methods> <members> - <member name="depth" type="float" setter="set_depth" getter="get_depth"> + <member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0"> Extrusion depth when [member mode] is [constant MODE_DEPTH]. </member> - <member name="material" type="Material" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> Material to use for the resulting mesh. </member> - <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="CSGPolygon.Mode"> + <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="CSGPolygon.Mode" default="0"> Extrusion mode. </member> <member name="path_continuous_u" type="bool" setter="set_path_continuous_u" getter="is_path_continuous_u"> @@ -38,10 +38,10 @@ <member name="path_rotation" type="int" setter="set_path_rotation" getter="get_path_rotation" enum="CSGPolygon.PathRotation"> The method by which each slice is rotated along the path when [member mode] is [constant MODE_PATH]. </member> - <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> + <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( 0, 0, 0, 1, 1, 1, 1, 0 )"> Point array that defines the shape that we'll extrude. </member> - <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces"> + <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="false"> Generates smooth normals so smooth shading is applied to our mesh. </member> <member name="spin_degrees" type="float" setter="set_spin_degrees" getter="get_spin_degrees"> diff --git a/modules/csg/doc_classes/CSGPrimitive.xml b/modules/csg/doc_classes/CSGPrimitive.xml index 869e4006fe..6c2f837637 100644 --- a/modules/csg/doc_classes/CSGPrimitive.xml +++ b/modules/csg/doc_classes/CSGPrimitive.xml @@ -10,7 +10,7 @@ <methods> </methods> <members> - <member name="invert_faces" type="bool" setter="set_invert_faces" getter="is_inverting_faces"> + <member name="invert_faces" type="bool" setter="set_invert_faces" getter="is_inverting_faces" default="false"> Invert the faces of the mesh. </member> </members> diff --git a/modules/csg/doc_classes/CSGShape.xml b/modules/csg/doc_classes/CSGShape.xml index 7fa7c78534..91f54f8246 100644 --- a/modules/csg/doc_classes/CSGShape.xml +++ b/modules/csg/doc_classes/CSGShape.xml @@ -64,23 +64,23 @@ </method> </methods> <members> - <member name="calculate_tangents" type="bool" setter="set_calculate_tangents" getter="is_calculating_tangents"> + <member name="calculate_tangents" type="bool" setter="set_calculate_tangents" getter="is_calculating_tangents" default="true"> Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this area is in. Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this CSG shape scans for collisions. </member> - <member name="operation" type="int" setter="set_operation" getter="get_operation" enum="CSGShape.Operation"> + <member name="operation" type="int" setter="set_operation" getter="get_operation" enum="CSGShape.Operation" default="0"> The operation that is performed on this shape. This is ignored for the first CSG child node as the operation is between this node and the previous child of this nodes parent. </member> - <member name="snap" type="float" setter="set_snap" getter="get_snap"> + <member name="snap" type="float" setter="set_snap" getter="get_snap" default="0.001"> </member> - <member name="use_collision" type="bool" setter="set_use_collision" getter="is_using_collision"> + <member name="use_collision" type="bool" setter="set_use_collision" getter="is_using_collision" default="false"> Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body. Note that the collision shape is still active even if the CSG shape itself is hidden. </member> </members> diff --git a/modules/csg/doc_classes/CSGSphere.xml b/modules/csg/doc_classes/CSGSphere.xml index 2a12cf84db..0a62644179 100644 --- a/modules/csg/doc_classes/CSGSphere.xml +++ b/modules/csg/doc_classes/CSGSphere.xml @@ -11,19 +11,19 @@ <methods> </methods> <members> - <member name="material" type="Material" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> The material used to render the sphere. </member> - <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments"> + <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"> + <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> Radius of the sphere. </member> - <member name="rings" type="int" setter="set_rings" getter="get_rings"> + <member name="rings" type="int" setter="set_rings" getter="get_rings" default="6"> Number of horizontal slices for the sphere. </member> - <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces"> + <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="true"> If [code]true[/code] the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If [code]false[/code] the sphere will have a flat shaded look. </member> </members> diff --git a/modules/csg/doc_classes/CSGTorus.xml b/modules/csg/doc_classes/CSGTorus.xml index 0d4437d87f..156fb185e7 100644 --- a/modules/csg/doc_classes/CSGTorus.xml +++ b/modules/csg/doc_classes/CSGTorus.xml @@ -11,22 +11,22 @@ <methods> </methods> <members> - <member name="inner_radius" type="float" setter="set_inner_radius" getter="get_inner_radius"> + <member name="inner_radius" type="float" setter="set_inner_radius" getter="get_inner_radius" default="2.0"> The inner radius of the torus. </member> - <member name="material" type="Material" setter="set_material" getter="get_material"> + <member name="material" type="Material" setter="set_material" getter="get_material" default="null"> The material used to render the torus. </member> - <member name="outer_radius" type="float" setter="set_outer_radius" getter="get_outer_radius"> + <member name="outer_radius" type="float" setter="set_outer_radius" getter="get_outer_radius" default="3.0"> The outer radius of the torus. </member> - <member name="ring_sides" type="int" setter="set_ring_sides" getter="get_ring_sides"> + <member name="ring_sides" type="int" setter="set_ring_sides" getter="get_ring_sides" default="6"> The number of edges each ring of the torus is constructed of. </member> - <member name="sides" type="int" setter="set_sides" getter="get_sides"> + <member name="sides" type="int" setter="set_sides" getter="get_sides" default="8"> The number of slices the torus is constructed of. </member> - <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces"> + <member name="smooth_faces" type="bool" setter="set_smooth_faces" getter="get_smooth_faces" default="true"> If [code]true[/code] the normals of the torus are set to give a smooth effect making the torus seem rounded. If [code]false[/code] the torus will have a flat shaded look. </member> </members> diff --git a/editor/icons/icon_c_s_g_box.svg b/modules/csg/icons/icon_c_s_g_box.svg index 67e34df444..67e34df444 100644 --- a/editor/icons/icon_c_s_g_box.svg +++ b/modules/csg/icons/icon_c_s_g_box.svg diff --git a/editor/icons/icon_c_s_g_capsule.svg b/modules/csg/icons/icon_c_s_g_capsule.svg index 92a7b5a870..92a7b5a870 100644 --- a/editor/icons/icon_c_s_g_capsule.svg +++ b/modules/csg/icons/icon_c_s_g_capsule.svg diff --git a/editor/icons/icon_c_s_g_combiner.svg b/modules/csg/icons/icon_c_s_g_combiner.svg index cce2902e24..cce2902e24 100644 --- a/editor/icons/icon_c_s_g_combiner.svg +++ b/modules/csg/icons/icon_c_s_g_combiner.svg diff --git a/editor/icons/icon_c_s_g_cylinder.svg b/modules/csg/icons/icon_c_s_g_cylinder.svg index 645a74c79b..645a74c79b 100644 --- a/editor/icons/icon_c_s_g_cylinder.svg +++ b/modules/csg/icons/icon_c_s_g_cylinder.svg diff --git a/editor/icons/icon_c_s_g_mesh.svg b/modules/csg/icons/icon_c_s_g_mesh.svg index 6e940a4aa5..6e940a4aa5 100644 --- a/editor/icons/icon_c_s_g_mesh.svg +++ b/modules/csg/icons/icon_c_s_g_mesh.svg diff --git a/editor/icons/icon_c_s_g_polygon.svg b/modules/csg/icons/icon_c_s_g_polygon.svg index 71b03cb8e6..71b03cb8e6 100644 --- a/editor/icons/icon_c_s_g_polygon.svg +++ b/modules/csg/icons/icon_c_s_g_polygon.svg diff --git a/editor/icons/icon_c_s_g_sphere.svg b/modules/csg/icons/icon_c_s_g_sphere.svg index f81b566993..f81b566993 100644 --- a/editor/icons/icon_c_s_g_sphere.svg +++ b/modules/csg/icons/icon_c_s_g_sphere.svg diff --git a/editor/icons/icon_c_s_g_torus.svg b/modules/csg/icons/icon_c_s_g_torus.svg index 3d30aa47b2..3d30aa47b2 100644 --- a/editor/icons/icon_c_s_g_torus.svg +++ b/modules/csg/icons/icon_c_s_g_torus.svg diff --git a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml index 187e8d349d..84ed5fd9ee 100644 --- a/modules/enet/doc_classes/NetworkedMultiplayerENet.xml +++ b/modules/enet/doc_classes/NetworkedMultiplayerENet.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="NetworkedMultiplayerENet" inherits="NetworkedMultiplayerPeer" category="Core" version="3.2"> <brief_description> - PacketPeer implementation using the ENet library. + PacketPeer implementation using the [url=http://enet.bespin.org/index.html]ENet[/url] library. </brief_description> <description> A PacketPeer implementation that should be passed to [member SceneTree.network_peer] after being initialized as either a client or server. Events can then be handled by connecting to [SceneTree] signals. @@ -34,7 +34,7 @@ <argument index="4" name="client_port" type="int" default="0"> </argument> <description> - Create client that connects to a server at [code]address[/code] using specified [code]port[/code]. The given address needs to be either a fully qualified domain name (e.g. [code]www.example.com[/code]) or an IP address in IPv4 or IPv6 format (e.g. [code]192.168.1.1[/code]). The [code]port[/code] is the port the server is listening on. The [code]in_bandwidth[/code] and [code]out_bandwidth[/code] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns [constant OK] if a client was created, [constant ERR_ALREADY_IN_USE] if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call [method close_connection] first) or [constant ERR_CANT_CREATE] if the client could not be created. If [code]client_port[/code] is specified, the client will also listen to the given port, this is useful in some NAT traversal technique. + Create client that connects to a server at [code]address[/code] using specified [code]port[/code]. The given address needs to be either a fully qualified domain name (e.g. [code]"www.example.com"[/code]) or an IP address in IPv4 or IPv6 format (e.g. [code]"192.168.1.1"[/code]). The [code]port[/code] is the port the server is listening on. The [code]in_bandwidth[/code] and [code]out_bandwidth[/code] parameters can be used to limit the incoming and outgoing bandwidth to the given number of bytes per second. The default of 0 means unlimited bandwidth. Note that ENet will strategically drop packets on specific sides of a connection between peers to ensure the peer's bandwidth is not overwhelmed. The bandwidth parameters also determine the window size of a connection which limits the amount of reliable packets that may be in transit at any given time. Returns [constant OK] if a client was created, [constant ERR_ALREADY_IN_USE] if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call [method close_connection] first) or [constant ERR_CANT_CREATE] if the client could not be created. If [code]client_port[/code] is specified, the client will also listen to the given port; this is useful for some NAT traversal techniques. </description> </method> <method name="create_server"> @@ -49,7 +49,7 @@ <argument index="3" name="out_bandwidth" type="int" default="0"> </argument> <description> - Create server that listens to connections via [code]port[/code]. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use [method set_bind_ip]. The default IP is the wildcard [code]*[/code], which listens on all available interfaces. [code]max_clients[/code] is the maximum number of clients that are allowed at once, any number up to 4096 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see [method create_client]. Returns [constant OK] if a server was created, [constant ERR_ALREADY_IN_USE] if this NetworkedMultiplayerEnet instance already has an open connection (in which case you need to call [method close_connection] first) or [constant ERR_CANT_CREATE] if the server could not be created. + Create server that listens to connections via [code]port[/code]. The port needs to be an available, unused port between 0 and 65535. Note that ports below 1024 are privileged and may require elevated permissions depending on the platform. To change the interface the server listens on, use [method set_bind_ip]. The default IP is the wildcard [code]"*"[/code], which listens on all available interfaces. [code]max_clients[/code] is the maximum number of clients that are allowed at once, any number up to 4096 may be used, although the achievable number of simultaneous clients may be far lower and depends on the application. For additional details on the bandwidth parameters, see [method create_client]. Returns [constant OK] if a server was created, [constant ERR_ALREADY_IN_USE] if this NetworkedMultiplayerENet instance already has an open connection (in which case you need to call [method close_connection] first) or [constant ERR_CANT_CREATE] if the server could not be created. </description> </method> <method name="disconnect_peer"> @@ -101,39 +101,39 @@ <argument index="0" name="ip" type="String"> </argument> <description> - The IP used when creating a server. This is set to the wildcard [code]*[/code] by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: [code]192.168.1.1[/code]. + The IP used when creating a server. This is set to the wildcard [code]"*"[/code] by default, which binds to all available interfaces. The given IP needs to be in IPv4 or IPv6 address format, for example: [code]"192.168.1.1"[/code]. </description> </method> </methods> <members> - <member name="always_ordered" type="bool" setter="set_always_ordered" getter="is_always_ordered"> + <member name="always_ordered" type="bool" setter="set_always_ordered" getter="is_always_ordered" default="false"> Enforce ordered packets when using [constant NetworkedMultiplayerPeer.TRANSFER_MODE_UNRELIABLE] (thus behaving similarly to [constant NetworkedMultiplayerPeer.TRANSFER_MODE_UNRELIABLE_ORDERED]). This is the only way to use ordering with the RPC system. </member> - <member name="channel_count" type="int" setter="set_channel_count" getter="get_channel_count"> - The number of channels to be used by ENet. Default: [code]3[/code]. Channels are used to separate different kinds of data. In reliable or ordered mode, for example, the packet delivery order is ensured on a per channel basis. + <member name="channel_count" type="int" setter="set_channel_count" getter="get_channel_count" default="3"> + The number of channels to be used by ENet. Channels are used to separate different kinds of data. In reliable or ordered mode, for example, the packet delivery order is ensured on a per channel basis. </member> - <member name="compression_mode" type="int" setter="set_compression_mode" getter="get_compression_mode" enum="NetworkedMultiplayerENet.CompressionMode"> - The compression method used for network packets. Default is no compression. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. + <member name="compression_mode" type="int" setter="set_compression_mode" getter="get_compression_mode" enum="NetworkedMultiplayerENet.CompressionMode" default="0"> + The compression method used for network packets. These have different tradeoffs of compression speed versus bandwidth, you may need to test which one works best for your use case if you use compression at all. </member> - <member name="transfer_channel" type="int" setter="set_transfer_channel" getter="get_transfer_channel"> - Set the default channel to be used to transfer data. By default this value is [code]-1[/code] which means that ENet will only use 2 channels, one for reliable and one for unreliable packets. Channel [code]0[/code] is reserved, and cannot be used. Setting this member to any value between [code]0[/code] and [member channel_count] (excluded) will force ENet to use that channel for sending data. + <member name="transfer_channel" type="int" setter="set_transfer_channel" getter="get_transfer_channel" default="-1"> + Set the default channel to be used to transfer data. By default, this value is [code]-1[/code] which means that ENet will only use 2 channels, one for reliable and one for unreliable packets. Channel [code]0[/code] is reserved, and cannot be used. Setting this member to any value between [code]0[/code] and [member channel_count] (excluded) will force ENet to use that channel for sending data. </member> </members> <constants> <constant name="COMPRESS_NONE" value="0" enum="CompressionMode"> - No compression. + No compression. This uses the most bandwidth, but has the upside of requiring the fewest CPU resources. </constant> <constant name="COMPRESS_RANGE_CODER" value="1" enum="CompressionMode"> - ENet's buildin range encoding. + ENet's built-in range encoding. </constant> <constant name="COMPRESS_FASTLZ" value="2" enum="CompressionMode"> - FastLZ compression. + [url=http://fastlz.org/]FastLZ[/url] compression. This option uses less CPU resources compared to [constant COMPRESS_ZLIB], at the expense of using more bandwidth. </constant> <constant name="COMPRESS_ZLIB" value="3" enum="CompressionMode"> - zlib compression. + [url=https://www.zlib.net/]Zlib[/url] compression. This option uses less bandwidth compared to [constant COMPRESS_FASTLZ], at the expense of using more CPU resources. </constant> <constant name="COMPRESS_ZSTD" value="4" enum="CompressionMode"> - ZStandard compression. + [url=https://facebook.github.io/zstd/]Zstandard[/url] compression. </constant> </constants> </class> diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index dcb4b7fd75..a5a356ced2 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -882,7 +882,9 @@ NetworkedMultiplayerENet::NetworkedMultiplayerENet() { NetworkedMultiplayerENet::~NetworkedMultiplayerENet() { - close_connection(); + if (active) { + close_connection(); + } } // Sets IP for ENet to bind when using create_server or create_client diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index da01f573ce..64e2c362b2 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -33,9 +33,13 @@ #include "servers/arvr/arvr_positional_tracker.h" #include "servers/visual/visual_server_globals.h" +void ARVRInterfaceGDNative::_bind_methods() { + ADD_PROPERTY_DEFAULT("interface_is_initialized", false); + ADD_PROPERTY_DEFAULT("ar_is_anchor_detection_enabled", false); +} + ARVRInterfaceGDNative::ARVRInterfaceGDNative() { - // testing - printf("Construct gdnative interface\n"); + print_verbose("Construct gdnative interface\n"); // we won't have our data pointer until our library gets set data = NULL; @@ -44,9 +48,9 @@ ARVRInterfaceGDNative::ARVRInterfaceGDNative() { } ARVRInterfaceGDNative::~ARVRInterfaceGDNative() { - printf("Destruct gdnative interface\n"); + print_verbose("Destruct gdnative interface\n"); - if (is_initialized()) { + if (interface != NULL && is_initialized()) { uninitialize(); }; @@ -99,13 +103,10 @@ int ARVRInterfaceGDNative::get_capabilities() const { } bool ARVRInterfaceGDNative::get_anchor_detection_is_enabled() const { - bool enabled; ERR_FAIL_COND_V(interface == NULL, false); - enabled = interface->get_anchor_detection_is_enabled(data); - - return enabled; + return interface->get_anchor_detection_is_enabled(data); } void ARVRInterfaceGDNative::set_anchor_detection_is_enabled(bool p_enable) { @@ -137,21 +138,16 @@ bool ARVRInterfaceGDNative::is_stereo() { } bool ARVRInterfaceGDNative::is_initialized() const { - bool initialized; ERR_FAIL_COND_V(interface == NULL, false); - initialized = interface->is_initialized(data); - - return initialized; + return interface->is_initialized(data); } bool ARVRInterfaceGDNative::initialize() { - bool initialized; - ERR_FAIL_COND_V(interface == NULL, false); - initialized = interface->initialize(data); + bool initialized = interface->initialize(data); if (initialized) { // if we successfully initialize our interface and we don't have a primary interface yet, this becomes our primary interface diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.h b/modules/gdnative/arvr/arvr_interface_gdnative.h index 651e5c8715..ab7090876a 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.h +++ b/modules/gdnative/arvr/arvr_interface_gdnative.h @@ -49,6 +49,8 @@ protected: const godot_arvr_interface_gdnative *interface; void *data; + static void _bind_methods(); + public: /** general interface information **/ ARVRInterfaceGDNative(); diff --git a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml index efdb948660..47c2ee3358 100644 --- a/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml +++ b/modules/gdnative/doc_classes/ARVRInterfaceGDNative.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ARVRInterfaceGDNative" inherits="ARVRInterface" category="Core" version="3.2"> <brief_description> - GDNative wrapper for an ARVR interface + GDNative wrapper for an ARVR interface. </brief_description> <description> - This is a wrapper class for GDNative implementations of the ARVR interface. To use a GDNative ARVR interface simply instantiate this object and set your GDNative library containing the ARVR interface implementation. + This is a wrapper class for GDNative implementations of the ARVR interface. To use a GDNative ARVR interface, simply instantiate this object and set your GDNative library containing the ARVR interface implementation. </description> <tutorials> </tutorials> diff --git a/modules/gdnative/doc_classes/GDNative.xml b/modules/gdnative/doc_classes/GDNative.xml index 8750ddc56d..95ed1fc048 100644 --- a/modules/gdnative/doc_classes/GDNative.xml +++ b/modules/gdnative/doc_classes/GDNative.xml @@ -33,7 +33,7 @@ </method> </methods> <members> - <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library"> + <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library" default="null"> </member> </members> <constants> diff --git a/modules/gdnative/doc_classes/GDNativeLibrary.xml b/modules/gdnative/doc_classes/GDNativeLibrary.xml index 8bfd386b8d..7e1cac243a 100644 --- a/modules/gdnative/doc_classes/GDNativeLibrary.xml +++ b/modules/gdnative/doc_classes/GDNativeLibrary.xml @@ -23,13 +23,13 @@ <members> <member name="config_file" type="ConfigFile" setter="set_config_file" getter="get_config_file"> </member> - <member name="load_once" type="bool" setter="set_load_once" getter="should_load_once"> + <member name="load_once" type="bool" setter="set_load_once" getter="should_load_once" default="true"> </member> - <member name="reloadable" type="bool" setter="set_reloadable" getter="is_reloadable"> + <member name="reloadable" type="bool" setter="set_reloadable" getter="is_reloadable" default="true"> </member> - <member name="singleton" type="bool" setter="set_singleton" getter="is_singleton"> + <member name="singleton" type="bool" setter="set_singleton" getter="is_singleton" default="false"> </member> - <member name="symbol_prefix" type="String" setter="set_symbol_prefix" getter="get_symbol_prefix"> + <member name="symbol_prefix" type="String" setter="set_symbol_prefix" getter="get_symbol_prefix" default=""godot_""> </member> </members> <constants> diff --git a/modules/gdnative/doc_classes/NativeScript.xml b/modules/gdnative/doc_classes/NativeScript.xml index ac8b793b22..460471386d 100644 --- a/modules/gdnative/doc_classes/NativeScript.xml +++ b/modules/gdnative/doc_classes/NativeScript.xml @@ -51,13 +51,13 @@ </method> </methods> <members> - <member name="class_name" type="String" setter="set_class_name" getter="get_class_name"> + <member name="class_name" type="String" setter="set_class_name" getter="get_class_name" default=""""> </member> - <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library"> + <member name="library" type="GDNativeLibrary" setter="set_library" getter="get_library" default="null"> </member> - <member name="script_class_icon_path" type="String" setter="set_script_class_icon_path" getter="get_script_class_icon_path"> + <member name="script_class_icon_path" type="String" setter="set_script_class_icon_path" getter="get_script_class_icon_path" default=""""> </member> - <member name="script_class_name" type="String" setter="set_script_class_name" getter="get_script_class_name"> + <member name="script_class_name" type="String" setter="set_script_class_name" getter="get_script_class_name" default=""""> </member> </members> <constants> diff --git a/modules/gdnative/gdnative/array.cpp b/modules/gdnative/gdnative/array.cpp index 6849ff03d7..1ef8e9f900 100644 --- a/modules/gdnative/gdnative/array.cpp +++ b/modules/gdnative/gdnative/array.cpp @@ -305,13 +305,13 @@ void GDAPI godot_array_sort_custom(godot_array *p_self, godot_object *p_obj, con godot_int GDAPI godot_array_bsearch(godot_array *p_self, const godot_variant *p_value, const godot_bool p_before) { Array *self = (Array *)p_self; - return self->bsearch((const Variant *)p_value, p_before); + return self->bsearch(*(const Variant *)p_value, p_before); } godot_int GDAPI godot_array_bsearch_custom(godot_array *p_self, const godot_variant *p_value, godot_object *p_obj, const godot_string *p_func, const godot_bool p_before) { Array *self = (Array *)p_self; const String *func = (const String *)p_func; - return self->bsearch_custom((const Variant *)p_value, (Object *)p_obj, *func, p_before); + return self->bsearch_custom(*(const Variant *)p_value, (Object *)p_obj, *func, p_before); } void GDAPI godot_array_destroy(godot_array *p_self) { diff --git a/editor/icons/icon_g_d_native_library.svg b/modules/gdnative/icons/icon_g_d_native_library.svg index b494c7af6e..b494c7af6e 100644 --- a/editor/icons/icon_g_d_native_library.svg +++ b/modules/gdnative/icons/icon_g_d_native_library.svg diff --git a/editor/icons/icon_native_script.svg b/modules/gdnative/icons/icon_native_script.svg index fb9e135627..fb9e135627 100644 --- a/editor/icons/icon_native_script.svg +++ b/modules/gdnative/icons/icon_native_script.svg diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.cpp b/modules/gdnative/net/multiplayer_peer_gdnative.cpp index bdeba149d2..d2c95efa77 100644 --- a/modules/gdnative/net/multiplayer_peer_gdnative.cpp +++ b/modules/gdnative/net/multiplayer_peer_gdnative.cpp @@ -113,6 +113,8 @@ NetworkedMultiplayerPeer::ConnectionStatus MultiplayerPeerGDNative::get_connecti } void MultiplayerPeerGDNative::_bind_methods() { + ADD_PROPERTY_DEFAULT("transfer_mode", TRANSFER_MODE_UNRELIABLE); + ADD_PROPERTY_DEFAULT("refuse_new_connections", true); } extern "C" { diff --git a/modules/gdnative/pluginscript/pluginscript_language.cpp b/modules/gdnative/pluginscript/pluginscript_language.cpp index 7cb47ec623..4bbadc62e7 100644 --- a/modules/gdnative/pluginscript/pluginscript_language.cpp +++ b/modules/gdnative/pluginscript/pluginscript_language.cpp @@ -216,7 +216,7 @@ void PluginScriptLanguage::get_public_constants(List<Pair<String, Variant> > *p_ Dictionary constants; _desc.get_public_constants(_data, (godot_dictionary *)&constants); for (const Variant *key = constants.next(); key; key = constants.next(key)) { - Variant value = constants[key]; + Variant value = constants[*key]; p_constants->push_back(Pair<String, Variant>(*key, value)); } } diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp index 1d6f9db349..3ecb29404a 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.cpp +++ b/modules/gdnative/pluginscript/pluginscript_script.cpp @@ -229,6 +229,8 @@ void PluginScript::set_source_code(const String &p_code) { } Error PluginScript::reload(bool p_keep_state) { + ERR_FAIL_COND_V(!_language, ERR_UNCONFIGURED); + _language->lock(); ERR_FAIL_COND_V(!p_keep_state && _instances.size(), ERR_ALREADY_IN_USE); _language->unlock(); @@ -284,7 +286,7 @@ Error PluginScript::reload(bool p_keep_state) { Dictionary *members = (Dictionary *)&manifest.member_lines; for (const Variant *key = members->next(); key != NULL; key = members->next(key)) { - _member_lines[*key] = (*members)[key]; + _member_lines[*key] = (*members)[*key]; } Array *methods = (Array *)&manifest.methods; for (int i = 0; i < methods->size(); ++i) { @@ -473,6 +475,8 @@ MultiplayerAPI::RPCMode PluginScript::get_rset_mode(const StringName &p_variable PluginScript::PluginScript() : _data(NULL), + _desc(NULL), + _language(NULL), _tool(false), _valid(false), _script_list(this) { @@ -490,11 +494,15 @@ void PluginScript::init(PluginScriptLanguage *language) { } PluginScript::~PluginScript() { - _desc->finish(_data); + if (_desc && _data) { + _desc->finish(_data); + } #ifdef DEBUG_ENABLED - _language->lock(); - _language->_script_list.remove(&_script_list); - _language->unlock(); + if (_language) { + _language->lock(); + _language->_script_list.remove(&_script_list); + _language->unlock(); + } #endif } diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml index 3eaee53789..3870a5ea7d 100644 --- a/modules/gdscript/doc_classes/@GDScript.xml +++ b/modules/gdscript/doc_classes/@GDScript.xml @@ -149,7 +149,7 @@ <argument index="1" name="y" type="float"> </argument> <description> - Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle). + Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle). </description> </method> <method name="ceil"> @@ -173,10 +173,8 @@ <description> Returns a character as a String of the given ASCII code. [codeblock] - # a is 'A' - a = char(65) - # a is 'a' - a = char(65 + 32) + a = char(65) # a is "A" + a = char(65 + 32) # a is "a" [/codeblock] </description> </method> @@ -210,14 +208,13 @@ <argument index="1" name="type" type="int"> </argument> <description> - Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum TYPE_* in [@GlobalScope]. + Converts from a type to another in the best way possible. The [code]type[/code] parameter uses the enum [code]TYPE_*[/code] in [@GlobalScope]. [codeblock] a = Vector2(1, 0) - # prints 1 + # Prints 1 print(a.length()) a = convert(a, TYPE_STRING) - # prints 6 - # (1, 0) is 6 characters + # Prints 6 as "(1, 0)" is 6 characters print(a.length()) [/codeblock] </description> @@ -230,7 +227,7 @@ <description> Returns the cosine of angle [code]s[/code] in radians. [codeblock] - # prints 1 and -1 + # Prints 1 then -1 print(cos(PI * 2)) print(cos(PI)) [/codeblock] @@ -244,7 +241,7 @@ <description> Returns the hyperbolic cosine of [code]s[/code] in radians. [codeblock] - # prints 1.543081 + # Prints 1.543081 print(cosh(1)) [/codeblock] </description> @@ -264,7 +261,7 @@ <argument index="0" name="step" type="float"> </argument> <description> - Deprecated alias for "[method step_decimals]". + Deprecated alias for [method step_decimals]. </description> </method> <method name="dectime"> @@ -326,7 +323,7 @@ The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]s[/code] and returns it. [b]e[/b] has an approximate value of 2.71828. [codeblock] - a = exp(2) # approximately 7.39 + a = exp(2) # Approximately 7.39 [/codeblock] </description> </method> @@ -355,7 +352,7 @@ <description> Returns the floating-point remainder of [code]x/y[/code]. [codeblock] - # remainder is 1.5 + # Remainder is 1.5 var remainder = fmod(7, 5.5) [/codeblock] </description> @@ -404,7 +401,7 @@ return("bar") a = funcref(self, "foo") - print(a.call_func()) # prints bar + print(a.call_func()) # Prints bar [/codeblock] </description> </method> @@ -437,7 +434,7 @@ <description> Returns the integer hash of the variable passed. [codeblock] - print(hash("a")) # prints 177670 + print(hash("a")) # Prints 177670 [/codeblock] </description> </method> @@ -474,7 +471,7 @@ func _ready(): var id = get_instance_id() var inst = instance_from_id(id) - print(inst.foo) # prints bar + print(inst.foo) # Prints bar [/codeblock] </description> </method> @@ -490,7 +487,7 @@ <description> Returns a normalized value considering the given range. [codeblock] - inverse_lerp(3, 5, 4) # returns 0.5 + inverse_lerp(3, 5, 4) # Returns 0.5 [/codeblock] </description> </method> @@ -551,7 +548,7 @@ [b]Note:[/b] Generates a fatal error if Variant can not provide a length. [codeblock] a = [1, 2, 3, 4] - len(a) # returns 4 + len(a) # Returns 4 [/codeblock] </description> </method> @@ -569,8 +566,8 @@ If the [code]from[/code] and [code]to[/code] arguments are of type [int] or [float], the return value is a [float]. If both are of the same vector type ([Vector2], [Vector3] or [Color]), the return value will be of the same type ([code]lerp[/code] then calls the vector type's [code]linear_interpolate[/code] method). [codeblock] - lerp(0, 4, 0.75) # returns 3.0 - lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # returns Vector2(2, 3.5) + lerp(0, 4, 0.75) # Returns 3.0 + lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5) [/codeblock] </description> </method> @@ -590,9 +587,9 @@ </argument> <description> Loads a resource from the filesystem located at [code]path[/code]. - [b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path". + [b]Note:[/b] Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing [b]Copy Path[/b]. [codeblock] - # load a scene called main located in the root of the project directory + # Load a scene called main located in the root of the project directory var main = load("res://main.tscn") [/codeblock] </description> @@ -604,9 +601,9 @@ </argument> <description> Natural logarithm. The amount of time needed to reach a certain level of continuous growth. - [b]Note:[/b] This is not the same as the log function on your calculator which is a base 10 logarithm. + [b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. [codeblock] - log(10) # returns 2.302585 + log(10) # Returns 2.302585 [/codeblock] </description> </method> @@ -620,8 +617,8 @@ <description> Returns the maximum of two values. [codeblock] - max(1, 2) # returns 2 - max(-3.99, -4) # returns -3.99 + max(1, 2) # Returns 2 + max(-3.99, -4) # Returns -3.99 [/codeblock] </description> </method> @@ -635,8 +632,8 @@ <description> Returns the minimum of two values. [codeblock] - min(1, 2) # returns 1 - min(-3.99, -4) # returns -4 + min(1, 2) # Returns 1 + min(-3.99, -4) # Returns -4 [/codeblock] </description> </method> @@ -653,7 +650,7 @@ Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value. Use a negative [code]delta[/code] value to move away. [codeblock] - move_toward(10, 5, 4) # returns 6 + move_toward(10, 5, 4) # Returns 6 [/codeblock] </description> </method> @@ -665,9 +662,9 @@ <description> Returns the nearest larger power of 2 for integer [code]value[/code]. [codeblock] - nearest_po2(3) # returns 4 - nearest_po2(4) # returns 4 - nearest_po2(5) # returns 8 + nearest_po2(3) # Returns 4 + nearest_po2(4) # Returns 4 + nearest_po2(5) # Returns 8 [/codeblock] </description> </method> @@ -683,7 +680,7 @@ [codeblock] p = parse_json('["a", "b", "c"]') if typeof(p) == TYPE_ARRAY: - print(p[0]) # prints a + print(p[0]) # Prints a else: print("unexpected results") [/codeblock] @@ -697,7 +694,7 @@ <argument index="1" name="th" type="float"> </argument> <description> - Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis). + Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis). </description> </method> <method name="pow"> @@ -710,7 +707,7 @@ <description> Returns the result of [code]x[/code] raised to the power of [code]y[/code]. [codeblock] - pow(2, 5) # returns 32 + pow(2, 5) # Returns 32 [/codeblock] </description> </method> @@ -723,7 +720,7 @@ Returns a resource from the filesystem that is loaded during script parsing. [b]Note:[/b] Resource paths can be obtained by right clicking on a resource in the Assets Panel and choosing "Copy Path". [codeblock] - # load a scene called main located in the root of the project directory + # Load a scene called main located in the root of the project directory var main = preload("res://main.tscn") [/codeblock] </description> @@ -735,7 +732,7 @@ Converts one or more arguments to strings in the best way possible and prints them to the console. [codeblock] a = [1, 2, 3] - print("a", "b", a) # prints ab[1, 2, 3] + print("a", "b", a) # Prints ab[1, 2, 3] [/codeblock] </description> </method> @@ -775,7 +772,7 @@ [codeblock] printraw("A") printraw("B") - # prints AB + # Prints AB [/codeblock] </description> </method> @@ -785,7 +782,7 @@ <description> Prints one or more arguments to the console with a space between each argument. [codeblock] - prints("A", "B", "C") # prints A B C + prints("A", "B", "C") # Prints A B C [/codeblock] </description> </method> @@ -795,7 +792,7 @@ <description> Prints one or more arguments to the console with a tab between each argument. [codeblock] - printt("A", "B", "C") # prints A B C + printt("A", "B", "C") # Prints A B C [/codeblock] </description> </method> @@ -807,7 +804,7 @@ <description> Pushes an error message to Godot's built-in debugger and to the OS terminal. [codeblock] - push_error("test error") # prints "test error" to debugger and terminal as error call + push_error("test error") # Prints "test error" to debugger and terminal as error call [/codeblock] </description> </method> @@ -819,7 +816,7 @@ <description> Pushes a warning message to Godot's built-in debugger and to the OS terminal. [codeblock] - push_warning("test warning") # prints "test warning" to debugger and terminal as warning call + push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call [/codeblock] </description> </method> @@ -831,7 +828,7 @@ <description> Converts from radians to degrees. [codeblock] - rad2deg(0.523599) # returns 30 + rad2deg(0.523599) # Returns 30 [/codeblock] </description> </method> @@ -845,7 +842,7 @@ <description> Random range, any floating point value between [code]from[/code] and [code]to[/code]. [codeblock] - prints(rand_range(0, 1), rand_range(0, 1)) # prints e.g. 0.135591 0.405263 + prints(rand_range(0, 1), rand_range(0, 1)) # Prints e.g. 0.135591 0.405263 [/codeblock] </description> </method> @@ -864,7 +861,7 @@ <description> Returns a random floating point value on the interval [code][0, 1][/code]. [codeblock] - randf() # returns e.g. 0.375671 + randf() # Returns e.g. 0.375671 [/codeblock] </description> </method> @@ -874,10 +871,10 @@ <description> Returns a random unsigned 32 bit integer. Use remainder to obtain a random value in the interval [code][0, N][/code] (where N is smaller than 2^32 -1). [codeblock] - randi() # returns random integer between 0 and 2^32 - 1 - randi() % 20 # returns random integer between 0 and 19 - randi() % 100 # returns random integer between 0 and 99 - randi() % 100 + 1 # returns random integer between 1 and 100 + randi() # Returns random integer between 0 and 2^32 - 1 + randi() % 20 # Returns random integer between 0 and 19 + randi() % 100 # Returns random integer between 0 and 99 + randi() % 100 + 1 # Returns random integer between 1 and 100 [/codeblock] </description> </method> @@ -938,7 +935,7 @@ <description> Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. [codeblock] - range_lerp(75, 0, 100, -1, 1) # returns 0.5 + range_lerp(75, 0, 100, -1, 1) # Returns 0.5 [/codeblock] </description> </method> @@ -950,7 +947,7 @@ <description> Returns the integral value that is nearest to [code]s[/code], with halfway cases rounded away from zero. [codeblock] - round(2.6) # returns 3 + round(2.6) # Returns 3 [/codeblock] </description> </method> @@ -975,9 +972,9 @@ <description> Returns the sign of [code]s[/code]: -1 or 1. Returns 0 if [code]s[/code] is 0. [codeblock] - sign(-6) # returns -1 - sign(0) # returns 0 - sign(6) # returns 1 + sign(-6) # Returns -1 + sign(0) # Returns 0 + sign(6) # Returns 1 [/codeblock] </description> </method> @@ -989,7 +986,7 @@ <description> Returns the sine of angle [code]s[/code] in radians. [codeblock] - sin(0.523599) # returns 0.5 + sin(0.523599) # Returns 0.5 [/codeblock] </description> </method> @@ -1001,8 +998,8 @@ <description> Returns the hyperbolic sine of [code]s[/code]. [codeblock] - a = log(2.0) # returns 0.693147 - sinh(a) # returns 0.75 + a = log(2.0) # Returns 0.693147 + sinh(a) # Returns 0.75 [/codeblock] </description> </method> @@ -1018,9 +1015,9 @@ <description> Returns a number smoothly interpolated between the [code]from[/code] and [code]to[/code], based on the [code]weight[/code]. Similar to [method lerp], but interpolates faster at the beginning and slower at the end. [codeblock] - smoothstep(0, 2, 0.5) # returns 0.15 - smoothstep(0, 2, 1.0) # returns 0.5 - smoothstep(0, 2, 2.0) # returns 1.0 + smoothstep(0, 2, 0.5) # Returns 0.15 + smoothstep(0, 2, 1.0) # Returns 0.5 + smoothstep(0, 2, 2.0) # Returns 1.0 [/codeblock] </description> </method> @@ -1032,7 +1029,7 @@ <description> Returns the square root of [code]s[/code]. [codeblock] - sqrt(9) # returns 3 + sqrt(9) # Returns 3 [/codeblock] </description> </method> @@ -1072,8 +1069,8 @@ [codeblock] var a = [10, 20, 30] var b = str(a); - len(a) # returns 3 - len(b) # returns 12 + len(a) # Returns 3 + len(b) # Returns 12 [/codeblock] </description> </method> @@ -1087,7 +1084,7 @@ [codeblock] a = '{ "a": 1, "b": 2 }' b = str2var(a) - print(b['a']) # prints 1 + print(b["a"]) # Prints 1 [/codeblock] </description> </method> @@ -1099,7 +1096,7 @@ <description> Returns the tangent of angle [code]s[/code] in radians. [codeblock] - tan(deg2rad(45)) # returns 1 + tan(deg2rad(45)) # Returns 1 [/codeblock] </description> </method> @@ -1111,8 +1108,8 @@ <description> Returns the hyperbolic tangent of [code]s[/code]. [codeblock] - a = log(2.0) # returns 0.693147 - tanh(a) # returns 0.6 + a = log(2.0) # Returns 0.693147 + tanh(a) # Returns 0.6 [/codeblock] </description> </method> @@ -1124,7 +1121,7 @@ <description> Converts a Variant [code]var[/code] to JSON text and return the result. Useful for serializing data to store or send over the network. [codeblock] - a = { 'a': 1, 'b': 2 } + a = { "a": 1, "b": 2 } b = to_json(a) print(b) # {"a":1, "b":2} [/codeblock] @@ -1138,8 +1135,8 @@ <description> Returns whether the given class exists in [ClassDB]. [codeblock] - type_exists("Sprite") # returns true - type_exists("Variant") # returns false + type_exists("Sprite") # Returns true + type_exists("Variant") # Returns false [/codeblock] </description> </method> @@ -1149,11 +1146,11 @@ <argument index="0" name="what" type="Variant"> </argument> <description> - Returns the internal type of the given Variant object, using the TYPE_* enum in [@GlobalScope]. + Returns the internal type of the given Variant object, using the [code]TYPE_*[/code] enum in [@GlobalScope]. [codeblock] p = parse_json('["a", "b", "c"]') if typeof(p) == TYPE_ARRAY: - print(p[0]) # prints a + print(p[0]) # Prints a else: print("unexpected results") [/codeblock] @@ -1195,7 +1192,7 @@ <description> Converts a Variant [code]var[/code] to a formatted string that can later be parsed using [method str2var]. [codeblock] - a = { 'a': 1, 'b': 2 } + a = { "a": 1, "b": 2 } print(var2str(a)) [/codeblock] prints @@ -1238,17 +1235,17 @@ a = wrapf(-0.5, 0.0, 10.0) [/codeblock] [codeblock] - # infinite loop between 0.0 and 0.99 + # Infinite loop between 0.0 and 0.99 f = wrapf(f + 0.1, 0.0, 1.0) [/codeblock] [codeblock] - # infinite rotation (in radians) + # Infinite rotation (in radians) angle = wrapf(angle + 0.1, 0.0, TAU) [/codeblock] - Note: If you just want to wrap between 0.0 and [code]n[/code] (where [code]n[/code] is a positive float value) then it's better for performance to use [method fmod] method like [code]fmod(number, n)[/code]. - The usage of [code]wrapf[/code] is more flexible than using the [method fmod] approach by giving the user a simple control over the minimum value. It also fully supports negative numbers, e.g. + [b]Note:[/b] If you just want to wrap between 0.0 and [code]n[/code] (where [code]n[/code] is a positive floating-point value), it is better for performance to use the [method fmod] method like [code]fmod(number, n)[/code]. + [code]wrapf[/code] is more flexible than using the [method fmod] approach by giving the user a simple control over the minimum value. It also fully supports negative numbers, e.g. [codeblock] - # infinite rotation (in radians) + # Infinite rotation (in radians) angle = wrapf(angle + 0.1, -PI, PI) [/codeblock] </description> @@ -1274,11 +1271,11 @@ a = wrapi(-1, 0, 10) [/codeblock] [codeblock] - # infinite loop between 0 and 9 + # Infinite loop between 0 and 9 frame = wrapi(frame + 1, 0, 10) [/codeblock] - Note: If you just want to wrap between 0 and [code]n[/code] (where [code]n[/code] is a positive integer value) then it's better for performance to use modulo operator like [code]number % n[/code]. - The usage of [code]wrapi[/code] is more flexible than using the modulo approach by giving the user a simple control over the minimum value. It also fully supports negative numbers, e.g. + [b]Note:[/b] If you just want to wrap between 0 and [code]n[/code] (where [code]n[/code] is a positive integer value), it is better for performance to use the modulo operator like [code]number % n[/code]. + [code]wrapi[/code] is more flexible than using the modulo approach by giving the user a simple control over the minimum value. It also fully supports negative numbers, e.g. [codeblock] # result is -2 var result = wrapi(-6, -5, -1) diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 95f3c12806..bc28f7009e 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -332,7 +332,7 @@ ScriptInstance *GDScript::instance_create(Object *p_this) { } Variant::CallError unchecked_error; - return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this), unchecked_error); + return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error); } PlaceHolderScriptInstance *GDScript::placeholder_instance_create(Object *p_this) { diff --git a/modules/gdscript/gdscript_compiler.cpp b/modules/gdscript/gdscript_compiler.cpp index caffe04700..4c976bd2e0 100644 --- a/modules/gdscript/gdscript_compiler.cpp +++ b/modules/gdscript/gdscript_compiler.cpp @@ -1259,8 +1259,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser:: ERR_FAIL_V(-1); //unreachable code } break; } - - ERR_FAIL_V(-1); //unreachable code } Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::BlockNode *p_block, int p_stack_level, int p_break_addr, int p_continue_addr) { diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index 6c77968f44..26b14a6148 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -2498,7 +2498,8 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path } break; case GDScriptParser::COMPLETION_FUNCTION: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_IDENTIFIER: { _find_identifiers(context, is_function, options); } break; @@ -2537,7 +2538,8 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_path } break; case GDScriptParser::COMPLETION_METHOD: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_INDEX: { const GDScriptParser::Node *node = parser.get_completion_node(); if (node->type != GDScriptParser::Node::TYPE_OPERATOR) { @@ -3234,7 +3236,8 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol case GDScriptParser::COMPLETION_PARENT_FUNCTION: case GDScriptParser::COMPLETION_FUNCTION: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_IDENTIFIER: { if (!is_function) { @@ -3365,7 +3368,8 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol } break; case GDScriptParser::COMPLETION_METHOD: { is_function = true; - } // fallthrough + FALLTHROUGH; + } case GDScriptParser::COMPLETION_INDEX: { const GDScriptParser::Node *node = parser.get_completion_node(); if (node->type != GDScriptParser::Node::TYPE_OPERATOR) { diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index bae5eca218..d5e74c07c9 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1556,14 +1556,14 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a //error // function, file, line, error, explanation String err_file; - if (p_instance) + if (p_instance && p_instance->script->is_valid() && p_instance->script->path != "") err_file = p_instance->script->path; else if (script) err_file = script->path; if (err_file == "") err_file = "<built-in>"; String err_func = name; - if (p_instance && p_instance->script->name != "") + if (p_instance && p_instance->script->is_valid() && p_instance->script->name != "") err_func = p_instance->script->name + "." + err_func; int err_line = line; if (err_text == "") { @@ -1591,15 +1591,26 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a GDScriptLanguage::get_singleton()->script_frame_time += time_taken - function_call_time; } - if (ScriptDebugger::get_singleton()) - GDScriptLanguage::get_singleton()->exit_function(); + bool yielded = retvalue.is_ref() && Object::cast_to<GDScriptFunctionState>(retvalue); + + // Check if this is the last time the function is resuming from yield + // Will be true if never yielded as well + // When it's the last resume it will postpone the exit from stack, + // so the debugger knows which function triggered the resume of the next function (if any) + if (!p_state || yielded) { + if (ScriptDebugger::get_singleton()) + GDScriptLanguage::get_singleton()->exit_function(); #endif - if (_stack_size) { - //free stack - for (int i = 0; i < _stack_size; i++) - stack[i].~Variant(); + if (_stack_size) { + //free stack + for (int i = 0; i < _stack_size; i++) + stack[i].~Variant(); + } + +#ifdef DEBUG_ENABLED } +#endif return retvalue; } @@ -1775,7 +1786,7 @@ Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_ar if (state.instance_id && !ObjectDB::get_instance(state.instance_id)) { #ifdef DEBUG_ENABLED - ERR_EXPLAIN("Resumed after yield, but class instance is gone"); + ERR_EXPLAIN("Resumed function '" + String(function->get_name()) + "()' after yield, but class instance is gone. At script: " + state.script->get_path() + ":" + itos(state.line)); ERR_FAIL_V(Variant()); #else return Variant(); @@ -1838,6 +1849,17 @@ Variant GDScriptFunctionState::_signal_callback(const Variant **p_args, int p_ar } } +#ifdef DEBUG_ENABLED + if (ScriptDebugger::get_singleton()) + GDScriptLanguage::get_singleton()->exit_function(); + if (state.stack_size) { + //free stack + Variant *stack = (Variant *)state.stack.ptr(); + for (int i = 0; i < state.stack_size; i++) + stack[i].~Variant(); + } +#endif + return ret; } @@ -1860,7 +1882,7 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) { ERR_FAIL_COND_V(!function, Variant()); if (state.instance_id && !ObjectDB::get_instance(state.instance_id)) { #ifdef DEBUG_ENABLED - ERR_EXPLAIN("Resumed after yield, but class instance is gone"); + ERR_EXPLAIN("Resumed function '" + String(function->get_name()) + "()' after yield, but class instance is gone. At script: " + state.script->get_path() + ":" + itos(state.line)); ERR_FAIL_V(Variant()); #else return Variant(); @@ -1892,6 +1914,17 @@ Variant GDScriptFunctionState::resume(const Variant &p_arg) { } else { emit_signal("completed", ret); } + +#ifdef DEBUG_ENABLED + if (ScriptDebugger::get_singleton()) + GDScriptLanguage::get_singleton()->exit_function(); + if (state.stack_size) { + //free stack + Variant *stack = (Variant *)state.stack.ptr(); + for (int i = 0; i < state.stack_size; i++) + stack[i].~Variant(); + } +#endif } return ret; diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index 85b270b369..9ab86a5459 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -463,7 +463,7 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s } if (!path.is_abs_path() && base_path != "") - path = base_path + "/" + path; + path = base_path.plus_file(path); path = path.replace("///", "//").simplify_path(); if (path == self_path) { @@ -776,7 +776,8 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s } _add_warning(GDScriptWarning::UNASSIGNED_VARIABLE_OP_ASSIGN, -1, identifier.operator String()); } - } break; + FALLTHROUGH; + } case GDScriptTokenizer::TK_OP_ASSIGN: { lv->assignments += 1; lv->usages--; // Assignment is not really usage @@ -846,24 +847,11 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s if (current_function) { int arg_idx = current_function->arguments.find(identifier); if (arg_idx != -1) { - switch (tokenizer->get_token()) { - case GDScriptTokenizer::TK_OP_ASSIGN_ADD: - case GDScriptTokenizer::TK_OP_ASSIGN_BIT_AND: - case GDScriptTokenizer::TK_OP_ASSIGN_BIT_OR: - case GDScriptTokenizer::TK_OP_ASSIGN_BIT_XOR: - case GDScriptTokenizer::TK_OP_ASSIGN_DIV: - case GDScriptTokenizer::TK_OP_ASSIGN_MOD: - case GDScriptTokenizer::TK_OP_ASSIGN_MUL: - case GDScriptTokenizer::TK_OP_ASSIGN_SHIFT_LEFT: - case GDScriptTokenizer::TK_OP_ASSIGN_SHIFT_RIGHT: - case GDScriptTokenizer::TK_OP_ASSIGN_SUB: - case GDScriptTokenizer::TK_OP_ASSIGN: { - // Assignment is not really usage - current_function->arguments_usage.write[arg_idx] = current_function->arguments_usage[arg_idx] - 1; - } break; - default: { - current_function->arguments_usage.write[arg_idx] = current_function->arguments_usage[arg_idx] + 1; - } + if (tokenizer->get_token() == GDScriptTokenizer::TK_OP_ASSIGN) { + // Assignment is not really usage + current_function->arguments_usage.write[arg_idx] = current_function->arguments_usage[arg_idx] - 1; + } else { + current_function->arguments_usage.write[arg_idx] = current_function->arguments_usage[arg_idx] + 1; } } } diff --git a/editor/icons/icon_g_d_script.svg b/modules/gdscript/icons/icon_g_d_script.svg index 953bb9ae9e..953bb9ae9e 100644 --- a/editor/icons/icon_g_d_script.svg +++ b/modules/gdscript/icons/icon_g_d_script.svg diff --git a/modules/gridmap/doc_classes/GridMap.xml b/modules/gridmap/doc_classes/GridMap.xml index f8f9fc1af9..325432579f 100644 --- a/modules/gridmap/doc_classes/GridMap.xml +++ b/modules/gridmap/doc_classes/GridMap.xml @@ -86,14 +86,14 @@ <return type="Array"> </return> <description> - Array of [Transform] and [Mesh] references corresponding to the non empty cells in the grid. The transforms are specified in world space. + Array of [Transform] and [Mesh] references corresponding to the non-empty cells in the grid. The transforms are specified in world space. </description> </method> <method name="get_used_cells" qualifiers="const"> <return type="Array"> </return> <description> - Array of [Vector3] with the non empty cell coordinates in the grid map. + Array of [Vector3] with the non-empty cell coordinates in the grid map. </description> </method> <method name="make_baked_meshes"> @@ -189,28 +189,28 @@ </method> </methods> <members> - <member name="cell_center_x" type="bool" setter="set_center_x" getter="get_center_x"> + <member name="cell_center_x" type="bool" setter="set_center_x" getter="get_center_x" default="true"> If [code]true[/code], grid items are centered on the X axis. </member> - <member name="cell_center_y" type="bool" setter="set_center_y" getter="get_center_y"> + <member name="cell_center_y" type="bool" setter="set_center_y" getter="get_center_y" default="true"> If [code]true[/code], grid items are centered on the Y axis. </member> - <member name="cell_center_z" type="bool" setter="set_center_z" getter="get_center_z"> + <member name="cell_center_z" type="bool" setter="set_center_z" getter="get_center_z" default="true"> If [code]true[/code], grid items are centered on the Z axis. </member> - <member name="cell_octant_size" type="int" setter="set_octant_size" getter="get_octant_size"> + <member name="cell_octant_size" type="int" setter="set_octant_size" getter="get_octant_size" default="8"> The size of each octant measured in number of cells. This applies to all three axis. </member> - <member name="cell_scale" type="float" setter="set_cell_scale" getter="get_cell_scale"> + <member name="cell_scale" type="float" setter="set_cell_scale" getter="get_cell_scale" default="1.0"> </member> - <member name="cell_size" type="Vector3" setter="set_cell_size" getter="get_cell_size"> + <member name="cell_size" type="Vector3" setter="set_cell_size" getter="get_cell_size" default="Vector3( 2, 2, 2 )"> The dimensions of the grid's cells. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer"> + <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> </member> - <member name="mesh_library" type="MeshLibrary" setter="set_mesh_library" getter="get_mesh_library"> + <member name="mesh_library" type="MeshLibrary" setter="set_mesh_library" getter="get_mesh_library" default="null"> The assigned [MeshLibrary]. </member> <member name="theme" type="MeshLibrary" setter="set_theme" getter="get_theme"> diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 03619aa0bd..20e454c218 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -235,7 +235,7 @@ void GridMapEditor::_menu_option(int p_option) { options->get_popup()->set_item_checked(idx, !options->get_popup()->is_item_checked(idx)); } break; - case MENU_OPTION_SELECTION_DUPLICATE: // fallthrough + case MENU_OPTION_SELECTION_DUPLICATE: case MENU_OPTION_SELECTION_CUT: { if (!(selection.active && input_action == INPUT_NONE)) break; diff --git a/editor/icons/icon_grid_map.svg b/modules/gridmap/icons/icon_grid_map.svg index eafe1211f2..eafe1211f2 100644 --- a/editor/icons/icon_grid_map.svg +++ b/modules/gridmap/icons/icon_grid_map.svg diff --git a/modules/mobile_vr/doc_classes/MobileVRInterface.xml b/modules/mobile_vr/doc_classes/MobileVRInterface.xml index 8876bcbe9d..a132333a87 100644 --- a/modules/mobile_vr/doc_classes/MobileVRInterface.xml +++ b/modules/mobile_vr/doc_classes/MobileVRInterface.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="MobileVRInterface" inherits="ARVRInterface" category="Core" version="3.2"> <brief_description> - Generic mobile VR implementation + Generic mobile VR implementation. </brief_description> <description> - This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect you do need a mobile phone with a gyroscope and accelerometer. - Note that even though there is no positional tracking the camera will assume the headset is at a height of 1.85 meters, you can change this by setting [member eye_height]. + This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer. + Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting [member eye_height]. You can initialise this interface as follows: [codeblock] var interface = ARVRServer.find_interface("Native mobile") @@ -18,25 +18,25 @@ <methods> </methods> <members> - <member name="display_to_lens" type="float" setter="set_display_to_lens" getter="get_display_to_lens"> + <member name="display_to_lens" type="float" setter="set_display_to_lens" getter="get_display_to_lens" default="4.0"> The distance between the display and the lenses inside of the device in centimeters. </member> - <member name="display_width" type="float" setter="set_display_width" getter="get_display_width"> + <member name="display_width" type="float" setter="set_display_width" getter="get_display_width" default="14.5"> The width of the display in centimeters. </member> - <member name="eye_height" type="float" setter="set_eye_height" getter="get_eye_height"> + <member name="eye_height" type="float" setter="set_eye_height" getter="get_eye_height" default="1.85"> The height at which the camera is placed in relation to the ground (i.e. [ARVROrigin] node). </member> - <member name="iod" type="float" setter="set_iod" getter="get_iod"> + <member name="iod" type="float" setter="set_iod" getter="get_iod" default="6.0"> The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye. </member> - <member name="k1" type="float" setter="set_k1" getter="get_k1"> + <member name="k1" type="float" setter="set_k1" getter="get_k1" default="0.215"> The k1 lens factor is one of the two constants that define the strength of the lens used and directly influences the lens distortion effect. </member> - <member name="k2" type="float" setter="set_k2" getter="get_k2"> + <member name="k2" type="float" setter="set_k2" getter="get_k2" default="0.215"> The k2 lens factor, see k1. </member> - <member name="oversample" type="float" setter="set_oversample" getter="get_oversample"> + <member name="oversample" type="float" setter="set_oversample" getter="get_oversample" default="1.5"> The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance. </member> </members> diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 20b227bda1..9522eaee77 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -2701,7 +2701,7 @@ ScriptInstance *CSharpScript::instance_create(Object *p_this) { } Variant::CallError unchecked_error; - return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this), unchecked_error); + return _create_instance(NULL, 0, p_this, Object::cast_to<Reference>(p_this) != NULL, unchecked_error); } PlaceHolderScriptInstance *CSharpScript::placeholder_instance_create(Object *p_this) { diff --git a/modules/opensimplex/doc_classes/NoiseTexture.xml b/modules/opensimplex/doc_classes/NoiseTexture.xml index c789724fc4..4826b6cd2a 100644 --- a/modules/opensimplex/doc_classes/NoiseTexture.xml +++ b/modules/opensimplex/doc_classes/NoiseTexture.xml @@ -12,21 +12,21 @@ <methods> </methods> <members> - <member name="as_normalmap" type="bool" setter="set_as_normalmap" getter="is_normalmap"> + <member name="as_normalmap" type="bool" setter="set_as_normalmap" getter="is_normalmap" default="false"> If [code]true[/code], the resulting texture contains a normal map created from the original noise interpreted as a bump map. </member> - <member name="bump_strength" type="float" setter="set_bump_strength" getter="get_bump_strength"> + <member name="bump_strength" type="float" setter="set_bump_strength" getter="get_bump_strength" default="8.0"> </member> - <member name="height" type="int" setter="set_height" getter="get_height"> + <member name="height" type="int" setter="set_height" getter="get_height" default="512"> Height of the generated texture. </member> - <member name="noise" type="OpenSimplexNoise" setter="set_noise" getter="get_noise"> + <member name="noise" type="OpenSimplexNoise" setter="set_noise" getter="get_noise" default="null"> The [OpenSimplexNoise] instance used to generate the noise. </member> - <member name="seamless" type="bool" setter="set_seamless" getter="get_seamless"> + <member name="seamless" type="bool" setter="set_seamless" getter="get_seamless" default="false"> Whether the texture can be tiled without visible seams or not. Seamless textures take longer to generate. </member> - <member name="width" type="int" setter="set_width" getter="get_width"> + <member name="width" type="int" setter="set_width" getter="get_width" default="512"> Width of the generated texture. </member> </members> diff --git a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml index 894a1b3ced..f3fbbab3da 100644 --- a/modules/opensimplex/doc_classes/OpenSimplexNoise.xml +++ b/modules/opensimplex/doc_classes/OpenSimplexNoise.xml @@ -42,7 +42,7 @@ </argument> <description> Returns the 1D noise value [code][-1,1][/code] at the given x-coordinate. - Note: This method actually returns the 2D noise value [code][-1,1][/code] with fixed y-coordinate value 0.0. + [b]Note:[/b] This method actually returns the 2D noise value [code][-1,1][/code] with fixed y-coordinate value 0.0. </description> </method> <method name="get_noise_2d"> @@ -108,24 +108,24 @@ <argument index="0" name="size" type="int"> </argument> <description> - Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square ([code]size[/code] x [code]size[/code]). + Generate a tileable noise image, based on the current noise parameters. Generated seamless images are always square ([code]size[/code] × [code]size[/code]). </description> </method> </methods> <members> - <member name="lacunarity" type="float" setter="set_lacunarity" getter="get_lacunarity"> + <member name="lacunarity" type="float" setter="set_lacunarity" getter="get_lacunarity" default="2.0"> Difference in period between [member octaves]. </member> - <member name="octaves" type="int" setter="set_octaves" getter="get_octaves"> + <member name="octaves" type="int" setter="set_octaves" getter="get_octaves" default="3"> Number of OpenSimplex noise layers that are sampled to get the fractal noise. </member> - <member name="period" type="float" setter="set_period" getter="get_period"> + <member name="period" type="float" setter="set_period" getter="get_period" default="64.0"> Period of the base octave. A lower period results in a higher-frequency noise (more value changes across the same distance). </member> - <member name="persistence" type="float" setter="set_persistence" getter="get_persistence"> + <member name="persistence" type="float" setter="set_persistence" getter="get_persistence" default="0.5"> Contribution factor of the different octaves. A [code]persistence[/code] value of 1 means all the octaves have the same contribution, a value of 0.5 means each octave contributes half as much as the previous one. </member> - <member name="seed" type="int" setter="set_seed" getter="get_seed"> + <member name="seed" type="int" setter="set_seed" getter="get_seed" default="0"> Seed used to generate random values, different seeds will generate different noise maps. </member> </members> diff --git a/editor/icons/icon_noise_texture.svg b/modules/opensimplex/icons/icon_noise_texture.svg index 5908c2b2d4..5908c2b2d4 100644 --- a/editor/icons/icon_noise_texture.svg +++ b/modules/opensimplex/icons/icon_noise_texture.svg diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml index cc8205e400..74b06039d4 100644 --- a/modules/regex/doc_classes/RegEx.xml +++ b/modules/regex/doc_classes/RegEx.xml @@ -4,7 +4,7 @@ Class for searching text for patterns using regular expressions. </brief_description> <description> - Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. + A regular expression (or regex) is a compact language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. To begin, the RegEx object needs to be compiled with the search pattern using [method compile] before it can be used. [codeblock] var regex = RegEx.new() @@ -19,7 +19,7 @@ if result: print(result.get_string()) # Would print n-0123 [/codeblock] - The results of capturing groups [code]()[/code] can be retrieved by passing the group number to the various functions in [RegExMatch]. Group 0 is the default and would always refer to the entire pattern. In the above example, calling [code]result.get_string(1)[/code] would give you [code]0123[/code]. + The results of capturing groups [code]()[/code] can be retrieved by passing the group number to the various functions in [RegExMatch]. Group 0 is the default and will always refer to the entire pattern. In the above example, calling [code]result.get_string(1)[/code] would give you [code]0123[/code]. This version of RegEx also supports named capturing groups, and the names can be used to retrieve the results. If two or more groups have the same name, the name would only refer to the first one with a match. [codeblock] var regex = RegEx.new() @@ -28,7 +28,7 @@ if result: print(result.get_string("digit")) # Would print 2f [/codeblock] - If you need to process multiple results, [method search_all] generates a list of all non-overlapping results. This can be combined with a for-loop for convenience. + If you need to process multiple results, [method search_all] generates a list of all non-overlapping results. This can be combined with a [code]for[/code] loop for convenience. [codeblock] for result in regex.search_all("d01, d03, d0c, x3f and x42"): print(result.get_string("digit")) @@ -43,7 +43,7 @@ <return type="void"> </return> <description> - This method resets the state of the object, as it was freshly created. Namely, it unassigns the regular expression of this object. + This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object. </description> </method> <method name="compile"> @@ -52,7 +52,7 @@ <argument index="0" name="pattern" type="String"> </argument> <description> - Compiles and assign the search pattern to use. Returns OK if the compilation is successful. If an error is encountered the details are printed to STDOUT and FAILED is returned. + Compiles and assign the search pattern to use. Returns [constant OK] if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. </description> </method> <method name="get_group_count" qualifiers="const"> @@ -93,7 +93,7 @@ <argument index="2" name="end" type="int" default="-1"> </argument> <description> - Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching result if found, otherwise null. The region to search within can be specified without modifying where the start and end anchor would be. + Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching result if found, otherwise [code]null[/code]. The region to search within can be specified without modifying where the start and end anchor would be. </description> </method> <method name="search_all" qualifiers="const"> @@ -106,7 +106,7 @@ <argument index="2" name="end" type="int" default="-1"> </argument> <description> - Searches the text for the compiled pattern. Returns an array of [RegExMatch] containers for each non-overlapping result. If no results were found an empty array is returned instead. The region to search within can be specified without modifying where the start and end anchor would be. + Searches the text for the compiled pattern. Returns an array of [RegExMatch] containers for each non-overlapping result. If no results were found, an empty array is returned instead. The region to search within can be specified without modifying where the start and end anchor would be. </description> </method> <method name="sub" qualifiers="const"> @@ -123,7 +123,7 @@ <argument index="4" name="end" type="int" default="-1"> </argument> <description> - Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]$1[/code] and [code]$name[/code] are expanded and resolved. By default only the first instance is replaced but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be. + Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]$1[/code] and [code]$name[/code] are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be. </description> </method> </methods> diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml index 245201006d..e279607d13 100644 --- a/modules/regex/doc_classes/RegExMatch.xml +++ b/modules/regex/doc_classes/RegExMatch.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RegExMatch" inherits="Reference" category="Core" version="3.2"> <brief_description> - Contains the results of a regex search. + Contains the results of a [RegEx] search. </brief_description> <description> - Contains the results of a single regex match returned by [method RegEx.search] and [method RegEx.search_all]. It can be used to find the position and range of the match and its capturing groups, and it can extract its sub-string for you. + Contains the results of a single [RegEx] match returned by [method RegEx.search] and [method RegEx.search_all]. It can be used to find the position and range of the match and its capturing groups, and it can extract its substring for you. </description> <tutorials> </tutorials> @@ -48,13 +48,15 @@ </method> </methods> <members> - <member name="names" type="Dictionary" setter="" getter="get_names"> + <member name="names" type="Dictionary" setter="" getter="get_names" default="{ + +}"> A dictionary of named groups and its corresponding group number. Only groups with that were matched are included. If multiple groups have the same name, that name would refer to the first matching one. </member> - <member name="strings" type="Array" setter="" getter="get_strings"> + <member name="strings" type="Array" setter="" getter="get_strings" default="[ ]"> An [Array] of the match and its capturing groups. </member> - <member name="subject" type="String" setter="" getter="get_subject"> + <member name="subject" type="String" setter="" getter="get_subject" default=""""> The source string used with the search pattern to find this matching result. </member> </members> diff --git a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml index 388c5e81ed..9403199398 100644 --- a/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml +++ b/modules/stb_vorbis/doc_classes/AudioStreamOGGVorbis.xml @@ -11,12 +11,12 @@ <methods> </methods> <members> - <member name="data" type="PoolByteArray" setter="set_data" getter="get_data"> + <member name="data" type="PoolByteArray" setter="set_data" getter="get_data" default="PoolByteArray( )"> Contains the audio data in bytes. </member> - <member name="loop" type="bool" setter="set_loop" getter="has_loop"> + <member name="loop" type="bool" setter="set_loop" getter="has_loop" default="false"> </member> - <member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset"> + <member name="loop_offset" type="float" setter="set_loop_offset" getter="get_loop_offset" default="0.0"> </member> </members> <constants> diff --git a/modules/upnp/SCsub b/modules/upnp/SCsub index 6d669ab73b..ec1d7f44d5 100644 --- a/modules/upnp/SCsub +++ b/modules/upnp/SCsub @@ -23,10 +23,11 @@ if env['builtin_miniupnpc']: "portlistingparse.c", "upnpreplyparse.c", ] - thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources] + thirdparty_sources = [thirdparty_dir + "miniupnpc/" + file for file in thirdparty_sources] env_upnp.Prepend(CPPPATH=[thirdparty_dir]) env_upnp.Append(CPPFLAGS=["-DMINIUPNP_STATICLIB"]) + env_upnp.Append(CPPFLAGS=["-DMINIUPNPC_SET_SOCKET_TIMEOUT"]) env_thirdparty = env_upnp.Clone() env_thirdparty.disable_warnings() diff --git a/modules/upnp/doc_classes/UPNP.xml b/modules/upnp/doc_classes/UPNP.xml index d3eb21e159..aac0932995 100644 --- a/modules/upnp/doc_classes/UPNP.xml +++ b/modules/upnp/doc_classes/UPNP.xml @@ -134,13 +134,13 @@ </method> </methods> <members> - <member name="discover_ipv6" type="bool" setter="set_discover_ipv6" getter="is_discover_ipv6"> + <member name="discover_ipv6" type="bool" setter="set_discover_ipv6" getter="is_discover_ipv6" default="false"> If [code]true[/code], IPv6 is used for [UPNPDevice] discovery. </member> - <member name="discover_local_port" type="int" setter="set_discover_local_port" getter="get_discover_local_port"> + <member name="discover_local_port" type="int" setter="set_discover_local_port" getter="get_discover_local_port" default="0"> If [code]0[/code], the local port to use for discovery is chosen automatically by the system. If [code]1[/code], discovery will be done from the source port 1900 (same as destination port). Otherwise, the value will be used as the port. </member> - <member name="discover_multicast_if" type="String" setter="set_discover_multicast_if" getter="get_discover_multicast_if"> + <member name="discover_multicast_if" type="String" setter="set_discover_multicast_if" getter="get_discover_multicast_if" default=""""> Multicast interface to use for discovery. Uses the default multicast interface if empty. </member> </members> diff --git a/modules/upnp/doc_classes/UPNPDevice.xml b/modules/upnp/doc_classes/UPNPDevice.xml index 1d9a728365..4d3a0f4f1d 100644 --- a/modules/upnp/doc_classes/UPNPDevice.xml +++ b/modules/upnp/doc_classes/UPNPDevice.xml @@ -53,22 +53,22 @@ </method> </methods> <members> - <member name="description_url" type="String" setter="set_description_url" getter="get_description_url"> + <member name="description_url" type="String" setter="set_description_url" getter="get_description_url" default=""""> URL to the device description. </member> - <member name="igd_control_url" type="String" setter="set_igd_control_url" getter="get_igd_control_url"> + <member name="igd_control_url" type="String" setter="set_igd_control_url" getter="get_igd_control_url" default=""""> IDG control URL. </member> - <member name="igd_our_addr" type="String" setter="set_igd_our_addr" getter="get_igd_our_addr"> + <member name="igd_our_addr" type="String" setter="set_igd_our_addr" getter="get_igd_our_addr" default=""""> Address of the local machine in the network connecting it to this [UPNPDevice]. </member> - <member name="igd_service_type" type="String" setter="set_igd_service_type" getter="get_igd_service_type"> + <member name="igd_service_type" type="String" setter="set_igd_service_type" getter="get_igd_service_type" default=""""> IGD service type. </member> - <member name="igd_status" type="int" setter="set_igd_status" getter="get_igd_status" enum="UPNPDevice.IGDStatus"> + <member name="igd_status" type="int" setter="set_igd_status" getter="get_igd_status" enum="UPNPDevice.IGDStatus" default="9"> IGD status. See [enum IGDStatus]. </member> - <member name="service_type" type="String" setter="set_service_type" getter="get_service_type"> + <member name="service_type" type="String" setter="set_service_type" getter="get_service_type" default=""""> Service type. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScript.xml b/modules/visual_script/doc_classes/VisualScript.xml index 8f0d881f30..0d95075152 100644 --- a/modules/visual_script/doc_classes/VisualScript.xml +++ b/modules/visual_script/doc_classes/VisualScript.xml @@ -252,7 +252,7 @@ <argument index="0" name="name" type="String"> </argument> <description> - Returns the info for a given variable as a dictionary. The information includes its name, type, hint and usage. + Returns the information for a given variable as a dictionary. The information includes its name, type, hint and usage. </description> </method> <method name="has_custom_signal" qualifiers="const"> diff --git a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml index b591dc9a51..6dc54dbc03 100644 --- a/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml +++ b/modules/visual_script/doc_classes/VisualScriptBasicTypeConstant.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> + <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type" default="0"> The type to get the constant from. </member> <member name="constant" type="String" setter="set_basic_type_constant" getter="get_basic_type_constant"> diff --git a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml index b88d2890e1..470a3a5e35 100644 --- a/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml +++ b/modules/visual_script/doc_classes/VisualScriptBuiltinFunc.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc"> + <member name="function" type="int" setter="set_func" getter="get_func" enum="VisualScriptBuiltinFunc.BuiltinFunc" default="0"> The function to be executed. </member> </members> @@ -106,7 +106,7 @@ Moves the number toward a value, based on the third input. </constant> <constant name="MATH_DECTIME" value="30" enum="BuiltinFunc"> - Return the result of 'value' decreased by 'step' * 'amount'. + Return the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code]. </constant> <constant name="MATH_RANDOMIZE" value="31" enum="BuiltinFunc"> Randomize the seed (or the internal state) of the random number generator. Current implementation reseeds using a number based on time. @@ -139,10 +139,10 @@ Convert the input from decibel volume to linear volume. </constant> <constant name="MATH_POLAR2CARTESIAN" value="41" enum="BuiltinFunc"> - Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (x and y axis). + Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis). </constant> <constant name="MATH_CARTESIAN2POLAR" value="42" enum="BuiltinFunc"> - Converts a 2D point expressed in the cartesian coordinate system (x and y axis) to the polar coordinate system (a distance from the origin and an angle). + Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle). </constant> <constant name="MATH_WRAP" value="43" enum="BuiltinFunc"> </constant> @@ -203,7 +203,8 @@ Deserialize a [Variant] from a [PoolByteArray] serialized using [constant VAR_TO_BYTES]. </constant> <constant name="COLORN" value="63" enum="BuiltinFunc"> - Return the [Color] with the given name and alpha ranging from 0 to 1. Note: names are defined in color_names.inc. + Return the [Color] with the given name and alpha ranging from 0 to 1 + [b]Note:[/b] Names are defined in [code]color_names.inc[/code]. </constant> <constant name="MATH_SMOOTHSTEP" value="64" enum="BuiltinFunc"> Return a number smoothly interpolated between the first two inputs, based on the third input. Similar to [constant MATH_LERP], but interpolates faster at the beginning and slower at the end. Using Hermite interpolation formula: diff --git a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml index 7d83cd0203..49ea7850ef 100644 --- a/modules/visual_script/doc_classes/VisualScriptClassConstant.xml +++ b/modules/visual_script/doc_classes/VisualScriptClassConstant.xml @@ -15,10 +15,10 @@ <methods> </methods> <members> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> The constant's parent class. </member> - <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant"> + <member name="constant" type="String" setter="set_class_constant" getter="get_class_constant" default=""""> The constant to return. See the given class for its available constants. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptComment.xml b/modules/visual_script/doc_classes/VisualScriptComment.xml index 9652654610..2538bc8356 100644 --- a/modules/visual_script/doc_classes/VisualScriptComment.xml +++ b/modules/visual_script/doc_classes/VisualScriptComment.xml @@ -12,13 +12,13 @@ <methods> </methods> <members> - <member name="description" type="String" setter="set_description" getter="get_description"> + <member name="description" type="String" setter="set_description" getter="get_description" default=""""> The text inside the comment node. </member> - <member name="size" type="Vector2" setter="set_size" getter="get_size"> + <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2( 150, 150 )"> The comment node's size (in pixels). </member> - <member name="title" type="String" setter="set_title" getter="get_title"> + <member name="title" type="String" setter="set_title" getter="get_title" default=""Comment""> The comment node's title. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptConstant.xml b/modules/visual_script/doc_classes/VisualScriptConstant.xml index b15af8e4ea..eb12fc3731 100644 --- a/modules/visual_script/doc_classes/VisualScriptConstant.xml +++ b/modules/visual_script/doc_classes/VisualScriptConstant.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type"> + <member name="type" type="int" setter="set_constant_type" getter="get_constant_type" enum="Variant.Type" default="0"> The constant's type. </member> <member name="value" type="Variant" setter="set_constant_value" getter="get_constant_value"> diff --git a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml index cd3a663e81..b079653591 100644 --- a/modules/visual_script/doc_classes/VisualScriptCustomNode.xml +++ b/modules/visual_script/doc_classes/VisualScriptCustomNode.xml @@ -45,7 +45,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Return the specified input port's type. See the TYPE_* enum in [@GlobalScope]. + Return the specified input port's type. See the [code]TYPE_*[/code] enum in [@GlobalScope]. </description> </method> <method name="_get_output_sequence_port_count" qualifiers="virtual"> @@ -86,7 +86,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Return the specified output's type. See the TYPE_* enum in [@GlobalScope]. + Return the specified output's type. See the [code]TYPE_*[/code] enum in [@GlobalScope]. </description> </method> <method name="_get_text" qualifiers="virtual"> @@ -125,9 +125,9 @@ Execute the custom node's logic, returning the index of the output sequence port to use or a [String] when there is an error. The [code]inputs[/code] array contains the values of the input ports. [code]outputs[/code] is an array whose indices should be set to the respective outputs. - The [code]start_mode[/code] is usually [constant START_MODE_BEGIN_SEQUENCE], unless you have used the STEP_* constants. + The [code]start_mode[/code] is usually [constant START_MODE_BEGIN_SEQUENCE], unless you have used the [code]STEP_*[/code] constants. [code]working_mem[/code] is an array which can be used to persist information between runs of the custom node. - When returning, you can mask the returned value with one of the STEP_* constants. + When returning, you can mask the returned value with one of the [code]STEP_*[/code] constants. </description> </method> </methods> diff --git a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml index a0eed5b753..c8543287b4 100644 --- a/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml +++ b/modules/visual_script/doc_classes/VisualScriptDeconstruct.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type"> + <member name="type" type="int" setter="set_deconstruct_type" getter="get_deconstruct_type" enum="Variant.Type" default="0"> The type to deconstruct. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml index 623aa1ba86..1a567905a9 100644 --- a/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml +++ b/modules/visual_script/doc_classes/VisualScriptEmitSignal.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="signal" type="String" setter="set_signal" getter="get_signal"> + <member name="signal" type="String" setter="set_signal" getter="get_signal" default=""""> The signal to emit. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml index 525389366a..05bd87ec22 100644 --- a/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml +++ b/modules/visual_script/doc_classes/VisualScriptEngineSingleton.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="constant" type="String" setter="set_singleton" getter="get_singleton"> + <member name="constant" type="String" setter="set_singleton" getter="get_singleton" default=""""> The singleton's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml index e4d0bb7672..f7f86e8c80 100644 --- a/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml +++ b/modules/visual_script/doc_classes/VisualScriptFunctionCall.xml @@ -11,23 +11,23 @@ <members> <member name="base_script" type="String" setter="set_base_script" getter="get_base_script"> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> </member> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> </member> - <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptFunctionCall.CallMode"> + <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptFunctionCall.CallMode" default="0"> </member> - <member name="function" type="String" setter="set_function" getter="get_function"> + <member name="function" type="String" setter="set_function" getter="get_function" default=""""> </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> - <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" enum="VisualScriptFunctionCall.RPCCallMode"> + <member name="rpc_call_mode" type="int" setter="set_rpc_call_mode" getter="get_rpc_call_mode" enum="VisualScriptFunctionCall.RPCCallMode" default="0"> </member> <member name="singleton" type="String" setter="set_singleton" getter="get_singleton"> </member> <member name="use_default_args" type="int" setter="set_use_default_args" getter="get_use_default_args"> </member> - <member name="validate" type="bool" setter="set_validate" getter="get_validate"> + <member name="validate" type="bool" setter="set_validate" getter="get_validate" default="true"> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml index 4099a351e6..6c70dc7dc4 100644 --- a/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml +++ b/modules/visual_script/doc_classes/VisualScriptGlobalConstant.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="constant" type="int" setter="set_global_constant" getter="get_global_constant"> + <member name="constant" type="int" setter="set_global_constant" getter="get_global_constant" default="0"> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptInputAction.xml b/modules/visual_script/doc_classes/VisualScriptInputAction.xml index 4bd1430cf6..8c942813b2 100644 --- a/modules/visual_script/doc_classes/VisualScriptInputAction.xml +++ b/modules/visual_script/doc_classes/VisualScriptInputAction.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="action" type="String" setter="set_action_name" getter="get_action_name"> + <member name="action" type="String" setter="set_action_name" getter="get_action_name" default=""""> </member> - <member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="VisualScriptInputAction.Mode"> + <member name="mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="VisualScriptInputAction.Mode" default="0"> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml index 5d061ea79f..8c21c3f0bc 100644 --- a/modules/visual_script/doc_classes/VisualScriptLocalVar.xml +++ b/modules/visual_script/doc_classes/VisualScriptLocalVar.xml @@ -15,10 +15,10 @@ <methods> </methods> <members> - <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type"> + <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0"> The local variable's type. </member> - <member name="var_name" type="String" setter="set_var_name" getter="get_var_name"> + <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" default=""new_local""> The local variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml index 049195d890..a981432cdb 100644 --- a/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml +++ b/modules/visual_script/doc_classes/VisualScriptLocalVarSet.xml @@ -17,10 +17,10 @@ <methods> </methods> <members> - <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type"> + <member name="type" type="int" setter="set_var_type" getter="get_var_type" enum="Variant.Type" default="0"> The local variable's type. </member> - <member name="var_name" type="String" setter="set_var_name" getter="get_var_name"> + <member name="var_name" type="String" setter="set_var_name" getter="get_var_name" default=""new_local""> The local variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml index fb4e423f0e..3be392aef5 100644 --- a/modules/visual_script/doc_classes/VisualScriptMathConstant.xml +++ b/modules/visual_script/doc_classes/VisualScriptMathConstant.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" enum="VisualScriptMathConstant.MathConstant"> + <member name="constant" type="int" setter="set_math_constant" getter="get_math_constant" enum="VisualScriptMathConstant.MathConstant" default="0"> The math constant. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptOperator.xml b/modules/visual_script/doc_classes/VisualScriptOperator.xml index a0827972e0..80449ac521 100644 --- a/modules/visual_script/doc_classes/VisualScriptOperator.xml +++ b/modules/visual_script/doc_classes/VisualScriptOperator.xml @@ -14,9 +14,9 @@ <methods> </methods> <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="Variant.Operator"> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="Variant.Operator" default="6"> </member> - <member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type"> + <member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type" default="0"> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptPreload.xml b/modules/visual_script/doc_classes/VisualScriptPreload.xml index b3b39691c9..05ed0ad1e5 100644 --- a/modules/visual_script/doc_classes/VisualScriptPreload.xml +++ b/modules/visual_script/doc_classes/VisualScriptPreload.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="resource" type="Resource" setter="set_preload" getter="get_preload"> + <member name="resource" type="Resource" setter="set_preload" getter="get_preload" default="null"> The [Resource] to load. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml index 697a31ca46..af1e8e68e8 100644 --- a/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml +++ b/modules/visual_script/doc_classes/VisualScriptPropertyGet.xml @@ -11,7 +11,7 @@ <members> <member name="base_script" type="String" setter="set_base_script" getter="get_base_script"> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> </member> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> </member> @@ -19,9 +19,9 @@ </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> - <member name="property" type="String" setter="set_property" getter="get_property"> + <member name="property" type="String" setter="set_property" getter="get_property" default=""""> </member> - <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertyGet.CallMode"> + <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertyGet.CallMode" default="0"> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml index c41e3781d4..380c196caf 100644 --- a/modules/visual_script/doc_classes/VisualScriptPropertySet.xml +++ b/modules/visual_script/doc_classes/VisualScriptPropertySet.xml @@ -9,11 +9,11 @@ <methods> </methods> <members> - <member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" enum="VisualScriptPropertySet.AssignOp"> + <member name="assign_op" type="int" setter="set_assign_op" getter="get_assign_op" enum="VisualScriptPropertySet.AssignOp" default="0"> </member> <member name="base_script" type="String" setter="set_base_script" getter="get_base_script"> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> </member> <member name="basic_type" type="int" setter="set_basic_type" getter="get_basic_type" enum="Variant.Type"> </member> @@ -21,9 +21,9 @@ </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> - <member name="property" type="String" setter="set_property" getter="get_property"> + <member name="property" type="String" setter="set_property" getter="get_property" default=""""> </member> - <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertySet.CallMode"> + <member name="set_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptPropertySet.CallMode" default="0"> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml index 40862b810b..da37bbbb2c 100644 --- a/modules/visual_script/doc_classes/VisualScriptResourcePath.xml +++ b/modules/visual_script/doc_classes/VisualScriptResourcePath.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="path" type="String" setter="set_resource_path" getter="get_resource_path"> + <member name="path" type="String" setter="set_resource_path" getter="get_resource_path" default=""""> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptReturn.xml b/modules/visual_script/doc_classes/VisualScriptReturn.xml index 40c8963efe..9a81c671d4 100644 --- a/modules/visual_script/doc_classes/VisualScriptReturn.xml +++ b/modules/visual_script/doc_classes/VisualScriptReturn.xml @@ -16,10 +16,10 @@ <methods> </methods> <members> - <member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled"> + <member name="return_enabled" type="bool" setter="set_enable_return_value" getter="is_return_value_enabled" default="false"> If [code]true[/code], the [code]return[/code] input port is available. </member> - <member name="return_type" type="int" setter="set_return_type" getter="get_return_type" enum="Variant.Type"> + <member name="return_type" type="int" setter="set_return_type" getter="get_return_type" enum="Variant.Type" default="0"> The return value's data type. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml index 81ef4ceedc..99f4acbd27 100644 --- a/modules/visual_script/doc_classes/VisualScriptSceneNode.xml +++ b/modules/visual_script/doc_classes/VisualScriptSceneNode.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="node_path" type="NodePath" setter="set_node_path" getter="get_node_path"> + <member name="node_path" type="NodePath" setter="set_node_path" getter="get_node_path" default="NodePath(".")"> The node's path in the scene tree. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptSelect.xml b/modules/visual_script/doc_classes/VisualScriptSelect.xml index 3b1e7f7f02..e6a6cd5a48 100644 --- a/modules/visual_script/doc_classes/VisualScriptSelect.xml +++ b/modules/visual_script/doc_classes/VisualScriptSelect.xml @@ -17,7 +17,7 @@ <methods> </methods> <members> - <member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type"> + <member name="type" type="int" setter="set_typed" getter="get_typed" enum="Variant.Type" default="0"> The input variables' type. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptSequence.xml b/modules/visual_script/doc_classes/VisualScriptSequence.xml index 26af15b404..2ceceb199f 100644 --- a/modules/visual_script/doc_classes/VisualScriptSequence.xml +++ b/modules/visual_script/doc_classes/VisualScriptSequence.xml @@ -17,7 +17,7 @@ <methods> </methods> <members> - <member name="steps" type="int" setter="set_steps" getter="get_steps"> + <member name="steps" type="int" setter="set_steps" getter="get_steps" default="1"> The number of steps in the sequence. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptSwitch.xml b/modules/visual_script/doc_classes/VisualScriptSwitch.xml index 35929b16ac..3e3b88ebe0 100644 --- a/modules/visual_script/doc_classes/VisualScriptSwitch.xml +++ b/modules/visual_script/doc_classes/VisualScriptSwitch.xml @@ -4,7 +4,7 @@ Branches program flow based on a given input's value. </brief_description> <description> - Branches the flow based on an input's value. Use "Case Count" in the Inspector to set the number of branches and each comparison's optional type. + Branches the flow based on an input's value. Use [b]Case Count[/b] in the Inspector to set the number of branches and each comparison's optional type. [b]Input Ports:[/b] - Sequence: [code]'input' is[/code] - Data (variant): [code]=[/code] diff --git a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml index a9e920bca6..999a190a9a 100644 --- a/modules/visual_script/doc_classes/VisualScriptTypeCast.xml +++ b/modules/visual_script/doc_classes/VisualScriptTypeCast.xml @@ -9,9 +9,9 @@ <methods> </methods> <members> - <member name="base_script" type="String" setter="set_base_script" getter="get_base_script"> + <member name="base_script" type="String" setter="set_base_script" getter="get_base_script" default=""""> </member> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> </member> </members> <constants> diff --git a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml index e1c7c4e4d4..40e461294b 100644 --- a/modules/visual_script/doc_classes/VisualScriptVariableGet.xml +++ b/modules/visual_script/doc_classes/VisualScriptVariableGet.xml @@ -15,7 +15,7 @@ <methods> </methods> <members> - <member name="var_name" type="String" setter="set_variable" getter="get_variable"> + <member name="var_name" type="String" setter="set_variable" getter="get_variable" default=""""> The variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml index 7339482908..6c53ad61b4 100644 --- a/modules/visual_script/doc_classes/VisualScriptVariableSet.xml +++ b/modules/visual_script/doc_classes/VisualScriptVariableSet.xml @@ -16,7 +16,7 @@ <methods> </methods> <members> - <member name="var_name" type="String" setter="set_variable" getter="get_variable"> + <member name="var_name" type="String" setter="set_variable" getter="get_variable" default=""""> The variable's name. </member> </members> diff --git a/modules/visual_script/doc_classes/VisualScriptYield.xml b/modules/visual_script/doc_classes/VisualScriptYield.xml index 9f61a5f88c..c506e6db01 100644 --- a/modules/visual_script/doc_classes/VisualScriptYield.xml +++ b/modules/visual_script/doc_classes/VisualScriptYield.xml @@ -9,7 +9,7 @@ <methods> </methods> <members> - <member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" enum="VisualScriptYield.YieldMode"> + <member name="mode" type="int" setter="set_yield_mode" getter="get_yield_mode" enum="VisualScriptYield.YieldMode" default="1"> </member> <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time"> </member> diff --git a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml index 6791375182..b9d7aedaab 100644 --- a/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml +++ b/modules/visual_script/doc_classes/VisualScriptYieldSignal.xml @@ -9,13 +9,13 @@ <methods> </methods> <members> - <member name="base_type" type="String" setter="set_base_type" getter="get_base_type"> + <member name="base_type" type="String" setter="set_base_type" getter="get_base_type" default=""Object""> </member> - <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptYieldSignal.CallMode"> + <member name="call_mode" type="int" setter="set_call_mode" getter="get_call_mode" enum="VisualScriptYieldSignal.CallMode" default="0"> </member> <member name="node_path" type="NodePath" setter="set_base_path" getter="get_base_path"> </member> - <member name="signal" type="String" setter="set_signal" getter="get_signal"> + <member name="signal" type="String" setter="set_signal" getter="get_signal" default=""""> </member> </members> <constants> diff --git a/editor/icons/icon_visual_script.svg b/modules/visual_script/icons/icon_visual_script.svg index f6475d590e..f6475d590e 100644 --- a/editor/icons/icon_visual_script.svg +++ b/modules/visual_script/icons/icon_visual_script.svg diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index 3ac170a935..4579644d49 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -1099,6 +1099,9 @@ void VisualScriptEditor::_expression_text_changed(const String &p_text, int p_id void VisualScriptEditor::_available_node_doubleclicked() { + if (edited_func == String()) + return; + TreeItem *item = nodes->get_selected(); if (!item) @@ -1107,7 +1110,6 @@ void VisualScriptEditor::_available_node_doubleclicked() { String which = item->get_metadata(0); if (which == String()) return; - Vector2 ofs = graph->get_scroll_ofs() + graph->get_size() * 0.5; if (graph->is_using_snap()) { diff --git a/modules/webrtc/doc_classes/WebRTCDataChannel.xml b/modules/webrtc/doc_classes/WebRTCDataChannel.xml index 6d600f6239..98715ee99b 100644 --- a/modules/webrtc/doc_classes/WebRTCDataChannel.xml +++ b/modules/webrtc/doc_classes/WebRTCDataChannel.xml @@ -89,7 +89,7 @@ </method> </methods> <members> - <member name="write_mode" type="int" setter="set_write_mode" getter="get_write_mode" enum="WebRTCDataChannel.WriteMode"> + <member name="write_mode" type="int" setter="set_write_mode" getter="get_write_mode" enum="WebRTCDataChannel.WriteMode" default="1"> The transfer mode to use when sending outgoing packet. Either text or binary. </member> </members> diff --git a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml index 4c2938d0db..26082d73a8 100644 --- a/modules/webrtc/doc_classes/WebRTCPeerConnection.xml +++ b/modules/webrtc/doc_classes/WebRTCPeerConnection.xml @@ -60,7 +60,7 @@ "protocol": "my-custom-protocol", # A custom sub-protocol string for this channel. } [/codeblock] - NOTE: You must keep a reference to channels created this way, or it will be closed. + [b]Note:[/b] You must keep a reference to channels created this way, or it will be closed. </description> </method> <method name="create_offer"> @@ -172,7 +172,7 @@ The connection is new, data channels and an offer can be created in this state. </constant> <constant name="STATE_CONNECTING" value="1" enum="ConnectionState"> - The peer is connecting, ICE is in progress, non of the transports has failed. + The peer is connecting, ICE is in progress, none of the transports has failed. </constant> <constant name="STATE_CONNECTED" value="2" enum="ConnectionState"> The peer is connected, all ICE transports are connected. diff --git a/modules/webrtc/webrtc_data_channel_gdnative.cpp b/modules/webrtc/webrtc_data_channel_gdnative.cpp index 4f33491af2..6362634626 100644 --- a/modules/webrtc/webrtc_data_channel_gdnative.cpp +++ b/modules/webrtc/webrtc_data_channel_gdnative.cpp @@ -35,6 +35,7 @@ #include "modules/gdnative/nativescript/nativescript.h" void WebRTCDataChannelGDNative::_bind_methods() { + ADD_PROPERTY_DEFAULT("write_mode", WRITE_MODE_BINARY); } WebRTCDataChannelGDNative::WebRTCDataChannelGDNative() { diff --git a/modules/websocket/doc_classes/WebSocketClient.xml b/modules/websocket/doc_classes/WebSocketClient.xml index 26122dfad4..0d425ad1dd 100644 --- a/modules/websocket/doc_classes/WebSocketClient.xml +++ b/modules/websocket/doc_classes/WebSocketClient.xml @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="WebSocketClient" inherits="WebSocketMultiplayerPeer" category="Core" version="3.2"> <brief_description> - A WebSocket client implementation + A WebSocket client implementation. </brief_description> <description> - This class implements a WebSocket client compatible with any RFC 6455 complaint WebSocket server. + This class implements a WebSocket client compatible with any RFC 6455-compliant WebSocket server. This client can be optionally used as a network peer for the [MultiplayerAPI]. After starting the client ([method connect_to_url]), you will need to [method NetworkedMultiplayerPeer.poll] it at regular intervals (e.g. inside [method Node._process]). - You will received appropriate signals when connecting, disconnecting, or when new data is available. + You will receive appropriate signals when connecting, disconnecting, or when new data is available. </description> <tutorials> </tutorials> @@ -22,8 +22,8 @@ <argument index="2" name="gd_mp_api" type="bool" default="false"> </argument> <description> - Connect to the given URL requesting one of the given [code]protocols[/code] as sub-protocol. - If [code]true[/code] is passed as [code]gd_mp_api[/code], the client will behave like a network peer for the [MultiplayerAPI], connections to non Godot servers will not work, and [signal data_received] will not be emitted. + Connects to the given URL requesting one of the given [code]protocols[/code] as sub-protocol. + If [code]true[/code] is passed as [code]gd_mp_api[/code], the client will behave like a network peer for the [MultiplayerAPI], connections to non-Godot servers will not work, and [signal data_received] will not be emitted. If [code]false[/code] is passed instead (default), you must call [PacketPeer] functions ([code]put_packet[/code], [code]get_packet[/code], etc.) on the [WebSocketPeer] returned via [code]get_peer(1)[/code] and not on this object directly (e.g. [code]get_peer(1).put_packet(data)[/code]). </description> </method> @@ -35,13 +35,14 @@ <argument index="1" name="reason" type="String" default=""""> </argument> <description> - Disconnect this client from the connected host. See [method WebSocketPeer.close] for more info. + Disconnects this client from the connected host. See [method WebSocketPeer.close] for more information. </description> </method> </methods> <members> <member name="verify_ssl" type="bool" setter="set_verify_ssl_enabled" getter="is_verify_ssl_enabled"> - Enable or disable SSL certificate verification. Note: You must specify the certificates to be used in the project settings for it to work when exported. + If [code]true[/code], SSL certificate verification is enabled. + [b]Note:[/b] You must specify the certificates to be used in the Project Settings for it to work when exported. </member> </members> <signals> @@ -66,7 +67,8 @@ </signal> <signal name="data_received"> <description> - Emitted when a WebSocket message is received. Note: This signal is NOT emitted when used as high level multiplayer peer. + Emitted when a WebSocket message is received. + [b]Note:[/b] This signal is [i]not[/i] emitted when used as high-level multiplayer peer. </description> </signal> <signal name="server_close_request"> diff --git a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml index 103dbd771b..b80a28e648 100644 --- a/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml +++ b/modules/websocket/doc_classes/WebSocketMultiplayerPeer.xml @@ -30,10 +30,10 @@ <argument index="3" name="output_max_packets" type="int"> </argument> <description> - Configure the buffers sizes for this WebSocket peer. Default values can be specified in project settings under [code]network/limits[/code]. For server, values are meant per connected peer. + Configures the buffer sizes for this WebSocket peer. Default values can be specified in the Project Settings under [code]network/limits[/code]. For server, values are meant per connected peer. The first two parameters define the size and queued packets limits of the input buffer, the last two of the output buffer. Buffer sizes are expressed in KiB, so [code]4 = 2^12 = 4096 bytes[/code]. All parameters will be rounded up to the nearest power of two. - NOTE: HTML5 exports only use the input buffer since the output one is managed by browsers. + [b]Note:[/b] HTML5 exports only use the input buffer since the output one is managed by browsers. </description> </method> </methods> @@ -42,7 +42,8 @@ <argument index="0" name="peer_source" type="int"> </argument> <description> - Emitted when a packet is received from a peer. Note: this signal is only emitted when the client or server is configured to use Godot multiplayer API. + Emitted when a packet is received from a peer. + [b]Note:[/b] This signal is only emitted when the client or server is configured to use Godot multiplayer API. </description> </signal> </signals> diff --git a/modules/websocket/doc_classes/WebSocketPeer.xml b/modules/websocket/doc_classes/WebSocketPeer.xml index 8a6868d311..dd95f7432e 100644 --- a/modules/websocket/doc_classes/WebSocketPeer.xml +++ b/modules/websocket/doc_classes/WebSocketPeer.xml @@ -18,30 +18,32 @@ <argument index="1" name="reason" type="String" default=""""> </argument> <description> - Close this WebSocket connection. [code]code[/code] is the status code for the closure (see RFC6455 section 7.4 for a list of valid status codes). [code]reason[/code] is the human readable reason for closing the connection (can be any UTF8 string, must be less than 123 bytes). - Note: To achieve a clean close, you will need to keep polling until either [signal WebSocketClient.connection_closed] or [signal WebSocketServer.client_disconnected] is received. - Note: HTML5 export might not support all status codes. Please refer to browsers-specific documentation for more details. + Closes this WebSocket connection. [code]code[/code] is the status code for the closure (see RFC 6455 section 7.4 for a list of valid status codes). [code]reason[/code] is the human readable reason for closing the connection (can be any UTF-8 string that's smaller than 123 bytes). + [b]Note:[/b] To achieve a clean close, you will need to keep polling until either [signal WebSocketClient.connection_closed] or [signal WebSocketServer.client_disconnected] is received. + [b]Note:[/b] The HTML5 export might not support all status codes. Please refer to browser-specific documentation for more details. </description> </method> <method name="get_connected_host" qualifiers="const"> <return type="String"> </return> <description> - Returns the IP Address of the connected peer. (Not available in HTML5 export) + Returns the IP address of the connected peer. + [b]Note:[/b] Not available in the HTML5 export. </description> </method> <method name="get_connected_port" qualifiers="const"> <return type="int"> </return> <description> - Returns the remote port of the connected peer. (Not available in HTML5 export) + Returns the remote port of the connected peer. + [b]Note:[/b] Not available in the HTML5 export. </description> </method> <method name="get_write_mode" qualifiers="const"> <return type="int" enum="WebSocketPeer.WriteMode"> </return> <description> - Get the current selected write mode. See [enum WriteMode]. + Gets the current selected write mode. See [enum WriteMode]. </description> </method> <method name="is_connected_to_host" qualifiers="const"> @@ -70,10 +72,10 @@ </methods> <constants> <constant name="WRITE_MODE_TEXT" value="0" enum="WriteMode"> - Specify that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). + Specifies that WebSockets messages should be transferred as text payload (only valid UTF-8 is allowed). </constant> <constant name="WRITE_MODE_BINARY" value="1" enum="WriteMode"> - Specify that WebSockets messages should be transferred as binary payload (any byte combination is allowed). + Specifies that WebSockets messages should be transferred as binary payload (any byte combination is allowed). </constant> </constants> </class> diff --git a/modules/websocket/doc_classes/WebSocketServer.xml b/modules/websocket/doc_classes/WebSocketServer.xml index 5c4647b1ce..1af5e403e6 100644 --- a/modules/websocket/doc_classes/WebSocketServer.xml +++ b/modules/websocket/doc_classes/WebSocketServer.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="WebSocketServer" inherits="WebSocketMultiplayerPeer" category="Core" version="3.2"> <brief_description> - A WebSocket server implementation + A WebSocket server implementation. </brief_description> <description> - This class implements a WebSocket server that can also support the high level multiplayer API. + This class implements a WebSocket server that can also support the high-level multiplayer API. After starting the server ([method listen]), you will need to [method NetworkedMultiplayerPeer.poll] it at regular intervals (e.g. inside [method Node._process]). When clients connect, disconnect, or send data, you will receive the appropriate signal. - Note: This class will not work in HTML5 exports due to browser restrictions. + [b]Note:[/b] This class will not work in HTML5 exports due to browser restrictions. </description> <tutorials> </tutorials> @@ -21,7 +21,7 @@ <argument index="2" name="reason" type="String" default=""""> </argument> <description> - Disconnects the peer identified by [code]id[/code] from the server. See [method WebSocketPeer.close] for more info. + Disconnects the peer identified by [code]id[/code] from the server. See [method WebSocketPeer.close] for more information. </description> </method> <method name="get_peer_address" qualifiers="const"> @@ -68,9 +68,9 @@ <argument index="2" name="gd_mp_api" type="bool" default="false"> </argument> <description> - Start listening on the given port. + Starts listening on the given port. You can specify the desired subprotocols via the "protocols" array. If the list empty (default), "binary" will be used. - If [code]true[/code] is passed as [code]gd_mp_api[/code], the server will behave like a network peer for the [MultiplayerAPI], connections from non Godot clients will not work, and [signal data_received] will not be emitted. + If [code]true[/code] is passed as [code]gd_mp_api[/code], the server will behave like a network peer for the [MultiplayerAPI], connections from non-Godot clients will not work, and [signal data_received] will not be emitted. If [code]false[/code] is passed instead (default), you must call [PacketPeer] functions ([code]put_packet[/code], [code]get_packet[/code], etc.), on the [WebSocketPeer] returned via [code]get_peer(id)[/code] to communicate with the peer with given [code]id[/code] (e.g. [code]get_peer(id).get_available_packet_count[/code]). </description> </method> @@ -78,7 +78,7 @@ <return type="void"> </return> <description> - Stop the server and clear its state. + Stops the server and clear its state. </description> </method> </methods> @@ -116,7 +116,8 @@ <argument index="0" name="id" type="int"> </argument> <description> - Emitted when a new message is received. Note: This signal is NOT emitted when used as high level multiplayer peer. + Emitted when a new message is received. + [b]Note:[/b] This signal is [i]not[/i] emitted when used as high-level multiplayer peer. </description> </signal> </signals> diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 0bd82b769f..b37cf642db 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -594,7 +594,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform { if (abi_index != -1) { exported = true; String abi = abis[abi_index]; - String dst_path = "lib/" + abi + "/" + p_so.path.get_file(); + String dst_path = String("lib").plus_file(abi).plus_file(p_so.path.get_file()); Vector<uint8_t> array = FileAccess::get_file_as_array(p_so.path); Error store_err = store_in_apk(ed, dst_path, array); ERR_FAIL_COND_V(store_err, store_err); diff --git a/platform/iphone/camera_ios.h b/platform/iphone/camera_ios.h index cf747283e1..ceabdba6a3 100644 --- a/platform/iphone/camera_ios.h +++ b/platform/iphone/camera_ios.h @@ -31,12 +31,10 @@ #ifndef CAMERAIOS_H #define CAMERAIOS_H -///@TODO this is a near duplicate of CameraOSX, we should find a way to combine those to minimise code duplication!!!! -// If you fix something here, make sure you fix it there as wel! - #include "servers/camera_server.h" class CameraIOS : public CameraServer { +private: public: CameraIOS(); ~CameraIOS(); diff --git a/platform/iphone/camera_ios.mm b/platform/iphone/camera_ios.mm index 4c11701fdd..5a54eaee9b 100644 --- a/platform/iphone/camera_ios.mm +++ b/platform/iphone/camera_ios.mm @@ -241,7 +241,6 @@ class CameraFeedIOS : public CameraFeed { private: - bool is_arkit; // if true this feed is updated through ARKit (should only have one and not yet implemented) AVCaptureDevice *device; MyCaptureSession *capture_session; @@ -258,10 +257,6 @@ public: void deactivate_feed(); }; -bool CameraFeedIOS::get_is_arkit() const { - return is_arkit; -}; - AVCaptureDevice *CameraFeedIOS::get_device() const { return device; }; @@ -274,24 +269,16 @@ CameraFeedIOS::CameraFeedIOS() { void CameraFeedIOS::set_device(AVCaptureDevice *p_device) { device = p_device; - if (device == NULL) { - ///@TODO finish this! - is_arkit = true; - name = "ARKit"; + [device retain]; + + // get some info + NSString *device_name = p_device.localizedName; + name = device_name.UTF8String; + position = CameraFeed::FEED_UNSPECIFIED; + if ([p_device position] == AVCaptureDevicePositionBack) { position = CameraFeed::FEED_BACK; - } else { - is_arkit = false; - [device retain]; - - // get some info - NSString *device_name = p_device.localizedName; - name = device_name.UTF8String; - position = CameraFeed::FEED_UNSPECIFIED; - if ([p_device position] == AVCaptureDevicePositionBack) { - position = CameraFeed::FEED_BACK; - } else if ([p_device position] == AVCaptureDevicePositionFront) { - position = CameraFeed::FEED_FRONT; - }; + } else if ([p_device position] == AVCaptureDevicePositionFront) { + position = CameraFeed::FEED_FRONT; }; }; @@ -308,15 +295,11 @@ CameraFeedIOS::~CameraFeedIOS() { }; bool CameraFeedIOS::activate_feed() { - if (is_arkit) { - ///@TODO to implement; + if (capture_session) { + // already recording! } else { - if (capture_session) { - // already recording! - } else { - // start camera capture - capture_session = [[MyCaptureSession alloc] initForFeed:this andDevice:device]; - }; + // start camera capture + capture_session = [[MyCaptureSession alloc] initForFeed:this andDevice:device]; }; return true; @@ -376,14 +359,14 @@ void CameraIOS::update_feeds() { // this way of doing things is deprecated but still works, // rewrite to using AVCaptureDeviceDiscoverySession - AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeBuiltInTelephotoCamera, AVCaptureDeviceTypeBuiltInDualCamera, AVCaptureDeviceTypeBuiltInTrueDepthCamera] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified]; + AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeBuiltInTelephotoCamera, AVCaptureDeviceTypeBuiltInDualCamera, AVCaptureDeviceTypeBuiltInTrueDepthCamera, AVCaptureDeviceTypeBuiltInWideAngleCamera] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified]; // remove devices that are gone.. for (int i = feeds.size() - 1; i >= 0; i--) { - Ref<CameraFeedIOS> feed = (Ref<CameraFeedIOS>)feeds[i]; + Ref<CameraFeedIOS> feed(feeds[i]); - if (feed->get_is_arkit()) { - // ignore, this is our arkit entry + if (feed.is_null()) { + // feed not managed by us } else if (![session.devices containsObject:feed->get_device()]) { // remove it from our array, this will also destroy it ;) remove_feed(feed); @@ -393,9 +376,13 @@ void CameraIOS::update_feeds() { // add new devices.. for (AVCaptureDevice *device in session.devices) { bool found = false; + for (int i = 0; i < feeds.size() && !found; i++) { - Ref<CameraFeedIOS> feed = (Ref<CameraFeedIOS>)feeds[i]; - if (feed->get_device() == device) { + Ref<CameraFeedIOS> feed(feeds[i]); + + if (feed.is_null()) { + // feed not managed by us + } else if (feed->get_device() == device) { found = true; }; }; @@ -410,9 +397,13 @@ void CameraIOS::update_feeds() { }; CameraIOS::CameraIOS() { + print_line("Requesting Camera permissions"); + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) { if (granted) { + print_line("Access to cameras granted!"); + // Find available cameras we have at this time update_feeds(); diff --git a/platform/iphone/detect.py b/platform/iphone/detect.py index daf4f405fd..b448cbe097 100644 --- a/platform/iphone/detect.py +++ b/platform/iphone/detect.py @@ -154,6 +154,7 @@ def configure(env): '-framework', 'Security', '-framework', 'SystemConfiguration', '-framework', 'UIKit', + '-framework', 'ARKit', ]) # Feature options diff --git a/platform/iphone/export/export.cpp b/platform/iphone/export/export.cpp index b2064472e4..99ce2e8f87 100644 --- a/platform/iphone/export/export.cpp +++ b/platform/iphone/export/export.cpp @@ -95,7 +95,7 @@ class EditorExportPlatformIOS : public EditorExportPlatform { Vector<ExportArchitecture> _get_supported_architectures(); Vector<String> _get_preset_architectures(const Ref<EditorExportPreset> &p_preset); - void _add_assets_to_project(Vector<uint8_t> &p_project_data, const Vector<IOSExportAsset> &p_additional_assets); + void _add_assets_to_project(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_project_data, const Vector<IOSExportAsset> &p_additional_assets); Error _export_additional_assets(const String &p_out_dir, const Vector<String> &p_assets, bool p_is_framework, Vector<IOSExportAsset> &r_exported_assets); Error _export_additional_assets(const String &p_out_dir, const Vector<SharedObject> &p_libraries, Vector<IOSExportAsset> &r_exported_assets); @@ -564,7 +564,7 @@ Error EditorExportPlatformIOS::_walk_dir_recursive(DirAccess *p_da, FileHandler dirs.push_back(path); } } else { - Error err = p_handler(current_dir + "/" + path, p_userdata); + Error err = p_handler(current_dir.plus_file(path), p_userdata); if (err) { p_da->list_dir_end(); return err; @@ -656,7 +656,7 @@ struct ExportLibsData { String dest_dir; }; -void EditorExportPlatformIOS::_add_assets_to_project(Vector<uint8_t> &p_project_data, const Vector<IOSExportAsset> &p_additional_assets) { +void EditorExportPlatformIOS::_add_assets_to_project(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &p_project_data, const Vector<IOSExportAsset> &p_additional_assets) { Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins(); Vector<String> frameworks; for (int i = 0; i < export_plugins.size(); ++i) { @@ -714,7 +714,28 @@ void EditorExportPlatformIOS::_add_assets_to_project(Vector<uint8_t> &p_project_ // Note, frameworks like gamekit are always included in our project.pbxprof file // even if turned off in capabilities. - // Frameworks that are used by modules (like arkit) we may need to optionally add here. + + // We do need our ARKit framework + if ((bool)p_preset->get("capabilities/arkit")) { + String build_id = (++current_id).str(); + String ref_id = (++current_id).str(); + + if (pbx_frameworks_build.length() > 0) { + pbx_frameworks_build += ",\n"; + pbx_frameworks_refs += ",\n"; + } + + pbx_frameworks_build += build_id; + pbx_frameworks_refs += ref_id; + + Dictionary format_dict; + format_dict["build_id"] = build_id; + format_dict["ref_id"] = ref_id; + format_dict["name"] = "ARKit.framework"; + format_dict["file_path"] = "System/Library/Frameworks/ARKit.framework"; + format_dict["file_type"] = "wrapper.framework"; + pbx_files += file_info_format.format(format_dict, "$_"); + } String str = String::utf8((const char *)p_project_data.ptr(), p_project_data.size()); str = str.replace("$additional_pbx_files", pbx_files); @@ -763,7 +784,7 @@ Error EditorExportPlatformIOS::_export_additional_assets(const String &p_out_dir } } - String destination = destination_dir + "/" + asset.get_file(); + String destination = destination_dir.plus_file(asset.get_file()); Error err = dir_exists ? da->copy_dir(asset, destination) : da->copy(asset, destination); memdelete(da); if (err) { @@ -1045,7 +1066,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p print_line("Exporting additional assets"); Vector<IOSExportAsset> assets; _export_additional_assets(dest_dir + binary_name, libraries, assets); - _add_assets_to_project(project_file_data, assets); + _add_assets_to_project(p_preset, project_file_data, assets); String project_file_name = dest_dir + binary_name + ".xcodeproj/project.pbxproj"; FileAccess *f = FileAccess::open(project_file_name, FileAccess::WRITE); if (!f) { diff --git a/platform/iphone/gl_view.mm b/platform/iphone/gl_view.mm index 1cb8d0e44e..4641b2c4ac 100644 --- a/platform/iphone/gl_view.mm +++ b/platform/iphone/gl_view.mm @@ -494,7 +494,7 @@ static void clear_touches() { #ifdef DEBUG_ENABLED GLenum err = glGetError(); if (err) - NSLog(@"%x error", err); + NSLog(@"DrawView: %x error", err); #endif } diff --git a/platform/javascript/detect.py b/platform/javascript/detect.py index 145ac42863..c6afa02c6d 100644 --- a/platform/javascript/detect.py +++ b/platform/javascript/detect.py @@ -69,9 +69,9 @@ def configure(env): exec(f.read(), em_config) except StandardError as e: raise RuntimeError("Emscripten configuration file '%s' is invalid:\n%s" % (em_config_file, e)) - if 'EMSCRIPTEN_ROOT' not in em_config: - raise RuntimeError("'EMSCRIPTEN_ROOT' missing in Emscripten configuration file '%s'" % em_config_file) - env.PrependENVPath('PATH', em_config['EMSCRIPTEN_ROOT']) + if 'BINARYEN_ROOT' not in em_config and 'EMSCRIPTEN_ROOT' not in em_config: + raise RuntimeError("'BINARYEN_ROOT' or 'EMSCRIPTEN_ROOT' missing in Emscripten configuration file '%s'" % em_config_file) + env.PrependENVPath('PATH', em_config.get('BINARYEN_ROOT', em_config.get('EMSCRIPTEN_ROOT'))) env['CC'] = 'emcc' env['CXX'] = 'em++' diff --git a/platform/osx/export/export.cpp b/platform/osx/export/export.cpp index 9dabbb12fc..8cabc45250 100644 --- a/platform/osx/export/export.cpp +++ b/platform/osx/export/export.cpp @@ -570,7 +570,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p if (export_format == "dmg") { // write it into our application bundle - file = tmp_app_path_name + "/" + file; + file = tmp_app_path_name.plus_file(file); // write the file, need to add chmod FileAccess *f = FileAccess::open(file, FileAccess::WRITE); diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index 5876a385c6..e535f6a148 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -843,8 +843,8 @@ LRESULT OS_Windows::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) if (wParam==VK_WIN) TODO wtf is this? meta_mem=uMsg==WM_KEYDOWN; */ - - } //fallthrough + FALLTHROUGH; + } case WM_CHAR: { ERR_BREAK(key_event_pos >= KEY_EVENT_BUFFER_SIZE); diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index bf6bc0b464..624efe8815 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -2997,7 +2997,7 @@ void OS_X11::alert(const String &p_alert, const String &p_title) { for (int i = 0; i < path_elems.size(); i++) { for (unsigned int k = 0; k < sizeof(message_programs) / sizeof(char *); k++) { - String tested_path = path_elems[i] + "/" + message_programs[k]; + String tested_path = path_elems[i].plus_file(message_programs[k]); if (FileAccess::exists(tested_path)) { program = tested_path; diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 78e98deb93..23f6404e3e 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1074,6 +1074,7 @@ Vector2 CanvasItem::make_canvas_position_local(const Vector2 &screen_point) cons Ref<InputEvent> CanvasItem::make_input_local(const Ref<InputEvent> &p_event) const { + ERR_FAIL_COND_V(p_event.is_null(), p_event); ERR_FAIL_COND_V(!is_inside_tree(), p_event); return p_event->xformed_by((get_canvas_transform() * get_global_transform()).affine_inverse()); diff --git a/scene/2d/collision_object_2d.cpp b/scene/2d/collision_object_2d.cpp index 375375285d..36c88e395a 100644 --- a/scene/2d/collision_object_2d.cpp +++ b/scene/2d/collision_object_2d.cpp @@ -218,12 +218,13 @@ void CollisionObject2D::shape_owner_set_transform(uint32_t p_owner, const Transf ERR_FAIL_COND(!shapes.has(p_owner)); ShapeData &sd = shapes[p_owner]; + sd.xform = p_transform; for (int i = 0; i < sd.shapes.size(); i++) { if (area) { - Physics2DServer::get_singleton()->area_set_shape_transform(rid, sd.shapes[i].index, p_transform); + Physics2DServer::get_singleton()->area_set_shape_transform(rid, sd.shapes[i].index, sd.xform); } else { - Physics2DServer::get_singleton()->body_set_shape_transform(rid, sd.shapes[i].index, p_transform); + Physics2DServer::get_singleton()->body_set_shape_transform(rid, sd.shapes[i].index, sd.xform); } } } @@ -387,7 +388,7 @@ String CollisionObject2D::get_configuration_warning() const { String warning = Node2D::get_configuration_warning(); if (shapes.empty()) { - if (warning == String()) { + if (!warning.empty()) { warning += "\n"; } warning += TTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape2D or CollisionPolygon2D as a child to define its shape."); diff --git a/scene/2d/cpu_particles_2d.cpp b/scene/2d/cpu_particles_2d.cpp index faa0a08d10..75315bfc6e 100644 --- a/scene/2d/cpu_particles_2d.cpp +++ b/scene/2d/cpu_particles_2d.cpp @@ -1410,7 +1410,7 @@ CPUParticles2D::CPUParticles2D() { set_emission_sphere_radius(1); set_emission_rect_extents(Vector2(1, 1)); - set_gravity(Vector2(0, 98.8)); + set_gravity(Vector2(0, 98)); for (int i = 0; i < PARAM_MAX; i++) { set_param_randomness(Parameter(i), 0); diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 4488dc501c..ad405fabbb 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -44,6 +44,7 @@ Line2D::Line2D() { _end_cap_mode = LINE_CAP_NONE; _width = 10; _default_color = Color(0.4, 0.5, 1); + _texture_mode = LINE_TEXTURE_NONE; _sharp_limit = 2.f; _round_precision = 8; } @@ -83,10 +84,10 @@ void Line2D::set_points(const PoolVector<Vector2> &p_points) { update(); } -void Line2D::set_width(float width) { - if (width < 0.0) - width = 0.0; - _width = width; +void Line2D::set_width(float p_width) { + if (p_width < 0.0) + p_width = 0.0; + _width = p_width; update(); } @@ -94,12 +95,32 @@ float Line2D::get_width() const { return _width; } +void Line2D::set_curve(const Ref<Curve> &p_curve) { + // Cleanup previous connection if any + if (_curve.is_valid()) { + _curve->disconnect(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + } + + _curve = p_curve; + + // Connect to the curve so the line will update when it is changed + if (_curve.is_valid()) { + _curve->connect(CoreStringNames::get_singleton()->changed, this, "_curve_changed"); + } + + update(); +} + +Ref<Curve> Line2D::get_curve() const { + return _curve; +} + PoolVector<Vector2> Line2D::get_points() const { return _points; } -void Line2D::set_point_position(int i, Vector2 pos) { - _points.set(i, pos); +void Line2D::set_point_position(int i, Vector2 p_pos) { + _points.set(i, p_pos); update(); } @@ -120,11 +141,11 @@ void Line2D::clear_points() { } } -void Line2D::add_point(Vector2 pos, int atpos) { - if (atpos < 0 || _points.size() < atpos) { - _points.append(pos); +void Line2D::add_point(Vector2 p_pos, int p_atpos) { + if (p_atpos < 0 || _points.size() < p_atpos) { + _points.append(p_pos); } else { - _points.insert(atpos, pos); + _points.insert(p_atpos, p_pos); } update(); } @@ -134,8 +155,8 @@ void Line2D::remove_point(int i) { update(); } -void Line2D::set_default_color(Color color) { - _default_color = color; +void Line2D::set_default_color(Color p_color) { + _default_color = p_color; update(); } @@ -143,18 +164,18 @@ Color Line2D::get_default_color() const { return _default_color; } -void Line2D::set_gradient(const Ref<Gradient> &gradient) { +void Line2D::set_gradient(const Ref<Gradient> &p_gradient) { // Cleanup previous connection if any if (_gradient.is_valid()) { - (**_gradient).disconnect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); + _gradient->disconnect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); } - _gradient = gradient; + _gradient = p_gradient; // Connect to the gradient so the line will update when the ColorRamp is changed if (_gradient.is_valid()) { - (**_gradient).connect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); + _gradient->connect(CoreStringNames::get_singleton()->changed, this, "_gradient_changed"); } update(); @@ -164,8 +185,8 @@ Ref<Gradient> Line2D::get_gradient() const { return _gradient; } -void Line2D::set_texture(const Ref<Texture> &texture) { - _texture = texture; +void Line2D::set_texture(const Ref<Texture> &p_texture) { + _texture = p_texture; update(); } @@ -173,8 +194,8 @@ Ref<Texture> Line2D::get_texture() const { return _texture; } -void Line2D::set_texture_mode(const LineTextureMode mode) { - _texture_mode = mode; +void Line2D::set_texture_mode(const LineTextureMode p_mode) { + _texture_mode = p_mode; update(); } @@ -182,8 +203,8 @@ Line2D::LineTextureMode Line2D::get_texture_mode() const { return _texture_mode; } -void Line2D::set_joint_mode(LineJointMode mode) { - _joint_mode = mode; +void Line2D::set_joint_mode(LineJointMode p_mode) { + _joint_mode = p_mode; update(); } @@ -191,8 +212,8 @@ Line2D::LineJointMode Line2D::get_joint_mode() const { return _joint_mode; } -void Line2D::set_begin_cap_mode(LineCapMode mode) { - _begin_cap_mode = mode; +void Line2D::set_begin_cap_mode(LineCapMode p_mode) { + _begin_cap_mode = p_mode; update(); } @@ -200,8 +221,8 @@ Line2D::LineCapMode Line2D::get_begin_cap_mode() const { return _begin_cap_mode; } -void Line2D::set_end_cap_mode(LineCapMode mode) { - _end_cap_mode = mode; +void Line2D::set_end_cap_mode(LineCapMode p_mode) { + _end_cap_mode = p_mode; update(); } @@ -217,10 +238,10 @@ void Line2D::_notification(int p_what) { } } -void Line2D::set_sharp_limit(float limit) { - if (limit < 0.f) - limit = 0.f; - _sharp_limit = limit; +void Line2D::set_sharp_limit(float p_limit) { + if (p_limit < 0.f) + p_limit = 0.f; + _sharp_limit = p_limit; update(); } @@ -228,10 +249,10 @@ float Line2D::get_sharp_limit() const { return _sharp_limit; } -void Line2D::set_round_precision(int precision) { - if (precision < 1) - precision = 1; - _round_precision = precision; +void Line2D::set_round_precision(int p_precision) { + if (p_precision < 1) + p_precision = 1; + _round_precision = p_precision; update(); } @@ -267,10 +288,11 @@ void Line2D::_draw() { lb.round_precision = _round_precision; lb.sharp_limit = _sharp_limit; lb.width = _width; + lb.curve = *_curve; RID texture_rid; if (_texture.is_valid()) { - texture_rid = (**_texture).get_rid(); + texture_rid = _texture->get_rid(); lb.tile_aspect = _texture->get_size().aspect(); } @@ -311,6 +333,10 @@ void Line2D::_gradient_changed() { update(); } +void Line2D::_curve_changed() { + update(); +} + // static void Line2D::_bind_methods() { @@ -330,6 +356,9 @@ void Line2D::_bind_methods() { ClassDB::bind_method(D_METHOD("set_width", "width"), &Line2D::set_width); ClassDB::bind_method(D_METHOD("get_width"), &Line2D::get_width); + ClassDB::bind_method(D_METHOD("set_curve", "curve"), &Line2D::set_curve); + ClassDB::bind_method(D_METHOD("get_curve"), &Line2D::get_curve); + ClassDB::bind_method(D_METHOD("set_default_color", "color"), &Line2D::set_default_color); ClassDB::bind_method(D_METHOD("get_default_color"), &Line2D::get_default_color); @@ -359,6 +388,7 @@ void Line2D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::POOL_VECTOR2_ARRAY, "points"), "set_points", "get_points"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "width"), "set_width", "get_width"); + ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "width_curve", PROPERTY_HINT_RESOURCE_TYPE, "Curve"), "set_curve", "get_curve"); ADD_PROPERTY(PropertyInfo(Variant::COLOR, "default_color"), "set_default_color", "get_default_color"); ADD_GROUP("Fill", ""); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "gradient", PROPERTY_HINT_RESOURCE_TYPE, "Gradient"), "set_gradient", "get_gradient"); @@ -385,4 +415,5 @@ void Line2D::_bind_methods() { BIND_ENUM_CONSTANT(LINE_TEXTURE_STRETCH); ClassDB::bind_method(D_METHOD("_gradient_changed"), &Line2D::_gradient_changed); + ClassDB::bind_method(D_METHOD("_curve_changed"), &Line2D::_curve_changed); } diff --git a/scene/2d/line_2d.h b/scene/2d/line_2d.h index 11be5055d4..14afa463ba 100644 --- a/scene/2d/line_2d.h +++ b/scene/2d/line_2d.h @@ -78,6 +78,9 @@ public: void set_width(float width); float get_width() const; + void set_curve(const Ref<Curve> &curve); + Ref<Curve> get_curve() const; + void set_default_color(Color color); Color get_default_color() const; @@ -113,6 +116,7 @@ protected: private: void _gradient_changed(); + void _curve_changed(); private: PoolVector<Vector2> _points; @@ -120,6 +124,7 @@ private: LineCapMode _begin_cap_mode; LineCapMode _end_cap_mode; float _width; + Ref<Curve> _curve; Color _default_color; Ref<Gradient> _gradient; Ref<Texture> _texture; diff --git a/scene/2d/line_builder.cpp b/scene/2d/line_builder.cpp index eb09d3c9d3..9fe5fb98b6 100644 --- a/scene/2d/line_builder.cpp +++ b/scene/2d/line_builder.cpp @@ -95,6 +95,7 @@ static inline Vector2 interpolate(const Rect2 &r, const Vector2 &v) { LineBuilder::LineBuilder() { joint_mode = Line2D::LINE_JOINT_SHARP; width = 10; + curve = NULL; default_color = Color(0.4, 0.5, 1); gradient = NULL; sharp_limit = 2.f; @@ -136,8 +137,8 @@ void LineBuilder::build() { Vector2 pos1 = points[1]; Vector2 f0 = (pos1 - pos0).normalized(); Vector2 u0 = rotate90(f0); - Vector2 pos_up0 = pos0 + u0 * hw; - Vector2 pos_down0 = pos0 - u0 * hw; + Vector2 pos_up0 = pos0; + Vector2 pos_down0 = pos0; Color color0; Color color1; @@ -145,12 +146,30 @@ void LineBuilder::build() { float current_distance0 = 0.f; float current_distance1 = 0.f; float total_distance = 0.f; + float width_factor = 1.f; _interpolate_color = gradient != NULL; + bool retrieve_curve = curve != NULL; bool distance_required = _interpolate_color || + retrieve_curve || texture_mode == Line2D::LINE_TEXTURE_TILE || texture_mode == Line2D::LINE_TEXTURE_STRETCH; - if (distance_required) + if (distance_required) { total_distance = calculate_total_distance(points); + //Ajust totalDistance. + // The line's outer length will be a little higher due to begin and end caps + if (begin_cap_mode == Line2D::LINE_CAP_BOX || begin_cap_mode == Line2D::LINE_CAP_ROUND) { + if (retrieve_curve) + total_distance += width * curve->interpolate_baked(0.f) * 0.5f; + else + total_distance += width * 0.5f; + } + if (end_cap_mode == Line2D::LINE_CAP_BOX || end_cap_mode == Line2D::LINE_CAP_ROUND) { + if (retrieve_curve) + total_distance += width * curve->interpolate_baked(1.f) * 0.5f; + else + total_distance += width * 0.5f; + } + } if (_interpolate_color) color0 = gradient->get_color(0); else @@ -159,22 +178,28 @@ void LineBuilder::build() { float uvx0 = 0.f; float uvx1 = 0.f; + if (retrieve_curve) + width_factor = curve->interpolate_baked(0.f); + + pos_up0 += u0 * hw * width_factor; + pos_down0 -= u0 * hw * width_factor; + // Begin cap if (begin_cap_mode == Line2D::LINE_CAP_BOX) { // Push back first vertices a little bit - pos_up0 -= f0 * hw; - pos_down0 -= f0 * hw; - // The line's outer length will be a little higher due to begin and end caps - total_distance += width; - current_distance0 += hw; + pos_up0 -= f0 * hw * width_factor; + pos_down0 -= f0 * hw * width_factor; + + current_distance0 += hw * width_factor; current_distance1 = current_distance0; } else if (begin_cap_mode == Line2D::LINE_CAP_ROUND) { if (texture_mode == Line2D::LINE_TEXTURE_TILE) { - uvx0 = 0.5f / tile_aspect; + uvx0 = width_factor * 0.5f / tile_aspect; + } else if (texture_mode == Line2D::LINE_TEXTURE_STRETCH) { + uvx0 = width * width_factor / total_distance; } - new_arc(pos0, pos_up0 - pos0, -Math_PI, color0, Rect2(0.f, 0.f, fmin(uvx0 * 2, 1.f), 1.f)); - total_distance += width; - current_distance0 += hw; + new_arc(pos0, pos_up0 - pos0, -Math_PI, color0, Rect2(0.f, 0.f, uvx0 * 2, 1.f)); + current_distance0 += hw * width_factor; current_distance1 = current_distance0; } @@ -206,13 +231,23 @@ void LineBuilder::build() { const float dp = u0.dot(f1); const Orientation orientation = (dp > 0.f ? UP : DOWN); + if (distance_required) { + current_distance1 += pos0.distance_to(pos1); + } + if (_interpolate_color) { + color1 = gradient->get_color_at_offset(current_distance1 / total_distance); + } + if (retrieve_curve) { + width_factor = curve->interpolate_baked(current_distance1 / total_distance); + } + Vector2 inner_normal0, inner_normal1; if (orientation == UP) { - inner_normal0 = u0 * hw; - inner_normal1 = u1 * hw; + inner_normal0 = u0 * hw * width_factor; + inner_normal1 = u1 * hw * width_factor; } else { - inner_normal0 = -u0 * hw; - inner_normal1 = -u1 * hw; + inner_normal0 = -u0 * hw * width_factor; + inner_normal1 = -u1 * hw * width_factor; } /* @@ -259,7 +294,8 @@ void LineBuilder::build() { Vector2 pos_up1, pos_down1; if (intersection_result == SEGMENT_INTERSECT) { // Fallback on bevel if sharp angle is too high (because it would produce very long miters) - if (current_joint_mode == Line2D::LINE_JOINT_SHARP && corner_pos_out.distance_squared_to(pos1) / hw_sq > sharp_limit_sq) { + float width_factor_sq = width_factor * width_factor; + if (current_joint_mode == Line2D::LINE_JOINT_SHARP && corner_pos_out.distance_squared_to(pos1) / (hw_sq * width_factor_sq) > sharp_limit_sq) { current_joint_mode = Line2D::LINE_JOINT_BEVEL; } if (current_joint_mode == Line2D::LINE_JOINT_SHARP) { @@ -271,9 +307,9 @@ void LineBuilder::build() { // Bevel or round if (orientation == UP) { pos_up1 = corner_pos_up; - pos_down1 = pos1 - u0 * hw; + pos_down1 = pos1 - u0 * hw * width_factor; } else { - pos_up1 = pos1 + u0 * hw; + pos_up1 = pos1 + u0 * hw * width_factor; pos_down1 = corner_pos_down; } } @@ -289,12 +325,6 @@ void LineBuilder::build() { // Add current line body quad // Triangles are clockwise - if (distance_required) { - current_distance1 += pos0.distance_to(pos1); - } - if (_interpolate_color) { - color1 = gradient->get_color_at_offset(current_distance1 / total_distance); - } if (texture_mode == Line2D::LINE_TEXTURE_TILE) { uvx1 = current_distance1 / (width * tile_aspect); } else if (texture_mode == Line2D::LINE_TEXTURE_STRETCH) { @@ -315,15 +345,15 @@ void LineBuilder::build() { } else { if (orientation == UP) { pos_up0 = corner_pos_up; - pos_down0 = pos1 - u1 * hw; + pos_down0 = pos1 - u1 * hw * width_factor; } else { - pos_up0 = pos1 + u1 * hw; + pos_up0 = pos1 + u1 * hw * width_factor; pos_down0 = corner_pos_down; } } } else { - pos_up0 = pos1 + u1 * hw; - pos_down0 = pos1 - u1 * hw; + pos_up0 = pos1 + u1 * hw * width_factor; + pos_down0 = pos1 - u1 * hw * width_factor; } // From this point, bu0 and bd0 concern the next segment @@ -362,26 +392,28 @@ void LineBuilder::build() { strip_begin(pos_up0, pos_down0, color1, uvx1); } } - // Last (or only) segment - pos1 = points[points.size() - 1]; - Vector2 pos_up1 = pos1 + u0 * hw; - Vector2 pos_down1 = pos1 - u0 * hw; - - // End cap (box) - if (end_cap_mode == Line2D::LINE_CAP_BOX) { - pos_up1 += f0 * hw; - pos_down1 += f0 * hw; - } - if (distance_required) { current_distance1 += pos0.distance_to(pos1); } if (_interpolate_color) { color1 = gradient->get_color(gradient->get_points_count() - 1); } + if (retrieve_curve) { + width_factor = curve->interpolate_baked(1.f); + } + + Vector2 pos_up1 = pos1 + u0 * hw * width_factor; + Vector2 pos_down1 = pos1 - u0 * hw * width_factor; + + // End cap (box) + if (end_cap_mode == Line2D::LINE_CAP_BOX) { + pos_up1 += f0 * hw * width_factor; + pos_down1 += f0 * hw * width_factor; + } + if (texture_mode == Line2D::LINE_TEXTURE_TILE) { uvx1 = current_distance1 / (width * tile_aspect); } else if (texture_mode == Line2D::LINE_TEXTURE_STRETCH) { @@ -394,7 +426,13 @@ void LineBuilder::build() { if (end_cap_mode == Line2D::LINE_CAP_ROUND) { // Note: color is not used in case we don't interpolate... Color color = _interpolate_color ? gradient->get_color(gradient->get_points_count() - 1) : Color(0, 0, 0); - new_arc(pos1, pos_up1 - pos1, Math_PI, color, Rect2(uvx1 - 0.5f / tile_aspect, 0.f, 1.0f / tile_aspect, 1.f)); + float dist = 0; + if (texture_mode == Line2D::LINE_TEXTURE_TILE) { + dist = width_factor / tile_aspect; + } else if (texture_mode == Line2D::LINE_TEXTURE_STRETCH) { + dist = width * width_factor / total_distance; + } + new_arc(pos1, pos_up1 - pos1, Math_PI, color, Rect2(uvx1 - 0.5f * dist, 0.f, dist, 1.f)); } } diff --git a/scene/2d/line_builder.h b/scene/2d/line_builder.h index b961385e33..91b4518f9b 100644 --- a/scene/2d/line_builder.h +++ b/scene/2d/line_builder.h @@ -45,6 +45,7 @@ public: Line2D::LineCapMode begin_cap_mode; Line2D::LineCapMode end_cap_mode; float width; + Curve *curve; Color default_color; Gradient *gradient; Line2D::LineTextureMode texture_mode; diff --git a/scene/2d/navigation_2d.cpp b/scene/2d/navigation_2d.cpp index 72b5f2fb12..f644db462b 100644 --- a/scene/2d/navigation_2d.cpp +++ b/scene/2d/navigation_2d.cpp @@ -92,7 +92,6 @@ void Navigation2D::_navpoly_link(int p_id) { if (!valid) { nm.polygons.pop_back(); ERR_CONTINUE(!valid); - continue; } p.center = center / plen; diff --git a/scene/2d/physics_body_2d.cpp b/scene/2d/physics_body_2d.cpp index 2bd9e5e2a2..95acf13fad 100644 --- a/scene/2d/physics_body_2d.cpp +++ b/scene/2d/physics_body_2d.cpp @@ -1541,7 +1541,7 @@ Vector2 KinematicCollision2D::get_remainder() const { return collision.remainder; } Object *KinematicCollision2D::get_local_shape() const { - ERR_FAIL_COND_V(!owner, NULL); + if (!owner) return NULL; uint32_t ownerid = owner->shape_find_owner(collision.local_shape); return owner->shape_owner_get_owner(ownerid); } diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index b3b6f3175d..fc53c9e4ac 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -30,9 +30,11 @@ #include "tile_map.h" +#include "collision_object_2d.h" #include "core/io/marshalls.h" #include "core/method_bind_ext.gen.inc" #include "core/os/os.h" +#include "scene/2d/area_2d.h" #include "servers/physics_2d_server.h" int TileMap::_get_quadrant_size() const { @@ -60,14 +62,21 @@ void TileMap::_notification(int p_what) { c = Object::cast_to<Node2D>(c->get_parent()); } + if (use_parent) { + _clear_quadrants(); + collision_parent = Object::cast_to<CollisionObject2D>(get_parent()); + } + pending_update = true; _recreate_quadrants(); update_dirty_quadrants(); RID space = get_world_2d()->get_space(); _update_quadrant_transform(); _update_quadrant_space(space); + update_configuration_warning(); } break; + case NOTIFICATION_EXIT_TREE: { _update_quadrant_space(RID()); @@ -82,30 +91,46 @@ void TileMap::_notification(int p_what) { q.navpoly_ids.clear(); } + if (collision_parent) { + collision_parent->remove_shape_owner(q.shape_owner_id); + q.shape_owner_id = -1; + } + for (Map<PosKey, Quadrant::Occluder>::Element *F = q.occluder_instances.front(); F; F = F->next()) { VS::get_singleton()->free(F->get().id); } q.occluder_instances.clear(); } + collision_parent = NULL; navigation = NULL; } break; + case NOTIFICATION_TRANSFORM_CHANGED: { //move stuff _update_quadrant_transform(); } break; + case NOTIFICATION_LOCAL_TRANSFORM_CHANGED: { + + if (use_parent) { + _recreate_quadrants(); + } + + } break; } } void TileMap::_update_quadrant_space(const RID &p_space) { - for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { + if (!use_parent) { + for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { - Quadrant &q = E->get(); - Physics2DServer::get_singleton()->body_set_space(q.body, p_space); + Quadrant &q = E->get(); + Physics2DServer::get_singleton()->body_set_space(q.body, p_space); + } } } @@ -116,6 +141,10 @@ void TileMap::_update_quadrant_transform() { Transform2D global_transform = get_global_transform(); + Transform2D local_transform; + if (collision_parent) + local_transform = get_transform(); + Transform2D nav_rel; if (navigation) nav_rel = get_relative_transform_to_parent(navigation); @@ -125,8 +154,11 @@ void TileMap::_update_quadrant_transform() { Quadrant &q = E->get(); Transform2D xform; xform.set_origin(q.pos); - xform = global_transform * xform; - Physics2DServer::get_singleton()->body_set_state(q.body, Physics2DServer::BODY_STATE_TRANSFORM, xform); + + if (!use_parent) { + xform = global_transform * xform; + Physics2DServer::get_singleton()->body_set_state(q.body, Physics2DServer::BODY_STATE_TRANSFORM, xform); + } if (navigation) { for (Map<PosKey, Quadrant::NavPoly>::Element *F = q.navpoly_ids.front(); F; F = F->next()) { @@ -225,6 +257,34 @@ void TileMap::_fix_cell_transform(Transform2D &xform, const Cell &p_cell, const xform.elements[2] += offset; } +void TileMap::_add_shape(int &shape_idx, const Quadrant &p_q, const Ref<Shape2D> &p_shape, const TileSet::ShapeData &p_shape_data, const Transform2D &p_xform, const Vector2 &p_metadata) { + Physics2DServer *ps = Physics2DServer::get_singleton(); + + if (!use_parent) { + ps->body_add_shape(p_q.body, p_shape->get_rid(), p_xform); + ps->body_set_shape_metadata(p_q.body, shape_idx, p_metadata); + ps->body_set_shape_as_one_way_collision(p_q.body, shape_idx, p_shape_data.one_way_collision, p_shape_data.one_way_collision_margin); + + } else if (collision_parent) { + Transform2D xform = p_xform; + xform.set_origin(xform.get_origin() + p_q.pos); + + collision_parent->shape_owner_add_shape(p_q.shape_owner_id, p_shape); + + int real_index = collision_parent->shape_owner_get_shape_index(p_q.shape_owner_id, shape_idx); + RID rid = collision_parent->get_rid(); + + if (Object::cast_to<Area2D>(collision_parent) != NULL) { + ps->area_set_shape_transform(rid, real_index, get_transform() * xform); + } else { + ps->body_set_shape_transform(rid, real_index, get_transform() * xform); + ps->body_set_shape_metadata(rid, real_index, p_metadata); + ps->body_set_shape_as_one_way_collision(rid, real_index, p_shape_data.one_way_collision, p_shape_data.one_way_collision_margin); + } + } + shape_idx++; +} + void TileMap::update_dirty_quadrants() { if (!pending_update) @@ -268,7 +328,11 @@ void TileMap::update_dirty_quadrants() { q.canvas_items.clear(); - ps->body_clear_shapes(q.body); + if (!use_parent) { + ps->body_clear_shapes(q.body); + } else if (collision_parent) { + collision_parent->shape_owner_clear_shapes(q.shape_owner_id); + } int shape_idx = 0; if (navigation) { @@ -427,10 +491,7 @@ void TileMap::update_dirty_quadrants() { for (int k = 0; k < _shapes.size(); k++) { Ref<ConvexPolygonShape2D> convex = _shapes[k]; if (convex.is_valid()) { - ps->body_add_shape(q.body, convex->get_rid(), xform); - ps->body_set_shape_metadata(q.body, shape_idx, Vector2(E->key().x, E->key().y)); - ps->body_set_shape_as_one_way_collision(q.body, shape_idx, shapes[j].one_way_collision, shapes[j].one_way_collision_margin); - shape_idx++; + _add_shape(shape_idx, q, convex, shapes[j], xform, Vector2(E->key().x, E->key().y)); #ifdef DEBUG_ENABLED } else { print_error("The TileSet assigned to the TileMap " + get_name() + " has an invalid convex shape."); @@ -438,10 +499,7 @@ void TileMap::update_dirty_quadrants() { } } } else { - ps->body_add_shape(q.body, shape->get_rid(), xform); - ps->body_set_shape_metadata(q.body, shape_idx, Vector2(E->key().x, E->key().y)); - ps->body_set_shape_as_one_way_collision(q.body, shape_idx, shapes[j].one_way_collision, shapes[j].one_way_collision_margin); - shape_idx++; + _add_shape(shape_idx, q, shape, shapes[j], xform, Vector2(E->key().x, E->key().y)); } } } @@ -616,22 +674,29 @@ Map<TileMap::PosKey, TileMap::Quadrant>::Element *TileMap::_create_quadrant(cons xform.set_origin(q.pos); //q.canvas_item = VisualServer::get_singleton()->canvas_item_create(); - q.body = Physics2DServer::get_singleton()->body_create(); - Physics2DServer::get_singleton()->body_set_mode(q.body, use_kinematic ? Physics2DServer::BODY_MODE_KINEMATIC : Physics2DServer::BODY_MODE_STATIC); - - Physics2DServer::get_singleton()->body_attach_object_instance_id(q.body, get_instance_id()); - Physics2DServer::get_singleton()->body_set_collision_layer(q.body, collision_layer); - Physics2DServer::get_singleton()->body_set_collision_mask(q.body, collision_mask); - Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_FRICTION, friction); - Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_BOUNCE, bounce); - - if (is_inside_tree()) { - xform = get_global_transform() * xform; - RID space = get_world_2d()->get_space(); - Physics2DServer::get_singleton()->body_set_space(q.body, space); - } + if (!use_parent) { + q.body = Physics2DServer::get_singleton()->body_create(); + Physics2DServer::get_singleton()->body_set_mode(q.body, use_kinematic ? Physics2DServer::BODY_MODE_KINEMATIC : Physics2DServer::BODY_MODE_STATIC); + + Physics2DServer::get_singleton()->body_attach_object_instance_id(q.body, get_instance_id()); + Physics2DServer::get_singleton()->body_set_collision_layer(q.body, collision_layer); + Physics2DServer::get_singleton()->body_set_collision_mask(q.body, collision_mask); + Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_FRICTION, friction); + Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_BOUNCE, bounce); - Physics2DServer::get_singleton()->body_set_state(q.body, Physics2DServer::BODY_STATE_TRANSFORM, xform); + if (is_inside_tree()) { + xform = get_global_transform() * xform; + RID space = get_world_2d()->get_space(); + Physics2DServer::get_singleton()->body_set_space(q.body, space); + } + + Physics2DServer::get_singleton()->body_set_state(q.body, Physics2DServer::BODY_STATE_TRANSFORM, xform); + } else if (collision_parent) { + xform = get_transform() * xform; + q.shape_owner_id = collision_parent->create_shape_owner(this); + } else { + q.shape_owner_id = -1; + } rect_cache_dirty = true; quadrant_order_dirty = true; @@ -641,7 +706,12 @@ Map<TileMap::PosKey, TileMap::Quadrant>::Element *TileMap::_create_quadrant(cons void TileMap::_erase_quadrant(Map<PosKey, Quadrant>::Element *Q) { Quadrant &q = Q->get(); - Physics2DServer::get_singleton()->free(q.body); + if (!use_parent) { + Physics2DServer::get_singleton()->free(q.body); + } else if (collision_parent) { + collision_parent->remove_shape_owner(q.shape_owner_id); + } + for (List<RID>::Element *E = q.canvas_items.front(); E; E = E->next()) { VisualServer::get_singleton()->free(E->get()); @@ -1135,20 +1205,24 @@ Rect2 TileMap::_edit_get_rect() const { void TileMap::set_collision_layer(uint32_t p_layer) { collision_layer = p_layer; - for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { + if (!use_parent) { + for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { - Quadrant &q = E->get(); - Physics2DServer::get_singleton()->body_set_collision_layer(q.body, collision_layer); + Quadrant &q = E->get(); + Physics2DServer::get_singleton()->body_set_collision_layer(q.body, collision_layer); + } } } void TileMap::set_collision_mask(uint32_t p_mask) { collision_mask = p_mask; - for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { + if (!use_parent) { + for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { - Quadrant &q = E->get(); - Physics2DServer::get_singleton()->body_set_collision_mask(q.body, collision_mask); + Quadrant &q = E->get(); + Physics2DServer::get_singleton()->body_set_collision_mask(q.body, collision_mask); + } } } @@ -1184,13 +1258,40 @@ void TileMap::set_collision_use_kinematic(bool p_use_kinematic) { _recreate_quadrants(); } +bool TileMap::get_collision_use_parent() const { + + return use_parent; +} + +void TileMap::set_collision_use_parent(bool p_use_parent) { + + if (use_parent == p_use_parent) return; + + _clear_quadrants(); + + use_parent = p_use_parent; + set_notify_local_transform(use_parent); + + if (use_parent && is_inside_tree()) { + collision_parent = Object::cast_to<CollisionObject2D>(get_parent()); + } else { + collision_parent = NULL; + } + + _recreate_quadrants(); + _change_notify(); + update_configuration_warning(); +} + void TileMap::set_collision_friction(float p_friction) { friction = p_friction; - for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { + if (!use_parent) { + for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { - Quadrant &q = E->get(); - Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_FRICTION, p_friction); + Quadrant &q = E->get(); + Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_FRICTION, p_friction); + } } } @@ -1202,10 +1303,12 @@ float TileMap::get_collision_friction() const { void TileMap::set_collision_bounce(float p_bounce) { bounce = p_bounce; - for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { + if (!use_parent) { + for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) { - Quadrant &q = E->get(); - Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_BOUNCE, p_bounce); + Quadrant &q = E->get(); + Physics2DServer::get_singleton()->body_set_param(q.body, Physics2DServer::BODY_PARAM_BOUNCE, p_bounce); + } } } float TileMap::get_collision_bounce() const { @@ -1404,6 +1507,12 @@ void TileMap::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(p); } +void TileMap::_validate_property(PropertyInfo &property) const { + if (use_parent && property.name != "collision_use_parent" && property.name.begins_with("collision_")) { + property.usage = PROPERTY_USAGE_NOEDITOR; + } +} + Vector2 TileMap::map_to_world(const Vector2 &p_pos, bool p_ignore_ofs) const { return _map_to_world(p_pos.x, p_pos.y, p_ignore_ofs); @@ -1552,6 +1661,20 @@ bool TileMap::get_clip_uv() const { return clip_uv; } +String TileMap::get_configuration_warning() const { + + String warning = Node2D::get_configuration_warning(); + + if (use_parent && !collision_parent) { + if (!warning.empty()) { + warning += "\n"; + } + return TTR("TileMap with Use Parent on needs a parent CollisionObject2D to give shapes to. Please use it as a child of Area2D, StaticBody2D, RigidBody2D, KinematicBody2D, etc. to give them a shape."); + } + + return warning; +} + void TileMap::_bind_methods() { ClassDB::bind_method(D_METHOD("set_tileset", "tileset"), &TileMap::set_tileset); @@ -1587,6 +1710,9 @@ void TileMap::_bind_methods() { ClassDB::bind_method(D_METHOD("set_collision_use_kinematic", "use_kinematic"), &TileMap::set_collision_use_kinematic); ClassDB::bind_method(D_METHOD("get_collision_use_kinematic"), &TileMap::get_collision_use_kinematic); + ClassDB::bind_method(D_METHOD("set_collision_use_parent", "use_parent"), &TileMap::set_collision_use_parent); + ClassDB::bind_method(D_METHOD("get_collision_use_parent"), &TileMap::get_collision_use_parent); + ClassDB::bind_method(D_METHOD("set_collision_layer", "layer"), &TileMap::set_collision_layer); ClassDB::bind_method(D_METHOD("get_collision_layer"), &TileMap::get_collision_layer); @@ -1652,6 +1778,7 @@ void TileMap::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_clip_uv"), "set_clip_uv", "get_clip_uv"); ADD_GROUP("Collision", "collision_"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_parent", PROPERTY_HINT_NONE, ""), "set_collision_use_parent", "get_collision_use_parent"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collision_use_kinematic", PROPERTY_HINT_NONE, ""), "set_collision_use_kinematic", "get_collision_use_kinematic"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_friction", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_friction", "get_collision_friction"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "collision_bounce", PROPERTY_HINT_RANGE, "0,1,0.01"), "set_collision_bounce", "get_collision_bounce"); @@ -1700,6 +1827,8 @@ TileMap::TileMap() { bounce = 0; mode = MODE_SQUARE; half_offset = HALF_OFFSET_DISABLED; + use_parent = false; + collision_parent = NULL; use_kinematic = false; navigation = NULL; y_sort_mode = false; @@ -1710,6 +1839,7 @@ TileMap::TileMap() { fp_adjust = 0.00001; tile_origin = TILE_ORIGIN_TOP_LEFT; set_notify_transform(true); + set_notify_local_transform(false); } TileMap::~TileMap() { diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h index 6a1467aa48..1caaefa213 100644 --- a/scene/2d/tile_map.h +++ b/scene/2d/tile_map.h @@ -37,6 +37,8 @@ #include "scene/2d/node_2d.h" #include "scene/resources/tile_set.h" +class CollisionObject2D; + class TileMap : public Node2D { GDCLASS(TileMap, Node2D); @@ -74,6 +76,8 @@ private: Mode mode; Transform2D custom_transform; HalfOffset half_offset; + bool use_parent; + CollisionObject2D *collision_parent; bool use_kinematic; Navigation2D *navigation; @@ -123,6 +127,7 @@ private: Vector2 pos; List<RID> canvas_items; RID body; + uint32_t shape_owner_id; SelfList<Quadrant> dirty_list; @@ -145,6 +150,7 @@ private: pos = q.pos; canvas_items = q.canvas_items; body = q.body; + shape_owner_id = q.shape_owner_id; cells = q.cells; navpoly_ids = q.navpoly_ids; occluder_instances = q.occluder_instances; @@ -154,6 +160,7 @@ private: pos = q.pos; canvas_items = q.canvas_items; body = q.body; + shape_owner_id = q.shape_owner_id; cells = q.cells; occluder_instances = q.occluder_instances; navpoly_ids = q.navpoly_ids; @@ -188,6 +195,8 @@ private: void _fix_cell_transform(Transform2D &xform, const Cell &p_cell, const Vector2 &p_offset, const Size2 &p_sc); + void _add_shape(int &shape_idx, const Quadrant &p_q, const Ref<Shape2D> &p_shape, const TileSet::ShapeData &p_shape_data, const Transform2D &p_xform, const Vector2 &p_metadata); + Map<PosKey, Quadrant>::Element *_create_quadrant(const PosKey &p_qk); void _erase_quadrant(Map<PosKey, Quadrant>::Element *Q); void _make_quadrant_dirty(Map<PosKey, Quadrant>::Element *Q, bool update = true); @@ -218,6 +227,7 @@ protected: void _notification(int p_what); static void _bind_methods(); + virtual void _validate_property(PropertyInfo &property) const; virtual void _changed_callback(Object *p_changed, const char *p_prop); public: @@ -271,6 +281,9 @@ public: void set_collision_use_kinematic(bool p_use_kinematic); bool get_collision_use_kinematic() const; + void set_collision_use_parent(bool p_use_parent); + bool get_collision_use_parent() const; + void set_collision_friction(float p_friction); float get_collision_friction() const; @@ -314,6 +327,8 @@ public: void set_clip_uv(bool p_enable); bool get_clip_uv() const; + String get_configuration_warning() const; + void fix_invalid_tiles(); void clear(); diff --git a/scene/3d/arvr_nodes.cpp b/scene/3d/arvr_nodes.cpp index 95eec41fb2..dfa8fce9be 100644 --- a/scene/3d/arvr_nodes.cpp +++ b/scene/3d/arvr_nodes.cpp @@ -264,6 +264,7 @@ void ARVRController::_bind_methods() { ClassDB::bind_method(D_METHOD("get_rumble"), &ARVRController::get_rumble); ClassDB::bind_method(D_METHOD("set_rumble", "rumble"), &ARVRController::set_rumble); ADD_PROPERTY(PropertyInfo(Variant::REAL, "rumble", PROPERTY_HINT_RANGE, "0.0,1.0,0.01"), "set_rumble", "get_rumble"); + ADD_PROPERTY_DEFAULT("rumble", 0.0); ClassDB::bind_method(D_METHOD("get_mesh"), &ARVRController::get_mesh); diff --git a/scene/3d/audio_stream_player_3d.h b/scene/3d/audio_stream_player_3d.h index 7a652ed65f..93954e758a 100644 --- a/scene/3d/audio_stream_player_3d.h +++ b/scene/3d/audio_stream_player_3d.h @@ -71,7 +71,7 @@ private: struct Output { AudioFilterSW filter; - AudioFilterSW::Processor filter_process[6]; + AudioFilterSW::Processor filter_process[8]; AudioFrame vol[4]; float filter_gain; float pitch_scale; diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 612d91c6e1..12d562c0c6 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -90,7 +90,6 @@ void Navigation::_navmesh_link(int p_id) { if (!valid) { nm.polygons.pop_back(); ERR_CONTINUE(!valid); - continue; } p.center = center; diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 3624e04434..d3aad7000d 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -1470,7 +1470,7 @@ Vector3 KinematicCollision::get_remainder() const { return collision.remainder; } Object *KinematicCollision::get_local_shape() const { - ERR_FAIL_COND_V(!owner, NULL); + if (!owner) return NULL; uint32_t ownerid = owner->shape_find_owner(collision.local_shape); return owner->shape_owner_get_owner(ownerid); } diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index efd418e3c7..1a41a31253 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -506,6 +506,8 @@ bool Spatial::is_set_as_toplevel() const { Ref<World> Spatial::get_world() const { ERR_FAIL_COND_V(!is_inside_world(), Ref<World>()); + ERR_FAIL_COND_V(!data.viewport, Ref<World>()); + return data.viewport->find_world(); } diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index 4bb4d18071..5141c84803 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -60,7 +60,7 @@ void VisualInstance::_notification(int p_what) { if (skeleton) VisualServer::get_singleton()->instance_attach_skeleton( instance, skeleton->get_skeleton() ); */ - + ERR_FAIL_COND(get_world().is_null()); VisualServer::get_singleton()->instance_set_scenario(instance, get_world()->get_scenario()); _update_visibility(); diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index 58a0762469..b197971b61 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -173,7 +173,7 @@ void ColorPicker::_value_changed(double) { color.set_hsv(scroll[0]->get_value() / 360.0, scroll[1]->get_value() / 100.0, scroll[2]->get_value() / 100.0, - scroll[3]->get_value() / 100.0); + scroll[3]->get_value() / 255.0); } else { for (int i = 0; i < 4; i++) { color.components[i] = scroll[i]->get_value() / (raw_mode_enabled ? 1.0 : 255.0); @@ -209,17 +209,17 @@ void ColorPicker::_update_color(bool p_update_sliders) { if (hsv_mode_enabled) { for (int i = 0; i < 4; i++) { - scroll[i]->set_step(0.1); + scroll[i]->set_step(1.0); } - scroll[0]->set_max(360); + scroll[0]->set_max(359); scroll[0]->set_value(h * 360.0); scroll[1]->set_max(100); scroll[1]->set_value(s * 100.0); scroll[2]->set_max(100); scroll[2]->set_value(v * 100.0); - scroll[3]->set_max(100); - scroll[3]->set_value(color.components[3] * 100.0); + scroll[3]->set_max(255); + scroll[3]->set_value(color.components[3] * 255.0); } else { for (int i = 0; i < 4; i++) { if (raw_mode_enabled) { diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 6e0e26312f..eccd42cb9f 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2249,6 +2249,7 @@ Ref<Theme> Control::get_theme() const { void Control::set_tooltip(const String &p_tooltip) { data.tooltip = p_tooltip; + update_configuration_warning(); } String Control::get_tooltip(const Point2 &p_pos) const { @@ -2540,6 +2541,7 @@ void Control::set_mouse_filter(MouseFilter p_filter) { ERR_FAIL_INDEX(p_filter, 3); data.mouse_filter = p_filter; + update_configuration_warning(); } Control::MouseFilter Control::get_mouse_filter() const { @@ -2703,6 +2705,20 @@ void Control::get_argument_options(const StringName &p_function, int p_idx, List } } } + +String Control::get_configuration_warning() const { + String warning = CanvasItem::get_configuration_warning(); + + if (data.mouse_filter == MOUSE_FILTER_IGNORE && data.tooltip != "") { + if (warning != String()) { + warning += "\n"; + } + warning += TTR("The Hint Tooltip won't be displayed as the control's Mouse Filter is set to \"Ignore\". To solve this, set the Mouse Filter to \"Stop\" or \"Pass\"."); + } + + return warning; +} + void Control::set_clip_contents(bool p_clip) { data.clip_contents = p_clip; diff --git a/scene/gui/control.h b/scene/gui/control.h index 2489a5eda4..1a59a6d2e4 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -487,6 +487,7 @@ public: bool is_visibility_clip_disabled() const; virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const; + virtual String get_configuration_warning() const; Control(); ~Control(); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index ba4d390fc5..04fb991f78 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -381,6 +381,18 @@ void FileDialog::_tree_item_activated() { } } +void FileDialog::update_file_name() { + int idx = filter->get_selected() - 1; + if ((idx == -1 && filter->get_item_count() == 2) || (filter->get_item_count() > 2 && idx >= 0 && idx < filter->get_item_count() - 2)) { + if (idx == -1) idx += 1; + String filter_str = filters[idx]; + String file_str = file->get_text(); + String base_name = file_str.get_basename(); + file_str = base_name + "." + filter_str.strip_edges().to_lower(); + file->set_text(file_str); + } +} + void FileDialog::update_file_list() { tree->clear(); @@ -506,6 +518,7 @@ void FileDialog::update_file_list() { void FileDialog::_filter_selected(int) { + update_file_name(); update_file_list(); } @@ -797,6 +810,7 @@ void FileDialog::_bind_methods() { ClassDB::bind_method(D_METHOD("_select_drive"), &FileDialog::_select_drive); ClassDB::bind_method(D_METHOD("_make_dir"), &FileDialog::_make_dir); ClassDB::bind_method(D_METHOD("_make_dir_confirm"), &FileDialog::_make_dir_confirm); + ClassDB::bind_method(D_METHOD("_update_file_name"), &FileDialog::update_file_name); ClassDB::bind_method(D_METHOD("_update_file_list"), &FileDialog::update_file_list); ClassDB::bind_method(D_METHOD("_update_dir"), &FileDialog::update_dir); ClassDB::bind_method(D_METHOD("_go_up"), &FileDialog::_go_up); diff --git a/scene/gui/file_dialog.h b/scene/gui/file_dialog.h index 9f7ea1a2f2..191af5fef3 100644 --- a/scene/gui/file_dialog.h +++ b/scene/gui/file_dialog.h @@ -102,6 +102,7 @@ private: bool invalidated; void update_dir(); + void update_file_name(); void update_file_list(); void update_filters(); diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index e18387a52e..510f1b18ad 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -247,11 +247,11 @@ void Label::_notification(int p_what) { n = String::char_uppercase(n); } - float move = font->draw_char(ci, Point2(x_ofs_shadow, y_ofs) + shadow_ofs, c, n, font_color_shadow, false); + float move = drawer.draw_char(ci, Point2(x_ofs_shadow, y_ofs) + shadow_ofs, c, n, font_color_shadow); if (use_outline) { - font->draw_char(ci, Point2(x_ofs_shadow, y_ofs) + Vector2(-shadow_ofs.x, shadow_ofs.y), c, n, font_color_shadow, false); - font->draw_char(ci, Point2(x_ofs_shadow, y_ofs) + Vector2(shadow_ofs.x, -shadow_ofs.y), c, n, font_color_shadow, false); - font->draw_char(ci, Point2(x_ofs_shadow, y_ofs) + Vector2(-shadow_ofs.x, -shadow_ofs.y), c, n, font_color_shadow, false); + drawer.draw_char(ci, Point2(x_ofs_shadow, y_ofs) + Vector2(-shadow_ofs.x, shadow_ofs.y), c, n, font_color_shadow); + drawer.draw_char(ci, Point2(x_ofs_shadow, y_ofs) + Vector2(shadow_ofs.x, -shadow_ofs.y), c, n, font_color_shadow); + drawer.draw_char(ci, Point2(x_ofs_shadow, y_ofs) + Vector2(-shadow_ofs.x, -shadow_ofs.y), c, n, font_color_shadow); } x_ofs_shadow += move; chars_total_shadow++; diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp index 872402e9e1..58671655dc 100644 --- a/scene/gui/option_button.cpp +++ b/scene/gui/option_button.cpp @@ -282,7 +282,7 @@ void OptionButton::_set_items(const Array &p_items) { void OptionButton::get_translatable_strings(List<String> *p_strings) const { - return popup->get_translatable_strings(p_strings); + popup->get_translatable_strings(p_strings); } void OptionButton::_bind_methods() { diff --git a/scene/gui/reference_rect.cpp b/scene/gui/reference_rect.cpp index 553e133946..052c8ccd05 100644 --- a/scene/gui/reference_rect.cpp +++ b/scene/gui/reference_rect.cpp @@ -38,26 +38,41 @@ void ReferenceRect::_notification(int p_what) { if (!is_inside_tree()) return; - if (Engine::get_singleton()->is_editor_hint()) + if (Engine::get_singleton()->is_editor_hint() || !editor_only) draw_rect(Rect2(Point2(), get_size()), border_color, false); } } -void ReferenceRect::set_border_color(const Color &color) { - border_color = color; +void ReferenceRect::set_border_color(const Color &p_color) { + border_color = p_color; + update(); } Color ReferenceRect::get_border_color() const { return border_color; } +void ReferenceRect::set_editor_only(const bool &p_enabled) { + editor_only = p_enabled; + update(); +} + +bool ReferenceRect::get_editor_only() const { + return editor_only; +} + void ReferenceRect::_bind_methods() { ClassDB::bind_method(D_METHOD("get_border_color"), &ReferenceRect::get_border_color); ClassDB::bind_method(D_METHOD("set_border_color", "color"), &ReferenceRect::set_border_color); + ClassDB::bind_method(D_METHOD("get_editor_only"), &ReferenceRect::get_editor_only); + ClassDB::bind_method(D_METHOD("set_editor_only", "enabled"), &ReferenceRect::set_editor_only); + ADD_PROPERTY(PropertyInfo(Variant::COLOR, "border_color"), "set_border_color", "get_border_color"); + ADD_PROPERTY(PropertyInfo(Variant::BOOL, "editor_only"), "set_editor_only", "get_editor_only"); } ReferenceRect::ReferenceRect() { border_color = Color(1, 0, 0); + editor_only = true; } diff --git a/scene/gui/reference_rect.h b/scene/gui/reference_rect.h index de3ccaeeca..7a88333cf2 100644 --- a/scene/gui/reference_rect.h +++ b/scene/gui/reference_rect.h @@ -37,6 +37,7 @@ class ReferenceRect : public Control { GDCLASS(ReferenceRect, Control); Color border_color; + bool editor_only; protected: void _notification(int p_what); @@ -45,8 +46,11 @@ protected: public: ReferenceRect(); - void set_border_color(const Color &color); + void set_border_color(const Color &p_color); Color get_border_color() const; + + void set_editor_only(const bool &p_enabled); + bool get_editor_only() const; }; #endif // REFERENCE_RECT_H diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index fdd21f525b..a6e3d644f6 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -681,6 +681,13 @@ void TextEdit::_notification(int p_what) { } } + if (line_length_guideline) { + int x = xmargin_beg + cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs; + if (x > xmargin_beg && x < xmargin_end) { + VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(x, 0), Point2(x, size.height), cache.line_length_guideline_color); + } + } + int brace_open_match_line = -1; int brace_open_match_column = -1; bool brace_open_matching = false; @@ -1339,13 +1346,6 @@ void TextEdit::_notification(int p_what) { } } - if (line_length_guideline) { - int x = xmargin_beg + cache.font->get_char_size('0').width * line_length_guideline_col - cursor.x_ofs; - if (x > xmargin_beg && x < xmargin_end) { - VisualServer::get_singleton()->canvas_item_add_line(ci, Point2(x, 0), Point2(x, size.height), cache.line_length_guideline_color); - } - } - bool completion_below = false; if (completion_active) { // code completion box @@ -4817,14 +4817,18 @@ void TextEdit::deselect() { void TextEdit::select(int p_from_line, int p_from_column, int p_to_line, int p_to_column) { - if (p_from_line >= text.size()) + if (p_from_line < 0) + p_from_line = 0; + else if (p_from_line >= text.size()) p_from_line = text.size() - 1; if (p_from_column >= text[p_from_line].length()) p_from_column = text[p_from_line].length(); if (p_from_column < 0) p_from_column = 0; - if (p_to_line >= text.size()) + if (p_to_line < 0) + p_to_line = 0; + else if (p_to_line >= text.size()) p_to_line = text.size() - 1; if (p_to_column >= text[p_to_line].length()) p_to_column = text[p_to_line].length(); diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp index e65314644e..88b942ee45 100644 --- a/scene/main/http_request.cpp +++ b/scene/main/http_request.cpp @@ -425,7 +425,7 @@ void HTTPRequest::_notification(int p_what) { void HTTPRequest::set_use_threads(bool p_use) { - ERR_FAIL_COND(status != HTTPClient::STATUS_DISCONNECTED); + ERR_FAIL_COND(get_http_client_status() != HTTPClient::STATUS_DISCONNECTED); use_threads = p_use; } @@ -436,7 +436,7 @@ bool HTTPRequest::is_using_threads() const { void HTTPRequest::set_body_size_limit(int p_bytes) { - ERR_FAIL_COND(status != HTTPClient::STATUS_DISCONNECTED); + ERR_FAIL_COND(get_http_client_status() != HTTPClient::STATUS_DISCONNECTED); body_size_limit = p_bytes; } @@ -448,7 +448,7 @@ int HTTPRequest::get_body_size_limit() const { void HTTPRequest::set_download_file(const String &p_file) { - ERR_FAIL_COND(status != HTTPClient::STATUS_DISCONNECTED); + ERR_FAIL_COND(get_http_client_status() != HTTPClient::STATUS_DISCONNECTED); download_to_file = p_file; } @@ -546,7 +546,6 @@ HTTPRequest::HTTPRequest() { downloaded = 0; body_size_limit = -1; file = NULL; - status = HTTPClient::STATUS_DISCONNECTED; } HTTPRequest::~HTTPRequest() { diff --git a/scene/main/http_request.h b/scene/main/http_request.h index baabda4010..2e58d579ba 100644 --- a/scene/main/http_request.h +++ b/scene/main/http_request.h @@ -88,8 +88,6 @@ private: int redirections; - HTTPClient::Status status; - bool _update_connection(); int max_redirects; diff --git a/scene/main/node.cpp b/scene/main/node.cpp index a580a7f8ac..5888760973 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -71,6 +71,8 @@ void Node::_notification(int p_notification) { } break; case NOTIFICATION_ENTER_TREE: { + ERR_FAIL_COND(!get_viewport()); + ERR_FAIL_COND(!get_tree()); if (data.pause_mode == PAUSE_MODE_INHERIT) { @@ -94,6 +96,8 @@ void Node::_notification(int p_notification) { } break; case NOTIFICATION_EXIT_TREE: { + ERR_FAIL_COND(!get_viewport()); + ERR_FAIL_COND(!get_tree()); get_tree()->node_count--; orphan_node_count++; @@ -840,6 +844,8 @@ bool Node::is_processing_internal() const { void Node::set_process_priority(int p_priority) { data.process_priority = p_priority; + ERR_FAIL_COND(!data.tree); + if (is_processing()) data.tree->make_group_changed("idle_process"); diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp index 7f0cebd492..0e7cec57a4 100644 --- a/scene/main/scene_tree.cpp +++ b/scene/main/scene_tree.cpp @@ -614,6 +614,7 @@ void SceneTree::finish() { root->_set_tree(NULL); root->_propagate_after_exit_tree(); memdelete(root); //delete root + root = NULL; } } @@ -1889,6 +1890,7 @@ void SceneTree::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::BOOL, "debug_navigation_hint"), "set_debug_navigation_hint", "is_debugging_navigation_hint"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "paused"), "set_pause", "is_paused"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "refuse_new_network_connections"), "set_refuse_new_network_connections", "is_refusing_new_network_connections"); + ADD_PROPERTY_DEFAULT("refuse_new_network_connections", false); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_font_oversampling"), "set_use_font_oversampling", "is_using_font_oversampling"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "edited_scene_root", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_edited_scene_root", "get_edited_scene_root"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "current_scene", PROPERTY_HINT_RESOURCE_TYPE, "Node", 0), "set_current_scene", "get_current_scene"); @@ -1962,7 +1964,7 @@ bool SceneTree::is_using_font_oversampling() const { SceneTree::SceneTree() { - singleton = this; + if (singleton == NULL) singleton = this; _quit = false; accept_quit = true; quit_on_go_back = true; @@ -2107,4 +2109,11 @@ SceneTree::SceneTree() { } SceneTree::~SceneTree() { + if (root) { + root->_set_tree(NULL); + root->_propagate_after_exit_tree(); + memdelete(root); + } + + if (singleton == this) singleton = NULL; } diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index dcd70a1844..8561d9aedb 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1701,6 +1701,8 @@ bool Viewport::_gui_drop(Control *p_at_control, Point2 p_at_pos, bool p_just_che void Viewport::_gui_input_event(Ref<InputEvent> p_event) { + ERR_FAIL_COND(p_event.is_null()) + //? /* if (!is_visible()) { diff --git a/scene/resources/concave_polygon_shape_2d.cpp b/scene/resources/concave_polygon_shape_2d.cpp index 51dd91fff5..de853f0c30 100644 --- a/scene/resources/concave_polygon_shape_2d.cpp +++ b/scene/resources/concave_polygon_shape_2d.cpp @@ -104,4 +104,6 @@ void ConcavePolygonShape2D::_bind_methods() { ConcavePolygonShape2D::ConcavePolygonShape2D() : Shape2D(Physics2DServer::get_singleton()->concave_polygon_shape_create()) { + PoolVector<Vector2> empty; + set_segments(empty); } diff --git a/scene/resources/particles_material.cpp b/scene/resources/particles_material.cpp index a80a57a09c..691d73c181 100644 --- a/scene/resources/particles_material.cpp +++ b/scene/resources/particles_material.cpp @@ -184,7 +184,8 @@ void ParticlesMaterial::_update_shader() { } break; case EMISSION_SHAPE_DIRECTED_POINTS: { code += "uniform sampler2D emission_texture_normal : hint_black;\n"; - } //fallthrough + FALLTHROUGH; + } case EMISSION_SHAPE_POINTS: { code += "uniform sampler2D emission_texture_points : hint_black;\n"; code += "uniform int emission_texture_point_count;\n"; diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 3a0144849a..a5e9351753 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -1487,8 +1487,10 @@ uint32_t CubeMap::get_flags() const { void CubeMap::set_side(Side p_side, const Ref<Image> &p_image) { + ERR_FAIL_COND(p_image.is_null()); ERR_FAIL_COND(p_image->empty()); ERR_FAIL_INDEX(p_side, 6); + if (!_is_valid()) { format = p_image->get_format(); w = p_image->get_width(); diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 388346b67c..17f5e158a7 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -49,8 +49,9 @@ void AudioStreamPlaybackResampled::_begin_resample() { void AudioStreamPlaybackResampled::mix(AudioFrame *p_buffer, float p_rate_scale, int p_frames) { float target_rate = AudioServer::get_singleton()->get_mix_rate(); + float global_rate_scale = AudioServer::get_singleton()->get_global_rate_scale(); - uint64_t mix_increment = uint64_t(((get_stream_sampling_rate() * p_rate_scale) / double(target_rate)) * double(FP_LEN)); + uint64_t mix_increment = uint64_t(((get_stream_sampling_rate() * p_rate_scale) / double(target_rate * global_rate_scale)) * double(FP_LEN)); for (int i = 0; i < p_frames; i++) { diff --git a/servers/audio/effects/audio_effect_record.cpp b/servers/audio/effects/audio_effect_record.cpp index abf9d5593c..acf27d2bbf 100644 --- a/servers/audio/effects/audio_effect_record.cpp +++ b/servers/audio/effects/audio_effect_record.cpp @@ -216,6 +216,9 @@ Ref<AudioStreamSample> AudioEffectRecord::get_recording() const { PoolVector<uint8_t> dst_data; + ERR_FAIL_COND_V(current_instance.is_null(), NULL); + ERR_FAIL_COND_V(current_instance->recording_data.size(), NULL); + if (dst_format == AudioStreamSample::FORMAT_8_BITS) { int data_size = current_instance->recording_data.size(); dst_data.resize(data_size); diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index fc3ecedd03..a6473d69c0 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -944,6 +944,15 @@ bool AudioServer::is_bus_channel_active(int p_bus, int p_channel) const { return buses[p_bus]->channels[p_channel].active; } +void AudioServer::set_global_rate_scale(float p_scale) { + + global_rate_scale = p_scale; +} +float AudioServer::get_global_rate_scale() const { + + return global_rate_scale; +} + void AudioServer::init_channels_and_buffers() { channel_count = get_channel_count(); temp_buffer.resize(channel_count); @@ -1352,6 +1361,9 @@ void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("get_bus_peak_volume_left_db", "bus_idx", "channel"), &AudioServer::get_bus_peak_volume_left_db); ClassDB::bind_method(D_METHOD("get_bus_peak_volume_right_db", "bus_idx", "channel"), &AudioServer::get_bus_peak_volume_right_db); + ClassDB::bind_method(D_METHOD("set_global_rate_scale", "scale"), &AudioServer::set_global_rate_scale); + ClassDB::bind_method(D_METHOD("get_global_rate_scale"), &AudioServer::get_global_rate_scale); + ClassDB::bind_method(D_METHOD("lock"), &AudioServer::lock); ClassDB::bind_method(D_METHOD("unlock"), &AudioServer::unlock); @@ -1372,6 +1384,10 @@ void AudioServer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_bus_layout", "bus_layout"), &AudioServer::set_bus_layout); ClassDB::bind_method(D_METHOD("generate_bus_layout"), &AudioServer::generate_bus_layout); + ADD_PROPERTY(PropertyInfo(Variant::INT, "bus_count"), "set_bus_count", "get_bus_count"); + ADD_PROPERTY(PropertyInfo(Variant::STRING, "device"), "set_device", "get_device"); + ADD_PROPERTY(PropertyInfo(Variant::REAL, "global_rate_scale"), "set_global_rate_scale", "get_global_rate_scale"); + ADD_SIGNAL(MethodInfo("bus_layout_changed")); BIND_ENUM_CONSTANT(SPEAKER_MODE_STEREO); @@ -1396,6 +1412,7 @@ AudioServer::AudioServer() { #endif mix_time = 0; mix_size = 0; + global_rate_scale = 1; } AudioServer::~AudioServer() { diff --git a/servers/audio_server.h b/servers/audio_server.h index 942fe7bc87..b0fff9d4b7 100644 --- a/servers/audio_server.h +++ b/servers/audio_server.h @@ -181,6 +181,8 @@ private: int channel_count; int to_mix; + float global_rate_scale; + struct Bus { StringName name; @@ -339,6 +341,9 @@ public: bool is_bus_channel_active(int p_bus, int p_channel) const; + void set_global_rate_scale(float p_scale); + float get_global_rate_scale() const; + virtual void init(); virtual void finish(); virtual void update(); diff --git a/servers/physics/collision_object_sw.cpp b/servers/physics/collision_object_sw.cpp index b1c21290ab..39de440da2 100644 --- a/servers/physics/collision_object_sw.cpp +++ b/servers/physics/collision_object_sw.cpp @@ -76,6 +76,13 @@ void CollisionObjectSW::set_shape_transform(int p_index, const Transform &p_tran //_shapes_changed(); } +void CollisionObjectSW::set_shape_as_disabled(int p_idx, bool p_enable) { + shapes.write[p_idx].disabled = p_enable; + if (!pending_shape_update_list.in_list()) { + PhysicsServerSW::singleton->pending_shape_update_list.add(&pending_shape_update_list); + } +} + void CollisionObjectSW::remove_shape(ShapeSW *p_shape) { //remove a shape, all the times it appears diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h index c2c3fe0e5a..895eda8528 100644 --- a/servers/physics/collision_object_sw.h +++ b/servers/physics/collision_object_sw.h @@ -139,8 +139,11 @@ public: _FORCE_INLINE_ void set_ray_pickable(bool p_enable) { ray_pickable = p_enable; } _FORCE_INLINE_ bool is_ray_pickable() const { return ray_pickable; } - _FORCE_INLINE_ void set_shape_as_disabled(int p_idx, bool p_enable) { shapes.write[p_idx].disabled = p_enable; } - _FORCE_INLINE_ bool is_shape_set_as_disabled(int p_idx) const { return shapes[p_idx].disabled; } + void set_shape_as_disabled(int p_idx, bool p_enable); + _FORCE_INLINE_ bool is_shape_set_as_disabled(int p_idx) const { + CRASH_BAD_INDEX(p_idx, shapes.size()); + return shapes[p_idx].disabled; + } _FORCE_INLINE_ void set_collision_layer(uint32_t p_layer) { collision_layer = p_layer; } _FORCE_INLINE_ uint32_t get_collision_layer() const { return collision_layer; } diff --git a/servers/physics_2d/collision_object_2d_sw.cpp b/servers/physics_2d/collision_object_2d_sw.cpp index 445a2e0613..f556638db1 100644 --- a/servers/physics_2d/collision_object_2d_sw.cpp +++ b/servers/physics_2d/collision_object_2d_sw.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "collision_object_2d_sw.h" +#include "servers/physics_2d/physics_2d_server_sw.h" #include "space_2d_sw.h" void CollisionObject2DSW::add_shape(Shape2DSW *p_shape, const Transform2D &p_transform, bool p_disabled) { @@ -43,8 +44,12 @@ void CollisionObject2DSW::add_shape(Shape2DSW *p_shape, const Transform2D &p_tra s.one_way_collision_margin = 0; shapes.push_back(s); p_shape->add_owner(this); - _update_shapes(); - _shapes_changed(); + + if (!pending_shape_update_list.in_list()) { + Physics2DServerSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list); + } + // _update_shapes(); + // _shapes_changed(); } void CollisionObject2DSW::set_shape(int p_index, Shape2DSW *p_shape) { @@ -54,8 +59,12 @@ void CollisionObject2DSW::set_shape(int p_index, Shape2DSW *p_shape) { shapes.write[p_index].shape = p_shape; p_shape->add_owner(this); - _update_shapes(); - _shapes_changed(); + + if (!pending_shape_update_list.in_list()) { + Physics2DServerSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list); + } + // _update_shapes(); + // _shapes_changed(); } void CollisionObject2DSW::set_shape_metadata(int p_index, const Variant &p_metadata) { @@ -70,8 +79,12 @@ void CollisionObject2DSW::set_shape_transform(int p_index, const Transform2D &p_ shapes.write[p_index].xform = p_transform; shapes.write[p_index].xform_inv = p_transform.affine_inverse(); - _update_shapes(); - _shapes_changed(); + + if (!pending_shape_update_list.in_list()) { + Physics2DServerSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list); + } + // _update_shapes(); + // _shapes_changed(); } void CollisionObject2DSW::set_shape_as_disabled(int p_idx, bool p_disabled) { @@ -89,9 +102,15 @@ void CollisionObject2DSW::set_shape_as_disabled(int p_idx, bool p_disabled) { if (p_disabled && shape.bpid != 0) { space->get_broadphase()->remove(shape.bpid); shape.bpid = 0; - _update_shapes(); + if (!pending_shape_update_list.in_list()) { + Physics2DServerSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list); + } + //_update_shapes(); } else if (!p_disabled && shape.bpid == 0) { - _update_shapes(); // automatically adds shape with bpid == 0 + if (!pending_shape_update_list.in_list()) { + Physics2DServerSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list); + } + //_update_shapes(); // automatically adds shape with bpid == 0 } } @@ -122,8 +141,11 @@ void CollisionObject2DSW::remove_shape(int p_index) { shapes[p_index].shape->remove_owner(this); shapes.remove(p_index); - _update_shapes(); - _shapes_changed(); + if (!pending_shape_update_list.in_list()) { + Physics2DServerSW::singletonsw->pending_shape_update_list.add(&pending_shape_update_list); + } + // _update_shapes(); + // _shapes_changed(); } void CollisionObject2DSW::_set_static(bool p_static) { @@ -239,7 +261,8 @@ void CollisionObject2DSW::_shape_changed() { _shapes_changed(); } -CollisionObject2DSW::CollisionObject2DSW(Type p_type) { +CollisionObject2DSW::CollisionObject2DSW(Type p_type) : + pending_shape_update_list(this) { _static = true; type = p_type; diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h index fa18e61262..ed59469878 100644 --- a/servers/physics_2d/collision_object_2d_sw.h +++ b/servers/physics_2d/collision_object_2d_sw.h @@ -78,6 +78,8 @@ private: uint32_t collision_layer; bool _static; + SelfList<CollisionObject2DSW> pending_shape_update_list; + void _update_shapes(); protected: diff --git a/servers/physics_2d/physics_2d_server_sw.cpp b/servers/physics_2d/physics_2d_server_sw.cpp index 0efa15d43e..cc656d3b73 100644 --- a/servers/physics_2d/physics_2d_server_sw.cpp +++ b/servers/physics_2d/physics_2d_server_sw.cpp @@ -902,6 +902,8 @@ void Physics2DServerSW::body_apply_torque_impulse(RID p_body, real_t p_torque) { Body2DSW *body = body_owner.get(p_body); ERR_FAIL_COND(!body); + _update_shapes(); + body->apply_torque_impulse(p_torque); } @@ -910,6 +912,8 @@ void Physics2DServerSW::body_apply_impulse(RID p_body, const Vector2 &p_pos, con Body2DSW *body = body_owner.get(p_body); ERR_FAIL_COND(!body); + _update_shapes(); + body->apply_impulse(p_pos, p_impulse); body->wakeup(); }; @@ -944,6 +948,8 @@ void Physics2DServerSW::body_set_axis_velocity(RID p_body, const Vector2 &p_axis Body2DSW *body = body_owner.get(p_body); ERR_FAIL_COND(!body); + _update_shapes(); + Vector2 v = body->get_linear_velocity(); Vector2 axis = p_axis_velocity.normalized(); v -= axis * axis.dot(v); @@ -1052,6 +1058,8 @@ bool Physics2DServerSW::body_test_motion(RID p_body, const Transform2D &p_from, ERR_FAIL_COND_V(!body->get_space(), false); ERR_FAIL_COND_V(body->get_space()->is_locked(), false); + _update_shapes(); + return body->get_space()->test_body_motion(body, p_from, p_motion, p_infinite_inertia, p_margin, r_result, p_exclude_raycast_shapes); } @@ -1238,6 +1246,8 @@ Physics2DServer::JointType Physics2DServerSW::joint_get_type(RID p_joint) const void Physics2DServerSW::free(RID p_rid) { + _update_shapes(); // just in case + if (shape_owner.owns(p_rid)) { Shape2DSW *shape = shape_owner.get(p_rid); @@ -1335,6 +1345,8 @@ void Physics2DServerSW::step(real_t p_step) { if (!active) return; + _update_shapes(); + doing_sync = false; last_step = p_step; @@ -1418,6 +1430,14 @@ void Physics2DServerSW::finish() { memdelete(direct_state); }; +void Physics2DServerSW::_update_shapes() { + + while (pending_shape_update_list.first()) { + pending_shape_update_list.first()->self()->_shape_changed(); + pending_shape_update_list.remove(pending_shape_update_list.first()); + } +} + int Physics2DServerSW::get_process_info(ProcessInfo p_info) { switch (p_info) { diff --git a/servers/physics_2d/physics_2d_server_sw.h b/servers/physics_2d/physics_2d_server_sw.h index adc011af40..72625c397c 100644 --- a/servers/physics_2d/physics_2d_server_sw.h +++ b/servers/physics_2d/physics_2d_server_sw.h @@ -70,6 +70,9 @@ class Physics2DServerSW : public Physics2DServer { static Physics2DServerSW *singletonsw; //void _clear_query(Query2DSW *p_query); + friend class CollisionObject2DSW; + SelfList<CollisionObject2DSW>::List pending_shape_update_list; + void _update_shapes(); RID _shape_create(ShapeType p_shape); diff --git a/thirdparty/README.md b/thirdparty/README.md index 3e1e8f9734..b003ae6e8a 100644 --- a/thirdparty/README.md +++ b/thirdparty/README.md @@ -308,9 +308,13 @@ File extracted from upstream release tarball `mbedtls-2.16.0-apache.tgz`: ## miniupnpc - Upstream: https://github.com/miniupnp/miniupnp/tree/master/miniupnpc -- Version: git (25615e0, 2018) +- Version: git (3cf6efa, 2019) - License: BSD-3-Clause +Extract only the `miniupnpc` folder inside `thirdparty/miniupnpc`. +Exclude all non `.c` and `.h` files, plus all files beginning with `test` +`minihttptestserver.c` and `wingenminiupnpcstrings.c`. + The only modified file is miniupnpcstrings.h, which was created for Godot (it is usually autogenerated by cmake). diff --git a/thirdparty/miniupnpc/LICENSE b/thirdparty/miniupnpc/LICENSE index 0816733704..39e0345f8a 100644 --- a/thirdparty/miniupnpc/LICENSE +++ b/thirdparty/miniupnpc/LICENSE @@ -1,5 +1,5 @@ -MiniUPnPc -Copyright (c) 2005-2016, Thomas BERNARD +MiniUPnP Project +Copyright (c) 2005-2019, Thomas BERNARD All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/thirdparty/miniupnpc/miniupnpc.def b/thirdparty/miniupnpc/miniupnpc.def deleted file mode 100644 index 60e0bbe423..0000000000 --- a/thirdparty/miniupnpc/miniupnpc.def +++ /dev/null @@ -1,45 +0,0 @@ -LIBRARY -; miniupnpc library - miniupnpc - -EXPORTS -; miniupnpc - upnpDiscover - freeUPNPDevlist - parserootdesc - UPNP_GetValidIGD - UPNP_GetIGDFromUrl - GetUPNPUrls - FreeUPNPUrls -; miniwget - miniwget - miniwget_getaddr -; upnpcommands - UPNP_GetTotalBytesSent - UPNP_GetTotalBytesReceived - UPNP_GetTotalPacketsSent - UPNP_GetTotalPacketsReceived - UPNP_GetStatusInfo - UPNP_GetConnectionTypeInfo - UPNP_GetExternalIPAddress - UPNP_GetLinkLayerMaxBitRates - UPNP_AddPortMapping - UPNP_AddAnyPortMapping - UPNP_DeletePortMapping - UPNP_DeletePortMappingRange - UPNP_GetPortMappingNumberOfEntries - UPNP_GetSpecificPortMappingEntry - UPNP_GetGenericPortMappingEntry - UPNP_GetListOfPortMappings - UPNP_AddPinhole - UPNP_CheckPinholeWorking - UPNP_UpdatePinhole - UPNP_GetPinholePackets - UPNP_DeletePinhole - UPNP_GetFirewallStatus - UPNP_GetOutboundPinholeTimeout -; upnperrors - strupnperror -; portlistingparse - ParsePortListing - FreePortListing diff --git a/thirdparty/miniupnpc/miniupnpc.h b/thirdparty/miniupnpc/miniupnpc.h deleted file mode 100644 index 8ddc282bd1..0000000000 --- a/thirdparty/miniupnpc/miniupnpc.h +++ /dev/null @@ -1,153 +0,0 @@ -/* $Id: miniupnpc.h,v 1.53 2018/05/07 11:05:16 nanard Exp $ */ -/* vim: tabstop=4 shiftwidth=4 noexpandtab - * Project: miniupnp - * http://miniupnp.free.fr/ - * Author: Thomas Bernard - * Copyright (c) 2005-2018 Thomas Bernard - * This software is subjects to the conditions detailed - * in the LICENCE file provided within this distribution */ -#ifndef MINIUPNPC_H_INCLUDED -#define MINIUPNPC_H_INCLUDED - -#include "miniupnpc_declspec.h" -#include "igd_desc_parse.h" -#include "upnpdev.h" - -/* error codes : */ -#define UPNPDISCOVER_SUCCESS (0) -#define UPNPDISCOVER_UNKNOWN_ERROR (-1) -#define UPNPDISCOVER_SOCKET_ERROR (-101) -#define UPNPDISCOVER_MEMORY_ERROR (-102) - -/* versions : */ -#define MINIUPNPC_VERSION "2.1" -#define MINIUPNPC_API_VERSION 17 - -/* Source port: - Using "1" as an alias for 1900 for backwards compatibility - (presuming one would have used that for the "sameport" parameter) */ -#define UPNP_LOCAL_PORT_ANY 0 -#define UPNP_LOCAL_PORT_SAME 1 - -#ifdef __cplusplus -extern "C" { -#endif - -/* Structures definitions : */ -struct UPNParg { const char * elt; const char * val; }; - -char * -simpleUPnPcommand(int, const char *, const char *, - const char *, struct UPNParg *, - int *); - -/* upnpDiscover() - * discover UPnP devices on the network. - * The discovered devices are returned as a chained list. - * It is up to the caller to free the list with freeUPNPDevlist(). - * delay (in millisecond) is the maximum time for waiting any device - * response. - * If available, device list will be obtained from MiniSSDPd. - * Default path for minissdpd socket will be used if minissdpdsock argument - * is NULL. - * If multicastif is not NULL, it will be used instead of the default - * multicast interface for sending SSDP discover packets. - * If localport is set to UPNP_LOCAL_PORT_SAME(1) SSDP packets will be sent - * from the source port 1900 (same as destination port), if set to - * UPNP_LOCAL_PORT_ANY(0) system assign a source port, any other value will - * be attempted as the source port. - * "searchalltypes" parameter is useful when searching several types, - * if 0, the discovery will stop with the first type returning results. - * TTL should default to 2. */ -MINIUPNP_LIBSPEC struct UPNPDev * -upnpDiscover(int delay, const char * multicastif, - const char * minissdpdsock, int localport, - int ipv6, unsigned char ttl, - int * error); - -MINIUPNP_LIBSPEC struct UPNPDev * -upnpDiscoverAll(int delay, const char * multicastif, - const char * minissdpdsock, int localport, - int ipv6, unsigned char ttl, - int * error); - -MINIUPNP_LIBSPEC struct UPNPDev * -upnpDiscoverDevice(const char * device, int delay, const char * multicastif, - const char * minissdpdsock, int localport, - int ipv6, unsigned char ttl, - int * error); - -MINIUPNP_LIBSPEC struct UPNPDev * -upnpDiscoverDevices(const char * const deviceTypes[], - int delay, const char * multicastif, - const char * minissdpdsock, int localport, - int ipv6, unsigned char ttl, - int * error, - int searchalltypes); - -/* parserootdesc() : - * parse root XML description of a UPnP device and fill the IGDdatas - * structure. */ -MINIUPNP_LIBSPEC void parserootdesc(const char *, int, struct IGDdatas *); - -/* structure used to get fast access to urls - * controlURL: controlURL of the WANIPConnection - * ipcondescURL: url of the description of the WANIPConnection - * controlURL_CIF: controlURL of the WANCommonInterfaceConfig - * controlURL_6FC: controlURL of the WANIPv6FirewallControl - */ -struct UPNPUrls { - char * controlURL; - char * ipcondescURL; - char * controlURL_CIF; - char * controlURL_6FC; - char * rootdescURL; -}; - -/* UPNP_GetValidIGD() : - * return values : - * 0 = NO IGD found - * 1 = A valid connected IGD has been found - * 2 = A valid IGD has been found but it reported as - * not connected - * 3 = an UPnP device has been found but was not recognized as an IGD - * - * In any non zero return case, the urls and data structures - * passed as parameters are set. Donc forget to call FreeUPNPUrls(urls) to - * free allocated memory. - */ -MINIUPNP_LIBSPEC int -UPNP_GetValidIGD(struct UPNPDev * devlist, - struct UPNPUrls * urls, - struct IGDdatas * data, - char * lanaddr, int lanaddrlen); - -/* UPNP_GetIGDFromUrl() - * Used when skipping the discovery process. - * When succeding, urls, data, and lanaddr arguments are set. - * return value : - * 0 - Not ok - * 1 - OK */ -MINIUPNP_LIBSPEC int -UPNP_GetIGDFromUrl(const char * rootdescurl, - struct UPNPUrls * urls, - struct IGDdatas * data, - char * lanaddr, int lanaddrlen); - -MINIUPNP_LIBSPEC void -GetUPNPUrls(struct UPNPUrls *, struct IGDdatas *, - const char *, unsigned int); - -MINIUPNP_LIBSPEC void -FreeUPNPUrls(struct UPNPUrls *); - -/* return 0 or 1 */ -MINIUPNP_LIBSPEC int UPNPIGD_IsConnected(struct UPNPUrls *, struct IGDdatas *); - - -#ifdef __cplusplus -} -#endif - -#endif - diff --git a/thirdparty/miniupnpc/codelength.h b/thirdparty/miniupnpc/miniupnpc/codelength.h index ea0b005ffe..ea0b005ffe 100644 --- a/thirdparty/miniupnpc/codelength.h +++ b/thirdparty/miniupnpc/miniupnpc/codelength.h diff --git a/thirdparty/miniupnpc/connecthostport.c b/thirdparty/miniupnpc/miniupnpc/connecthostport.c index ea6e4e5943..a59dc82437 100644 --- a/thirdparty/miniupnpc/connecthostport.c +++ b/thirdparty/miniupnpc/miniupnpc/connecthostport.c @@ -1,8 +1,8 @@ -/* $Id: connecthostport.c,v 1.15 2015/10/09 16:26:19 nanard Exp $ */ +/* $Id: connecthostport.c,v 1.21 2019/04/23 12:11:08 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * Project : miniupnp * Author : Thomas Bernard - * Copyright (c) 2010-2018 Thomas Bernard + * Copyright (c) 2010-2019 Thomas Bernard * This software is subject to the conditions detailed in the * LICENCE file provided in this distribution. */ @@ -41,13 +41,6 @@ #include <sys/select.h> #endif /* #else _WIN32 */ -/* definition of PRINT_SOCKET_ERROR */ -#ifdef _WIN32 -#define PRINT_SOCKET_ERROR(x) fprintf(stderr, "Socket error: %s, %d\n", x, WSAGetLastError()); -#else -#define PRINT_SOCKET_ERROR(x) perror(x) -#endif - #if defined(__amigaos__) || defined(__amigaos4__) #define herror(A) printf("%s\n", A) #endif @@ -123,8 +116,22 @@ SOCKET connecthostport(const char * host, unsigned short port, int err; FD_ZERO(&wset); FD_SET(s, &wset); - if((n = select(s + 1, NULL, &wset, NULL, NULL)) == -1 && errno == EINTR) +#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT + timeout.tv_sec = 3; + timeout.tv_usec = 0; + n = select(s + 1, NULL, &wset, NULL, &timeout); +#else + n = select(s + 1, NULL, &wset, NULL, NULL); +#endif + if(n == -1 && errno == EINTR) continue; +#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT + if(n == 0) { + errno = ETIMEDOUT; + n = -1; + break; + } +#endif /*len = 0;*/ /*n = getpeername(s, NULL, &len);*/ len = sizeof(err); @@ -163,7 +170,7 @@ SOCKET connecthostport(const char * host, unsigned short port, for(i = 0, j = 1; host[j] && (host[j] != ']') && i < MAXHOSTNAMELEN; i++, j++) { tmp_host[i] = host[j]; - if(0 == memcmp(host+j, "%25", 3)) /* %25 is just url encoding for '%' */ + if(0 == strncmp(host+j, "%25", 3)) /* %25 is just url encoding for '%' */ j+=2; /* skip "25" */ } tmp_host[i] = '\0'; @@ -183,9 +190,11 @@ SOCKET connecthostport(const char * host, unsigned short port, #endif return INVALID_SOCKET; } - s = -1; + s = INVALID_SOCKET; for(p = ai; p; p = p->ai_next) { + if(!ISINVALID(s)) + closesocket(s); s = socket(p->ai_family, p->ai_socktype, p->ai_protocol); if(ISINVALID(s)) continue; @@ -208,7 +217,7 @@ SOCKET connecthostport(const char * host, unsigned short port, PRINT_SOCKET_ERROR("setsockopt"); } #endif /* #ifdef MINIUPNPC_SET_SOCKET_TIMEOUT */ - n = connect(s, p->ai_addr, p->ai_addrlen); + n = connect(s, p->ai_addr, MSC_CAST_INT p->ai_addrlen); #ifdef MINIUPNPC_IGNORE_EINTR /* EINTR The system call was interrupted by a signal that was caught * EINPROGRESS The socket is nonblocking and the connection cannot @@ -220,8 +229,22 @@ SOCKET connecthostport(const char * host, unsigned short port, int err; FD_ZERO(&wset); FD_SET(s, &wset); - if((n = select(s + 1, NULL, &wset, NULL, NULL)) == -1 && errno == EINTR) +#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT + timeout.tv_sec = 3; + timeout.tv_usec = 0; + n = select(s + 1, NULL, &wset, NULL, &timeout); +#else + n = select(s + 1, NULL, &wset, NULL, NULL); +#endif + if(n == -1 && errno == EINTR) continue; +#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT + if(n == 0) { + errno = ETIMEDOUT; + n = -1; + break; + } +#endif /*len = 0;*/ /*n = getpeername(s, NULL, &len);*/ len = sizeof(err); @@ -237,15 +260,8 @@ SOCKET connecthostport(const char * host, unsigned short port, } } #endif /* #ifdef MINIUPNPC_IGNORE_EINTR */ - if(n < 0) - { - closesocket(s); - continue; - } - else - { + if(n >= 0) /* connect() was successful */ break; - } } freeaddrinfo(ai); if(ISINVALID(s)) @@ -256,9 +272,9 @@ SOCKET connecthostport(const char * host, unsigned short port, if(n < 0) { PRINT_SOCKET_ERROR("connect"); + closesocket(s); return INVALID_SOCKET; } #endif /* #ifdef USE_GETHOSTBYNAME */ return s; } - diff --git a/thirdparty/miniupnpc/connecthostport.h b/thirdparty/miniupnpc/miniupnpc/connecthostport.h index 701816b5b6..701816b5b6 100644 --- a/thirdparty/miniupnpc/connecthostport.h +++ b/thirdparty/miniupnpc/miniupnpc/connecthostport.h diff --git a/thirdparty/miniupnpc/igd_desc_parse.c b/thirdparty/miniupnpc/miniupnpc/igd_desc_parse.c index d2999ad011..d2999ad011 100644 --- a/thirdparty/miniupnpc/igd_desc_parse.c +++ b/thirdparty/miniupnpc/miniupnpc/igd_desc_parse.c diff --git a/thirdparty/miniupnpc/igd_desc_parse.h b/thirdparty/miniupnpc/miniupnpc/igd_desc_parse.h index 0de546b697..0de546b697 100644 --- a/thirdparty/miniupnpc/igd_desc_parse.h +++ b/thirdparty/miniupnpc/miniupnpc/igd_desc_parse.h diff --git a/thirdparty/miniupnpc/listdevices.c b/thirdparty/miniupnpc/miniupnpc/listdevices.c index bd9ba57efc..bd9ba57efc 100644 --- a/thirdparty/miniupnpc/listdevices.c +++ b/thirdparty/miniupnpc/miniupnpc/listdevices.c diff --git a/thirdparty/miniupnpc/minisoap.c b/thirdparty/miniupnpc/miniupnpc/minisoap.c index 520c9302e8..f92b36ce89 100644 --- a/thirdparty/miniupnpc/minisoap.c +++ b/thirdparty/miniupnpc/miniupnpc/minisoap.c @@ -25,12 +25,6 @@ /* only for malloc */ #include <stdlib.h> -#ifdef _WIN32 -#define PRINT_SOCKET_ERROR(x) fprintf(stderr, "Socket error: %s, %d\n", x, WSAGetLastError()); -#else -#define PRINT_SOCKET_ERROR(x) perror(x) -#endif - /* httpWrite sends the headers and the body to the socket * and returns the number of bytes sent */ static int @@ -79,11 +73,10 @@ int soapPostSubmit(SOCKET fd, const char * body, const char * httpversion) { - int bodysize; char headerbuf[512]; int headerssize; char portstr[8]; - bodysize = (int)strlen(body); + int bodysize = (int)strlen(body); /* We are not using keep-alive HTTP connections. * HTTP/1.1 needs the header Connection: close to do that. * This is the default with HTTP/1.0 diff --git a/thirdparty/miniupnpc/minisoap.h b/thirdparty/miniupnpc/miniupnpc/minisoap.h index d6a45d03ba..d6a45d03ba 100644 --- a/thirdparty/miniupnpc/minisoap.h +++ b/thirdparty/miniupnpc/miniupnpc/minisoap.h diff --git a/thirdparty/miniupnpc/minissdpc.c b/thirdparty/miniupnpc/miniupnpc/minissdpc.c index 1d29b4ba5b..29f8110155 100644 --- a/thirdparty/miniupnpc/minissdpc.c +++ b/thirdparty/miniupnpc/miniupnpc/minissdpc.c @@ -1,9 +1,9 @@ -/* $Id: minissdpc.c,v 1.32 2016/10/07 09:04:36 nanard Exp $ */ +/* $Id: minissdpc.c,v 1.40 2019/04/23 12:12:55 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * Project : miniupnp * Web : http://miniupnp.free.fr/ * Author : Thomas BERNARD - * copyright (c) 2005-2018 Thomas Bernard + * copyright (c) 2005-2019 Thomas Bernard * This software is subjet to the conditions detailed in the * provided LICENCE file. */ /*#include <syslog.h>*/ @@ -381,6 +381,7 @@ free_tmp_and_return: * the last 4 arguments are filled during the parsing : * - location/locationsize : "location:" field of the SSDP reply packet * - st/stsize : "st:" field of the SSDP reply packet. + * - usn/usnsize : "usn:" filed of the SSDP reply packet * The strings are NOT null terminated */ static void parseMSEARCHReply(const char * reply, int size, @@ -418,17 +419,17 @@ parseMSEARCHReply(const char * reply, int size, putchar('\n');*/ /* skip the colon and white spaces */ do { b++; } while(reply[b]==' '); - if(0==strncasecmp(reply+a, "location", 8)) + if(0==strncasecmp(reply+a, "location:", 9)) { *location = reply+b; *locationsize = i-b; } - else if(0==strncasecmp(reply+a, "st", 2)) + else if(0==strncasecmp(reply+a, "st:", 3)) { *st = reply+b; *stsize = i-b; } - else if(0==strncasecmp(reply+a, "usn", 3)) + else if(0==strncasecmp(reply+a, "usn:", 4)) { *usn = reply+b; *usnsize = i-b; @@ -471,7 +472,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[], int searchalltypes) { struct UPNPDev * tmp; - struct UPNPDev * devlist = 0; + struct UPNPDev * devlist = NULL; unsigned int scope_id = 0; int opt = 1; static const char MSearchMsgFmt[] = @@ -491,7 +492,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[], struct sockaddr_storage sockudp_w; #else int rv; - struct addrinfo hints, *servinfo, *p; + struct addrinfo hints, *servinfo; #endif #ifdef _WIN32 unsigned long _ttl = (unsigned long)ttl; @@ -545,51 +546,42 @@ ssdpDiscoverDevices(const char * const deviceTypes[], destAddr.sin_addr.s_addr = inet_addr("223.255.255.255"); destAddr.sin_port = 0; if (GetBestInterfaceEx((struct sockaddr *)&destAddr, &ifbestidx) == NO_ERROR) { - DWORD dwSize = 0; - DWORD dwRetVal = 0; - unsigned int i = 0; - ULONG flags = GAA_FLAG_INCLUDE_PREFIX; - ULONG family = AF_INET; - LPVOID lpMsgBuf = NULL; + DWORD dwRetVal = NO_ERROR; PIP_ADAPTER_ADDRESSES pAddresses = NULL; - ULONG outBufLen = 0; - ULONG Iterations = 0; + ULONG outBufLen = 15360; + int Iterations; PIP_ADAPTER_ADDRESSES pCurrAddresses = NULL; PIP_ADAPTER_UNICAST_ADDRESS pUnicast = NULL; - PIP_ADAPTER_ANYCAST_ADDRESS pAnycast = NULL; - PIP_ADAPTER_MULTICAST_ADDRESS pMulticast = NULL; - IP_ADAPTER_DNS_SERVER_ADDRESS *pDnServer = NULL; - IP_ADAPTER_PREFIX *pPrefix = NULL; - outBufLen = 15360; - do { + for (Iterations = 0; Iterations < 3; Iterations++) { pAddresses = (IP_ADAPTER_ADDRESSES *) HeapAlloc(GetProcessHeap(), 0, outBufLen); if (pAddresses == NULL) { break; } - dwRetVal = GetAdaptersAddresses(family, flags, NULL, pAddresses, &outBufLen); + dwRetVal = GetAdaptersAddresses(AF_INET, GAA_FLAG_INCLUDE_PREFIX, NULL, pAddresses, &outBufLen); - if (dwRetVal == ERROR_BUFFER_OVERFLOW) { - HeapFree(GetProcessHeap(), 0, pAddresses); - pAddresses = NULL; - } else { + if (dwRetVal != ERROR_BUFFER_OVERFLOW) { break; } - Iterations++; - } while ((dwRetVal == ERROR_BUFFER_OVERFLOW) && (Iterations < 3)); + HeapFree(GetProcessHeap(), 0, pAddresses); + pAddresses = NULL; + } if (dwRetVal == NO_ERROR) { pCurrAddresses = pAddresses; while (pCurrAddresses) { #ifdef DEBUG + int i; + PIP_ADAPTER_MULTICAST_ADDRESS pMulticast = NULL; + PIP_ADAPTER_ANYCAST_ADDRESS pAnycast = NULL; + printf("\tIfIndex (IPv4 interface): %u\n", pCurrAddresses->IfIndex); printf("\tAdapter name: %s\n", pCurrAddresses->AdapterName); pUnicast = pCurrAddresses->FirstUnicastAddress; if (pUnicast != NULL) { for (i = 0; pUnicast != NULL; i++) { - IPAddr.S_un.S_addr = (u_long) pUnicast->Address; - printf("\tIP Address[%d]: \t%s\n", i, inet_ntoa(IPAddr) ); + printf("\tIP Address[%d]: \t%s\n", i, inet_ntoa(((PSOCKADDR_IN)pUnicast->Address.lpSockaddr)->sin_addr) ); pUnicast = pUnicast->Next; } printf("\tNumber of Unicast Addresses: %d\n", i); @@ -597,8 +589,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[], pAnycast = pCurrAddresses->FirstAnycastAddress; if (pAnycast) { for (i = 0; pAnycast != NULL; i++) { - IPAddr.S_un.S_addr = (u_long) pAnyCast->Address; - printf("\tAnycast Address[%d]: \t%s\n", i, inet_ntoa(IPAddr) ); + printf("\tAnycast Address[%d]: \t%s\n", i, inet_ntoa(((PSOCKADDR_IN)pAnycast->Address.lpSockaddr)->sin_addr) ); pAnycast = pAnycast->Next; } printf("\tNumber of Anycast Addresses: %d\n", i); @@ -606,8 +597,8 @@ ssdpDiscoverDevices(const char * const deviceTypes[], pMulticast = pCurrAddresses->FirstMulticastAddress; if (pMulticast) { for (i = 0; pMulticast != NULL; i++) { - IPAddr.S_un.S_addr = (u_long) pMultiCast->Address; - printf("\tMulticast Address[%d]: \t%s\n", i, inet_ntoa(IPAddr) ); + printf("\tMulticast Address[%d]: \t%s\n", i, inet_ntoa(((PSOCKADDR_IN)pMulticast->Address.lpSockaddr)->sin_addr) ); + pMulticast = pMulticast->Next; } } printf("\n"); @@ -647,7 +638,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[], if(error) *error = MINISSDPC_SOCKET_ERROR; PRINT_SOCKET_ERROR("setsockopt(SO_REUSEADDR,...)"); - return NULL; + goto error; } if(ipv6) { @@ -692,7 +683,11 @@ ssdpDiscoverDevices(const char * const deviceTypes[], #endif } else { struct in_addr mc_if; +#if defined(_WIN32) && (_WIN32_WINNT >= _WIN32_WINNT_VISTA) + InetPtonA(AF_INET, multicastif, &mc_if); +#else mc_if.s_addr = inet_addr(multicastif); /* ex: 192.168.x.x */ +#endif if(mc_if.s_addr != INADDR_NONE) { ((struct sockaddr_in *)&sockudp_r)->sin_addr.s_addr = mc_if.s_addr; @@ -819,24 +814,26 @@ ssdpDiscoverDevices(const char * const deviceTypes[], fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(rv)); #endif break; - } - for(p = servinfo; p; p = p->ai_next) { - n = sendto(sudp, bufr, n, 0, p->ai_addr, p->ai_addrlen); - if (n < 0) { + } else { + struct addrinfo *p; + for(p = servinfo; p; p = p->ai_next) { + n = sendto(sudp, bufr, n, 0, p->ai_addr, MSC_CAST_INT p->ai_addrlen); + if (n < 0) { #ifdef DEBUG - char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; - if (getnameinfo(p->ai_addr, p->ai_addrlen, hbuf, sizeof(hbuf), sbuf, - sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0) { - fprintf(stderr, "host:%s port:%s\n", hbuf, sbuf); - } + char hbuf[NI_MAXHOST], sbuf[NI_MAXSERV]; + if (getnameinfo(p->ai_addr, (socklen_t)p->ai_addrlen, hbuf, sizeof(hbuf), sbuf, + sizeof(sbuf), NI_NUMERICHOST | NI_NUMERICSERV) == 0) { + fprintf(stderr, "host:%s port:%s\n", hbuf, sbuf); + } #endif - PRINT_SOCKET_ERROR("sendto"); - continue; - } else { - sentok = 1; + PRINT_SOCKET_ERROR("sendto"); + continue; + } else { + sentok = 1; + } } + freeaddrinfo(servinfo); } - freeaddrinfo(servinfo); if(!sentok) { if(error) *error = MINISSDPC_SOCKET_ERROR; @@ -877,11 +874,11 @@ ssdpDiscoverDevices(const char * const deviceTypes[], stsize, st, usnsize, (usn?usn:""), urlsize, descURL); #endif /* DEBUG */ for(tmp=devlist; tmp; tmp = tmp->pNext) { - if(memcmp(tmp->descURL, descURL, urlsize) == 0 && + if(strncmp(tmp->descURL, descURL, urlsize) == 0 && tmp->descURL[urlsize] == '\0' && - memcmp(tmp->st, st, stsize) == 0 && + strncmp(tmp->st, st, stsize) == 0 && tmp->st[stsize] == '\0' && - (usnsize == 0 || memcmp(tmp->usn, usn, usnsize) == 0) && + (usnsize == 0 || strncmp(tmp->usn, usn, usnsize) == 0) && tmp->usn[usnsize] == '\0') break; } diff --git a/thirdparty/miniupnpc/minissdpc.h b/thirdparty/miniupnpc/miniupnpc/minissdpc.h index 167d897cb6..c99f929b9e 100644 --- a/thirdparty/miniupnpc/minissdpc.h +++ b/thirdparty/miniupnpc/miniupnpc/minissdpc.h @@ -32,13 +32,13 @@ MINIUPNP_LIBSPEC int connectToMiniSSDPD(const char * socketpath); MINIUPNP_LIBSPEC int -disconnectFromMiniSSDPD(int fd); +disconnectFromMiniSSDPD(int s); MINIUPNP_LIBSPEC int -requestDevicesFromMiniSSDPD(int fd, const char * devtype); +requestDevicesFromMiniSSDPD(int s, const char * devtype); MINIUPNP_LIBSPEC struct UPNPDev * -receiveDevicesFromMiniSSDPD(int fd, int * error); +receiveDevicesFromMiniSSDPD(int s, int * error); #endif /* !(defined(_WIN32) || defined(__amigaos__) || defined(__amigaos4__)) */ diff --git a/thirdparty/miniupnpc/miniupnpc.c b/thirdparty/miniupnpc/miniupnpc/miniupnpc.c index 5d93ef9933..3181d10eb6 100644 --- a/thirdparty/miniupnpc/miniupnpc.c +++ b/thirdparty/miniupnpc/miniupnpc/miniupnpc.c @@ -1,9 +1,9 @@ -/* $Id: miniupnpc.c,v 1.149 2016/02/09 09:50:46 nanard Exp $ */ +/* $Id: miniupnpc.c,v 1.154 2019/04/23 12:12:13 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * Project : miniupnp * Web : http://miniupnp.free.fr/ * Author : Thomas BERNARD - * copyright (c) 2005-2018 Thomas Bernard + * copyright (c) 2005-2019 Thomas Bernard * This software is subjet to the conditions detailed in the * provided LICENSE file. */ #include <stdlib.h> @@ -63,7 +63,7 @@ #include "connecthostport.h" /* compare the beginning of a string with a constant string */ -#define COMPARE(str, cstr) (0==memcmp(str, cstr, sizeof(cstr) - 1)) +#define COMPARE(str, cstr) (0==strncmp(str, cstr, sizeof(cstr) - 1)) #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 @@ -85,8 +85,7 @@ static int is_rfc1918addr(const char * addr) return 1; /* 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) */ if(COMPARE(addr, "172.")) { - int i = atoi(addr + 4); - if((16 <= i) && (i <= 31)) + if((atoi(addr + 4) | 0x0f) == 0x1f) return 1; } return 0; @@ -416,7 +415,7 @@ static char * build_absolute_url(const char * baseurl, const char * descURL, const char * url, unsigned int scope_id) { - int l, n; + size_t l, n; char * s; const char * base; char * p; @@ -459,7 +458,7 @@ build_absolute_url(const char * baseurl, const char * descURL, memcpy(s, base, n); if(scope_id != 0) { s[n] = '\0'; - if(0 == memcmp(s, "http://[fe80:", 13)) { + if(n > 13 && 0 == memcmp(s, "http://[fe80:", 13)) { /* this is a linklocal IPv6 address */ p = strchr(s, ']'); if(p) { @@ -573,7 +572,6 @@ UPNP_GetValidIGD(struct UPNPDev * devlist, int ndev = 0; int i; int state = -1; /* state 1 : IGD connected. State 2 : IGD. State 3 : anything */ - int n_igd = 0; char extIpAddr[16]; char myLanAddr[40]; int status_code = -1; @@ -588,12 +586,10 @@ UPNP_GetValidIGD(struct UPNPDev * devlist, /* counting total number of devices in the list */ for(dev = devlist; dev; dev = dev->pNext) ndev++; - if(ndev > 0) - { - desc = calloc(ndev, sizeof(struct xml_desc)); - if(!desc) - return -1; /* memory allocation error */ - } + /* ndev is always > 0 */ + desc = calloc(ndev, sizeof(struct xml_desc)); + if(!desc) + return -1; /* memory allocation error */ /* Step 1 : downloading descriptions and testing type */ for(dev = devlist, i = 0; dev; dev = dev->pNext, i++) { @@ -617,7 +613,6 @@ UPNP_GetValidIGD(struct UPNPDev * devlist, "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:")) { desc[i].is_igd = 1; - n_igd++; if(lanaddr) strncpy(lanaddr, myLanAddr, lanaddrlen); } @@ -685,14 +680,9 @@ UPNP_GetValidIGD(struct UPNPDev * devlist, } state = 0; free_and_return: - if(desc) { - for(i = 0; i < ndev; i++) { - if(desc[i].xml) { - free(desc[i].xml); - } - } - free(desc); - } + for(i = 0; i < ndev; i++) + free(desc[i].xml); + free(desc); return state; } @@ -717,7 +707,6 @@ UPNP_GetIGDFromUrl(const char * rootdescurl, memset(urls, 0, sizeof(struct UPNPUrls)); parserootdesc(descXML, descXMLsize, data); free(descXML); - descXML = NULL; GetUPNPUrls(urls, data, rootdescurl, 0); return 1; } else { diff --git a/thirdparty/miniupnpc/miniupnpc_declspec.h b/thirdparty/miniupnpc/miniupnpc/miniupnpc_declspec.h index 40adb922ec..40adb922ec 100644 --- a/thirdparty/miniupnpc/miniupnpc_declspec.h +++ b/thirdparty/miniupnpc/miniupnpc/miniupnpc_declspec.h diff --git a/thirdparty/miniupnpc/miniupnpc_socketdef.h b/thirdparty/miniupnpc/miniupnpc/miniupnpc_socketdef.h index 965d9151b9..d4f79a7bd6 100644 --- a/thirdparty/miniupnpc/miniupnpc_socketdef.h +++ b/thirdparty/miniupnpc/miniupnpc/miniupnpc_socketdef.h @@ -28,6 +28,13 @@ #endif +#ifdef _MSC_VER +#define MSC_CAST_INT (int) +#else +#define MSC_CAST_INT +#endif + +/* definition of PRINT_SOCKET_ERROR */ #ifdef _WIN32 #define PRINT_SOCKET_ERROR(x) fprintf(stderr, "Socket error: %s, %d\n", x, WSAGetLastError()); #else diff --git a/thirdparty/miniupnpc/miniupnpcmodule.c b/thirdparty/miniupnpc/miniupnpc/miniupnpcmodule.c index 8657a0e002..d9341ab5bf 100644 --- a/thirdparty/miniupnpc/miniupnpcmodule.c +++ b/thirdparty/miniupnpc/miniupnpc/miniupnpcmodule.c @@ -1,8 +1,9 @@ -/* $Id: miniupnpcmodule.c,v 1.24 2014/06/10 09:48:11 nanard Exp $*/ -/* Project : miniupnp +/* $Id: miniupnpcmodule.c,v 1.34 2019/05/20 19:07:16 nanard Exp $*/ +/* vim: tabstop=4 shiftwidth=4 noexpandtab + * Project : miniupnp * Author : Thomas BERNARD * website : https://miniupnp.tuxfamily.org/ - * copyright (c) 2007-2018 Thomas Bernard + * copyright (c) 2007-2019 Thomas Bernard * This software is subjet to the conditions detailed in the * provided LICENCE file. */ #include <Python.h> @@ -292,7 +293,7 @@ Py_END_ALLOW_THREADS } /* AddPortMapping(externalPort, protocol, internalHost, internalPort, desc, - * remoteHost) + * remoteHost, leaseDuration) * protocol is 'UDP' or 'TCP' */ static PyObject * UPnP_addportmapping(UPnPObject *self, PyObject *args) @@ -305,17 +306,24 @@ UPnP_addportmapping(UPnPObject *self, PyObject *args) const char * host; const char * desc; const char * remoteHost; - const char * leaseDuration = "0"; + unsigned int intLeaseDuration = 0; + char strLeaseDuration[12]; int r; - if (!PyArg_ParseTuple(args, "HssHzz", &ePort, &proto, - &host, &iPort, &desc, &remoteHost)) +#if (PY_MAJOR_VERSION >= 3) || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 3) + if (!PyArg_ParseTuple(args, "HssHzz|I", &ePort, &proto, + &host, &iPort, &desc, &remoteHost, &intLeaseDuration)) +#else + if (!PyArg_ParseTuple(args, "HssHzz|i", &ePort, &proto, + &host, &iPort, &desc, &remoteHost, (int *)&intLeaseDuration)) +#endif return NULL; Py_BEGIN_ALLOW_THREADS sprintf(extPort, "%hu", ePort); sprintf(inPort, "%hu", iPort); + sprintf(strLeaseDuration, "%u", intLeaseDuration); r = UPNP_AddPortMapping(self->urls.controlURL, self->data.first.servicetype, extPort, inPort, host, desc, proto, - remoteHost, leaseDuration); + remoteHost, strLeaseDuration); Py_END_ALLOW_THREADS if(r==UPNPCOMMAND_SUCCESS) { @@ -676,6 +684,16 @@ initminiupnpc(void) /* initialize Winsock. */ WSADATA wsaData; int nResult = WSAStartup(MAKEWORD(2,2), &wsaData); + if (nResult != 0) + { + /* error code could be WSASYSNOTREADY WSASYSNOTREADY + * WSASYSNOTREADY WSASYSNOTREADY WSASYSNOTREADY */ +#if PY_MAJOR_VERSION >= 3 + return 0; +#else + return; +#endif + } UPnPType.tp_new = PyType_GenericNew; #endif diff --git a/thirdparty/miniupnpc/miniupnpcstrings.h b/thirdparty/miniupnpc/miniupnpc/miniupnpcstrings.h index a718cc7bbf..a718cc7bbf 100644 --- a/thirdparty/miniupnpc/miniupnpcstrings.h +++ b/thirdparty/miniupnpc/miniupnpc/miniupnpcstrings.h diff --git a/thirdparty/miniupnpc/miniupnpctypes.h b/thirdparty/miniupnpc/miniupnpc/miniupnpctypes.h index 307ce39699..307ce39699 100644 --- a/thirdparty/miniupnpc/miniupnpctypes.h +++ b/thirdparty/miniupnpc/miniupnpc/miniupnpctypes.h diff --git a/thirdparty/miniupnpc/miniwget.c b/thirdparty/miniupnpc/miniupnpc/miniwget.c index a46ba76022..5c135f4efd 100644 --- a/thirdparty/miniupnpc/miniwget.c +++ b/thirdparty/miniupnpc/miniupnpc/miniwget.c @@ -243,7 +243,7 @@ getHTTPResponse(SOCKET s, int * size, int * status_code) /* reading chunk size */ if(chunksize_buf_index == 0) { /* skipping any leading CR LF */ - if(i<n && buf[i] == '\r') i++; + if(buf[i] == '\r') i++; if(i<n && buf[i] == '\n') i++; } while(i<n && isxdigit(buf[i]) @@ -350,7 +350,7 @@ getHTTPResponse(SOCKET s, int * size, int * status_code) } } end_of_stream: - free(header_buf); header_buf = NULL; + free(header_buf); *size = content_buf_used; if(content_buf_used == 0) { @@ -371,7 +371,7 @@ miniwget3(const char * host, int * status_code) { char buf[2048]; - SOCKET s; + SOCKET s; int n; int len; int sent; @@ -559,7 +559,7 @@ parseURL(const char * url, #else /* under windows, scope is numerical */ char tmp[8]; - int l; + size_t l; scope++; /* "%25" is just '%' in URL encoding */ if(scope[0] == '2' && scope[1] == '5') @@ -659,4 +659,3 @@ miniwget_getaddr(const char * url, int * size, #endif return miniwget2(hostname, port, path, size, addr, addrlen, scope_id, status_code); } - diff --git a/thirdparty/miniupnpc/miniwget_private.h b/thirdparty/miniupnpc/miniupnpc/miniwget_private.h index e4eaac8085..e4eaac8085 100644 --- a/thirdparty/miniupnpc/miniwget_private.h +++ b/thirdparty/miniupnpc/miniupnpc/miniwget_private.h diff --git a/thirdparty/miniupnpc/minixml.c b/thirdparty/miniupnpc/miniupnpc/minixml.c index ed2d3c759c..ed2d3c759c 100644 --- a/thirdparty/miniupnpc/minixml.c +++ b/thirdparty/miniupnpc/miniupnpc/minixml.c diff --git a/thirdparty/miniupnpc/minixml.h b/thirdparty/miniupnpc/miniupnpc/minixml.h index 19e6f513bf..2e60397388 100644 --- a/thirdparty/miniupnpc/minixml.h +++ b/thirdparty/miniupnpc/miniupnpc/minixml.h @@ -10,7 +10,7 @@ * */ #ifndef MINIXML_H_INCLUDED #define MINIXML_H_INCLUDED -#define IS_WHITE_SPACE(c) ((c==' ') || (c=='\t') || (c=='\r') || (c=='\n')) +#define IS_WHITE_SPACE(c) ((c)==' ' || (c)=='\t' || (c)=='\r' || (c)=='\n') /* if a callback function pointer is set to NULL, * the function is not called */ diff --git a/thirdparty/miniupnpc/minixmlvalid.c b/thirdparty/miniupnpc/miniupnpc/minixmlvalid.c index dad1488122..dad1488122 100644 --- a/thirdparty/miniupnpc/minixmlvalid.c +++ b/thirdparty/miniupnpc/miniupnpc/minixmlvalid.c diff --git a/thirdparty/miniupnpc/portlistingparse.c b/thirdparty/miniupnpc/miniupnpc/portlistingparse.c index 55859f2714..55859f2714 100644 --- a/thirdparty/miniupnpc/portlistingparse.c +++ b/thirdparty/miniupnpc/miniupnpc/portlistingparse.c diff --git a/thirdparty/miniupnpc/portlistingparse.h b/thirdparty/miniupnpc/miniupnpc/portlistingparse.h index e3957a3f4c..e3957a3f4c 100644 --- a/thirdparty/miniupnpc/portlistingparse.h +++ b/thirdparty/miniupnpc/miniupnpc/portlistingparse.h diff --git a/thirdparty/miniupnpc/receivedata.c b/thirdparty/miniupnpc/miniupnpc/receivedata.c index 7b9cc5b778..7b9cc5b778 100644 --- a/thirdparty/miniupnpc/receivedata.c +++ b/thirdparty/miniupnpc/miniupnpc/receivedata.c diff --git a/thirdparty/miniupnpc/receivedata.h b/thirdparty/miniupnpc/miniupnpc/receivedata.h index c9fdc561f8..c9fdc561f8 100644 --- a/thirdparty/miniupnpc/receivedata.h +++ b/thirdparty/miniupnpc/miniupnpc/receivedata.h diff --git a/thirdparty/miniupnpc/upnpc.c b/thirdparty/miniupnpc/miniupnpc/upnpc.c index 0c65cbe8c0..674c89beb0 100644 --- a/thirdparty/miniupnpc/upnpc.c +++ b/thirdparty/miniupnpc/miniupnpc/upnpc.c @@ -1,7 +1,7 @@ /* $Id: upnpc.c,v 1.119 2018/03/13 23:34:46 nanard Exp $ */ /* Project : miniupnp * Author : Thomas Bernard - * Copyright (c) 2005-2018 Thomas Bernard + * Copyright (c) 2005-2019 Thomas Bernard * This software is subject to the conditions detailed in the * LICENCE file provided in this distribution. */ @@ -579,7 +579,7 @@ int main(int argc, char ** argv) } #endif printf("upnpc : miniupnpc library test client, version %s.\n", MINIUPNPC_VERSION_STRING); - printf(" (c) 2005-2018 Thomas Bernard.\n"); + printf(" (c) 2005-2019 Thomas Bernard.\n"); printf("Go to http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/\n" "for more information.\n"); /* command line processing */ diff --git a/thirdparty/miniupnpc/upnpcommands.c b/thirdparty/miniupnpc/miniupnpc/upnpcommands.c index b6a693a93a..1e1ee6786f 100644 --- a/thirdparty/miniupnpc/upnpcommands.c +++ b/thirdparty/miniupnpc/miniupnpc/upnpcommands.c @@ -1,4 +1,4 @@ -/* $Id: upnpcommands.c,v 1.49 2018/03/13 23:34:47 nanard Exp $ */ +/* $Id: upnpcommands.c,v 1.51 2019/04/23 11:45:15 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * Project : miniupnp * Author : Thomas Bernard @@ -33,11 +33,11 @@ UPNP_GetTotalBytesSent(const char * controlURL, char * p; if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype, "GetTotalBytesSent", 0, &bufsize))) { - return UPNPCOMMAND_HTTP_ERROR; + return (UNSIGNED_INTEGER)UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); /*DisplayNameValueList(buffer, bufsize);*/ - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewTotalBytesSent"); r = my_atoui(p); ClearNameValueList(&pdata); @@ -57,11 +57,11 @@ UPNP_GetTotalBytesReceived(const char * controlURL, char * p; if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype, "GetTotalBytesReceived", 0, &bufsize))) { - return UPNPCOMMAND_HTTP_ERROR; + return (UNSIGNED_INTEGER)UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); /*DisplayNameValueList(buffer, bufsize);*/ - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewTotalBytesReceived"); r = my_atoui(p); ClearNameValueList(&pdata); @@ -81,11 +81,11 @@ UPNP_GetTotalPacketsSent(const char * controlURL, char * p; if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype, "GetTotalPacketsSent", 0, &bufsize))) { - return UPNPCOMMAND_HTTP_ERROR; + return (UNSIGNED_INTEGER)UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); /*DisplayNameValueList(buffer, bufsize);*/ - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewTotalPacketsSent"); r = my_atoui(p); ClearNameValueList(&pdata); @@ -105,11 +105,11 @@ UPNP_GetTotalPacketsReceived(const char * controlURL, char * p; if(!(buffer = simpleUPnPcommand(-1, controlURL, servicetype, "GetTotalPacketsReceived", 0, &bufsize))) { - return UPNPCOMMAND_HTTP_ERROR; + return (UNSIGNED_INTEGER)UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); /*DisplayNameValueList(buffer, bufsize);*/ - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewTotalPacketsReceived"); r = my_atoui(p); ClearNameValueList(&pdata); @@ -142,7 +142,7 @@ UPNP_GetStatusInfo(const char * controlURL, } ParseNameValue(buffer, bufsize, &pdata); /*DisplayNameValueList(buffer, bufsize);*/ - free(buffer); buffer = NULL; + free(buffer); up = GetValueFromNameValueList(&pdata, "NewUptime"); p = GetValueFromNameValueList(&pdata, "NewConnectionStatus"); err = GetValueFromNameValueList(&pdata, "NewLastConnectionError"); @@ -202,7 +202,7 @@ UPNP_GetConnectionTypeInfo(const char * controlURL, return UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewConnectionType"); /*p = GetValueFromNameValueList(&pdata, "NewPossibleConnectionTypes");*/ /* PossibleConnectionTypes will have several values.... */ @@ -251,7 +251,7 @@ UPNP_GetLinkLayerMaxBitRates(const char * controlURL, } /*DisplayNameValueList(buffer, bufsize);*/ ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); /*down = GetValueFromNameValueList(&pdata, "NewDownstreamMaxBitRate");*/ /*up = GetValueFromNameValueList(&pdata, "NewUpstreamMaxBitRate");*/ down = GetValueFromNameValueList(&pdata, "NewLayer1DownstreamMaxBitRate"); @@ -315,7 +315,7 @@ UPNP_GetExternalIPAddress(const char * controlURL, } /*DisplayNameValueList(buffer, bufsize);*/ ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); /*printf("external ip = %s\n", GetValueFromNameValueList(&pdata, "NewExternalIPAddress") );*/ p = GetValueFromNameValueList(&pdata, "NewExternalIPAddress"); if(p) { @@ -385,7 +385,7 @@ UPNP_AddPortMapping(const char * controlURL, const char * servicetype, /*buffer[bufsize] = '\0';*/ /*puts(buffer);*/ ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); resVal = GetValueFromNameValueList(&pdata, "errorCode"); if(resVal) { /*printf("AddPortMapping errorCode = '%s'\n", resVal); */ @@ -446,7 +446,7 @@ UPNP_AddAnyPortMapping(const char * controlURL, const char * servicetype, return UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); resVal = GetValueFromNameValueList(&pdata, "errorCode"); if(resVal) { ret = UPNPCOMMAND_UNKNOWN_ERROR; @@ -501,7 +501,7 @@ UPNP_DeletePortMapping(const char * controlURL, const char * servicetype, } /*DisplayNameValueList(buffer, bufsize);*/ ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); resVal = GetValueFromNameValueList(&pdata, "errorCode"); if(resVal) { ret = UPNPCOMMAND_UNKNOWN_ERROR; @@ -549,7 +549,7 @@ UPNP_DeletePortMappingRange(const char * controlURL, const char * servicetype, return UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); resVal = GetValueFromNameValueList(&pdata, "errorCode"); if(resVal) { ret = UPNPCOMMAND_UNKNOWN_ERROR; @@ -597,7 +597,7 @@ UPNP_GetGenericPortMappingEntry(const char * controlURL, return UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewRemoteHost"); if(p && rHost) @@ -677,7 +677,7 @@ UPNP_GetPortMappingNumberOfEntries(const char * controlURL, DisplayNameValueList(buffer, bufsize); #endif ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewPortMappingNumberOfEntries"); if(numEntries && p) { @@ -739,7 +739,7 @@ UPNP_GetSpecificPortMappingEntry(const char * controlURL, } /*DisplayNameValueList(buffer, bufsize);*/ ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "NewInternalClient"); if(p) { @@ -836,7 +836,7 @@ UPNP_GetListOfPortMappings(const char * controlURL, /*DisplayNameValueList(buffer, bufsize);*/ ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); /*p = GetValueFromNameValueList(&pdata, "NewPortListing");*/ /*if(p) { @@ -898,7 +898,7 @@ UPNP_GetFirewallStatus(const char * controlURL, return UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); fe = GetValueFromNameValueList(&pdata, "FirewallEnabled"); ipa = GetValueFromNameValueList(&pdata, "InboundPinholeAllowed"); if(ipa && fe) @@ -935,7 +935,6 @@ UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype int bufsize; struct NameValueParserData pdata; const char * resVal; - char * p; int ret; if(!intPort || !intClient || !proto || !remotePort || !remoteHost) @@ -960,7 +959,7 @@ UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype if(!buffer) return UPNPCOMMAND_HTTP_ERROR; ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); resVal = GetValueFromNameValueList(&pdata, "errorCode"); if(resVal) { @@ -969,10 +968,10 @@ UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype } else { - ret = UPNPCOMMAND_SUCCESS; - p = GetValueFromNameValueList(&pdata, "OutboundPinholeTimeout"); + const char * p = GetValueFromNameValueList(&pdata, "OutboundPinholeTimeout"); if(p) *opTimeout = my_atoui(p); + ret = UPNPCOMMAND_SUCCESS; } ClearNameValueList(&pdata); return ret; @@ -1037,7 +1036,7 @@ UPNP_AddPinhole(const char * controlURL, const char * servicetype, if(!buffer) return UPNPCOMMAND_HTTP_ERROR; ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "UniqueID"); if(p) { @@ -1087,7 +1086,7 @@ UPNP_UpdatePinhole(const char * controlURL, const char * servicetype, if(!buffer) return UPNPCOMMAND_HTTP_ERROR; ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); resVal = GetValueFromNameValueList(&pdata, "errorCode"); if(resVal) { @@ -1129,7 +1128,7 @@ UPNP_DeletePinhole(const char * controlURL, const char * servicetype, const char return UPNPCOMMAND_HTTP_ERROR; /*DisplayNameValueList(buffer, bufsize);*/ ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); resVal = GetValueFromNameValueList(&pdata, "errorCode"); if(resVal) { @@ -1171,7 +1170,7 @@ UPNP_CheckPinholeWorking(const char * controlURL, const char * servicetype, return UPNPCOMMAND_HTTP_ERROR; } ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "IsWorking"); if(p) @@ -1218,7 +1217,7 @@ UPNP_GetPinholePackets(const char * controlURL, const char * servicetype, if(!buffer) return UPNPCOMMAND_HTTP_ERROR; ParseNameValue(buffer, bufsize, &pdata); - free(buffer); buffer = NULL; + free(buffer); p = GetValueFromNameValueList(&pdata, "PinholePackets"); if(p) @@ -1237,5 +1236,3 @@ UPNP_GetPinholePackets(const char * controlURL, const char * servicetype, ClearNameValueList(&pdata); return ret; } - - diff --git a/thirdparty/miniupnpc/miniupnpc/upnpcommands.h b/thirdparty/miniupnpc/miniupnpc/upnpcommands.h index 0c6d501666..1b6d447732 100644 --- a/thirdparty/miniupnpc/miniupnpc/upnpcommands.h +++ b/thirdparty/miniupnpc/miniupnpc/upnpcommands.h @@ -206,9 +206,9 @@ UPNP_DeletePortMappingRange(const char * controlURL, const char * servicetype, /* UPNP_GetPortMappingNumberOfEntries() * not supported by all routers */ MINIUPNP_LIBSPEC int -UPNP_GetPortMappingNumberOfEntries(const char* controlURL, - const char* servicetype, - unsigned int * num); +UPNP_GetPortMappingNumberOfEntries(const char * controlURL, + const char * servicetype, + unsigned int * numEntries); /* UPNP_GetSpecificPortMappingEntry() * retrieves an existing port mapping diff --git a/thirdparty/miniupnpc/upnpdev.c b/thirdparty/miniupnpc/miniupnpc/upnpdev.c index d89a9934c3..d89a9934c3 100644 --- a/thirdparty/miniupnpc/upnpdev.c +++ b/thirdparty/miniupnpc/miniupnpc/upnpdev.c diff --git a/thirdparty/miniupnpc/upnpdev.h b/thirdparty/miniupnpc/miniupnpc/upnpdev.h index f4ae174426..f4ae174426 100644 --- a/thirdparty/miniupnpc/upnpdev.h +++ b/thirdparty/miniupnpc/miniupnpc/upnpdev.h diff --git a/thirdparty/miniupnpc/upnperrors.c b/thirdparty/miniupnpc/miniupnpc/upnperrors.c index 40a2e7857f..650af42557 100644 --- a/thirdparty/miniupnpc/upnperrors.c +++ b/thirdparty/miniupnpc/miniupnpc/upnperrors.c @@ -1,7 +1,7 @@ -/* $Id: upnperrors.c,v 1.5 2011/04/10 11:19:36 nanard Exp $ */ +/* $Id: upnperrors.c,v 1.9 2019/06/25 21:15:46 nanard Exp $ */ /* Project : miniupnp * Author : Thomas BERNARD - * copyright (c) 2007 Thomas Bernard + * copyright (c) 2007-2019 Thomas Bernard * All Right reserved. * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * This software is subjet to the conditions detailed in the @@ -27,10 +27,14 @@ const char * strupnperror(int err) case UPNPCOMMAND_INVALID_RESPONSE: s = "Miniupnpc Invalid response"; break; + case UPNPCOMMAND_HTTP_ERROR: + s = "Miniupnpc HTTP error"; + break; case UPNPDISCOVER_SOCKET_ERROR: s = "Miniupnpc Socket error"; break; case UPNPDISCOVER_MEMORY_ERROR: + case UPNPCOMMAND_MEM_ALLOC_ERROR: s = "Miniupnpc Memory allocation error"; break; case 401: diff --git a/thirdparty/miniupnpc/upnperrors.h b/thirdparty/miniupnpc/miniupnpc/upnperrors.h index 8499d9a1c9..8499d9a1c9 100644 --- a/thirdparty/miniupnpc/upnperrors.h +++ b/thirdparty/miniupnpc/miniupnpc/upnperrors.h diff --git a/thirdparty/miniupnpc/upnpreplyparse.c b/thirdparty/miniupnpc/miniupnpc/upnpreplyparse.c index 68a47c0278..4d06f0585d 100644 --- a/thirdparty/miniupnpc/upnpreplyparse.c +++ b/thirdparty/miniupnpc/miniupnpc/upnpreplyparse.c @@ -1,8 +1,8 @@ -/* $Id: upnpreplyparse.c,v 1.19 2015/07/15 10:29:11 nanard Exp $ */ +/* $Id: upnpreplyparse.c,v 1.20 2017/12/12 11:26:25 nanard Exp $ */ /* vim: tabstop=4 shiftwidth=4 noexpandtab * MiniUPnP project * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ - * (c) 2006-2017 Thomas Bernard + * (c) 2006-2019 Thomas Bernard * This software is subject to the conditions detailed * in the LICENCE file provided within the distribution */ @@ -78,6 +78,7 @@ NameValueParserGetData(void * d, const char * datas, int l) if(strcmp(data->curelt, "NewPortListing") == 0) { /* specific case for NewPortListing which is a XML Document */ + free(data->portListing); data->portListing = malloc(l + 1); if(!data->portListing) { diff --git a/thirdparty/miniupnpc/upnpreplyparse.h b/thirdparty/miniupnpc/miniupnpc/upnpreplyparse.h index 6badd15b26..6badd15b26 100644 --- a/thirdparty/miniupnpc/upnpreplyparse.h +++ b/thirdparty/miniupnpc/miniupnpc/upnpreplyparse.h diff --git a/thirdparty/miniupnpc/miniwget.h b/thirdparty/miniupnpc/miniwget.h deleted file mode 100644 index f5572c2544..0000000000 --- a/thirdparty/miniupnpc/miniwget.h +++ /dev/null @@ -1,27 +0,0 @@ -/* $Id: miniwget.h,v 1.12 2016/01/24 17:24:36 nanard Exp $ */ -/* Project : miniupnp - * Author : Thomas Bernard - * Copyright (c) 2005-2016 Thomas Bernard - * This software is subject to the conditions detailed in the - * LICENCE file provided in this distribution. - * */ -#ifndef MINIWGET_H_INCLUDED -#define MINIWGET_H_INCLUDED - -#include "miniupnpc_declspec.h" - -#ifdef __cplusplus -extern "C" { -#endif - -MINIUPNP_LIBSPEC void * miniwget(const char *, int *, unsigned int, int *); - -MINIUPNP_LIBSPEC void * miniwget_getaddr(const char *, int *, char *, int, unsigned int, int *); - -int parseURL(const char *, char *, unsigned short *, char * *, unsigned int *); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/thirdparty/miniupnpc/upnpcommands.h b/thirdparty/miniupnpc/upnpcommands.h deleted file mode 100644 index 0c6d501666..0000000000 --- a/thirdparty/miniupnpc/upnpcommands.h +++ /dev/null @@ -1,348 +0,0 @@ -/* $Id: upnpcommands.h,v 1.32 2018/03/13 23:34:47 nanard Exp $ */ -/* Miniupnp project : http://miniupnp.free.fr/ - * Author : Thomas Bernard - * Copyright (c) 2005-2018 Thomas Bernard - * This software is subject to the conditions detailed in the - * LICENCE file provided within this distribution */ -#ifndef UPNPCOMMANDS_H_INCLUDED -#define UPNPCOMMANDS_H_INCLUDED - -#include "miniupnpc_declspec.h" -#include "miniupnpctypes.h" - -/* MiniUPnPc return codes : */ -#define UPNPCOMMAND_SUCCESS (0) -#define UPNPCOMMAND_UNKNOWN_ERROR (-1) -#define UPNPCOMMAND_INVALID_ARGS (-2) -#define UPNPCOMMAND_HTTP_ERROR (-3) -#define UPNPCOMMAND_INVALID_RESPONSE (-4) -#define UPNPCOMMAND_MEM_ALLOC_ERROR (-5) - -#ifdef __cplusplus -extern "C" { -#endif - -struct PortMappingParserData; - -MINIUPNP_LIBSPEC UNSIGNED_INTEGER -UPNP_GetTotalBytesSent(const char * controlURL, - const char * servicetype); - -MINIUPNP_LIBSPEC UNSIGNED_INTEGER -UPNP_GetTotalBytesReceived(const char * controlURL, - const char * servicetype); - -MINIUPNP_LIBSPEC UNSIGNED_INTEGER -UPNP_GetTotalPacketsSent(const char * controlURL, - const char * servicetype); - -MINIUPNP_LIBSPEC UNSIGNED_INTEGER -UPNP_GetTotalPacketsReceived(const char * controlURL, - const char * servicetype); - -/* UPNP_GetStatusInfo() - * status and lastconnerror are 64 byte buffers - * Return values : - * UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR - * or a UPnP Error code */ -MINIUPNP_LIBSPEC int -UPNP_GetStatusInfo(const char * controlURL, - const char * servicetype, - char * status, - unsigned int * uptime, - char * lastconnerror); - -/* UPNP_GetConnectionTypeInfo() - * argument connectionType is a 64 character buffer - * Return Values : - * UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR - * or a UPnP Error code */ -MINIUPNP_LIBSPEC int -UPNP_GetConnectionTypeInfo(const char * controlURL, - const char * servicetype, - char * connectionType); - -/* UPNP_GetExternalIPAddress() call the corresponding UPNP method. - * if the third arg is not null the value is copied to it. - * at least 16 bytes must be available - * - * Return values : - * 0 : SUCCESS - * NON ZERO : ERROR Either an UPnP error code or an unknown error. - * - * possible UPnP Errors : - * 402 Invalid Args - See UPnP Device Architecture section on Control. - * 501 Action Failed - See UPnP Device Architecture section on Control. */ -MINIUPNP_LIBSPEC int -UPNP_GetExternalIPAddress(const char * controlURL, - const char * servicetype, - char * extIpAdd); - -/* UPNP_GetLinkLayerMaxBitRates() - * call WANCommonInterfaceConfig:1#GetCommonLinkProperties - * - * return values : - * UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR - * or a UPnP Error Code. */ -MINIUPNP_LIBSPEC int -UPNP_GetLinkLayerMaxBitRates(const char* controlURL, - const char* servicetype, - unsigned int * bitrateDown, - unsigned int * bitrateUp); - -/* UPNP_AddPortMapping() - * if desc is NULL, it will be defaulted to "libminiupnpc" - * remoteHost is usually NULL because IGD don't support it. - * - * Return values : - * 0 : SUCCESS - * NON ZERO : ERROR. Either an UPnP error code or an unknown error. - * - * List of possible UPnP errors for AddPortMapping : - * errorCode errorDescription (short) - Description (long) - * 402 Invalid Args - See UPnP Device Architecture section on Control. - * 501 Action Failed - See UPnP Device Architecture section on Control. - * 606 Action not authorized - The action requested REQUIRES authorization and - * the sender was not authorized. - * 715 WildCardNotPermittedInSrcIP - The source IP address cannot be - * wild-carded - * 716 WildCardNotPermittedInExtPort - The external port cannot be wild-carded - * 718 ConflictInMappingEntry - The port mapping entry specified conflicts - * with a mapping assigned previously to another client - * 724 SamePortValuesRequired - Internal and External port values - * must be the same - * 725 OnlyPermanentLeasesSupported - The NAT implementation only supports - * permanent lease times on port mappings - * 726 RemoteHostOnlySupportsWildcard - RemoteHost must be a wildcard - * and cannot be a specific IP address or DNS name - * 727 ExternalPortOnlySupportsWildcard - ExternalPort must be a wildcard and - * cannot be a specific port value - * 728 NoPortMapsAvailable - There are not enough free ports available to - * complete port mapping. - * 729 ConflictWithOtherMechanisms - Attempted port mapping is not allowed - * due to conflict with other mechanisms. - * 732 WildCardNotPermittedInIntPort - The internal port cannot be wild-carded - */ -MINIUPNP_LIBSPEC int -UPNP_AddPortMapping(const char * controlURL, const char * servicetype, - const char * extPort, - const char * inPort, - const char * inClient, - const char * desc, - const char * proto, - const char * remoteHost, - const char * leaseDuration); - -/* UPNP_AddAnyPortMapping() - * if desc is NULL, it will be defaulted to "libminiupnpc" - * remoteHost is usually NULL because IGD don't support it. - * - * Return values : - * 0 : SUCCESS - * NON ZERO : ERROR. Either an UPnP error code or an unknown error. - * - * List of possible UPnP errors for AddPortMapping : - * errorCode errorDescription (short) - Description (long) - * 402 Invalid Args - See UPnP Device Architecture section on Control. - * 501 Action Failed - See UPnP Device Architecture section on Control. - * 606 Action not authorized - The action requested REQUIRES authorization and - * the sender was not authorized. - * 715 WildCardNotPermittedInSrcIP - The source IP address cannot be - * wild-carded - * 716 WildCardNotPermittedInExtPort - The external port cannot be wild-carded - * 728 NoPortMapsAvailable - There are not enough free ports available to - * complete port mapping. - * 729 ConflictWithOtherMechanisms - Attempted port mapping is not allowed - * due to conflict with other mechanisms. - * 732 WildCardNotPermittedInIntPort - The internal port cannot be wild-carded - */ -MINIUPNP_LIBSPEC int -UPNP_AddAnyPortMapping(const char * controlURL, const char * servicetype, - const char * extPort, - const char * inPort, - const char * inClient, - const char * desc, - const char * proto, - const char * remoteHost, - const char * leaseDuration, - char * reservedPort); - -/* UPNP_DeletePortMapping() - * Use same argument values as what was used for AddPortMapping(). - * remoteHost is usually NULL because IGD don't support it. - * Return Values : - * 0 : SUCCESS - * NON ZERO : error. Either an UPnP error code or an undefined error. - * - * List of possible UPnP errors for DeletePortMapping : - * 402 Invalid Args - See UPnP Device Architecture section on Control. - * 606 Action not authorized - The action requested REQUIRES authorization - * and the sender was not authorized. - * 714 NoSuchEntryInArray - The specified value does not exist in the array */ -MINIUPNP_LIBSPEC int -UPNP_DeletePortMapping(const char * controlURL, const char * servicetype, - const char * extPort, const char * proto, - const char * remoteHost); - -/* UPNP_DeletePortRangeMapping() - * Use same argument values as what was used for AddPortMapping(). - * remoteHost is usually NULL because IGD don't support it. - * Return Values : - * 0 : SUCCESS - * NON ZERO : error. Either an UPnP error code or an undefined error. - * - * List of possible UPnP errors for DeletePortMapping : - * 606 Action not authorized - The action requested REQUIRES authorization - * and the sender was not authorized. - * 730 PortMappingNotFound - This error message is returned if no port - * mapping is found in the specified range. - * 733 InconsistentParameters - NewStartPort and NewEndPort values are not consistent. */ -MINIUPNP_LIBSPEC int -UPNP_DeletePortMappingRange(const char * controlURL, const char * servicetype, - const char * extPortStart, const char * extPortEnd, - const char * proto, - const char * manage); - -/* UPNP_GetPortMappingNumberOfEntries() - * not supported by all routers */ -MINIUPNP_LIBSPEC int -UPNP_GetPortMappingNumberOfEntries(const char* controlURL, - const char* servicetype, - unsigned int * num); - -/* UPNP_GetSpecificPortMappingEntry() - * retrieves an existing port mapping - * params : - * in extPort - * in proto - * in remoteHost - * out intClient (16 bytes) - * out intPort (6 bytes) - * out desc (80 bytes) - * out enabled (4 bytes) - * out leaseDuration (16 bytes) - * - * return value : - * UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR - * or a UPnP Error Code. - * - * List of possible UPnP errors for _GetSpecificPortMappingEntry : - * 402 Invalid Args - See UPnP Device Architecture section on Control. - * 501 Action Failed - See UPnP Device Architecture section on Control. - * 606 Action not authorized - The action requested REQUIRES authorization - * and the sender was not authorized. - * 714 NoSuchEntryInArray - The specified value does not exist in the array. - */ -MINIUPNP_LIBSPEC int -UPNP_GetSpecificPortMappingEntry(const char * controlURL, - const char * servicetype, - const char * extPort, - const char * proto, - const char * remoteHost, - char * intClient, - char * intPort, - char * desc, - char * enabled, - char * leaseDuration); - -/* UPNP_GetGenericPortMappingEntry() - * params : - * in index - * out extPort (6 bytes) - * out intClient (16 bytes) - * out intPort (6 bytes) - * out protocol (4 bytes) - * out desc (80 bytes) - * out enabled (4 bytes) - * out rHost (64 bytes) - * out duration (16 bytes) - * - * return value : - * UPNPCOMMAND_SUCCESS, UPNPCOMMAND_INVALID_ARGS, UPNPCOMMAND_UNKNOWN_ERROR - * or a UPnP Error Code. - * - * Possible UPNP Error codes : - * 402 Invalid Args - See UPnP Device Architecture section on Control. - * 606 Action not authorized - The action requested REQUIRES authorization - * and the sender was not authorized. - * 713 SpecifiedArrayIndexInvalid - The specified array index is out of bounds - */ -MINIUPNP_LIBSPEC int -UPNP_GetGenericPortMappingEntry(const char * controlURL, - const char * servicetype, - const char * index, - char * extPort, - char * intClient, - char * intPort, - char * protocol, - char * desc, - char * enabled, - char * rHost, - char * duration); - -/* UPNP_GetListOfPortMappings() Available in IGD v2 - * - * - * Possible UPNP Error codes : - * 606 Action not Authorized - * 730 PortMappingNotFound - no port mapping is found in the specified range. - * 733 InconsistantParameters - NewStartPort and NewEndPort values are not - * consistent. - */ -MINIUPNP_LIBSPEC int -UPNP_GetListOfPortMappings(const char * controlURL, - const char * servicetype, - const char * startPort, - const char * endPort, - const char * protocol, - const char * numberOfPorts, - struct PortMappingParserData * data); - -/* IGD:2, functions for service WANIPv6FirewallControl:1 */ -MINIUPNP_LIBSPEC int -UPNP_GetFirewallStatus(const char * controlURL, - const char * servicetype, - int * firewallEnabled, - int * inboundPinholeAllowed); - -MINIUPNP_LIBSPEC int -UPNP_GetOutboundPinholeTimeout(const char * controlURL, const char * servicetype, - const char * remoteHost, - const char * remotePort, - const char * intClient, - const char * intPort, - const char * proto, - int * opTimeout); - -MINIUPNP_LIBSPEC int -UPNP_AddPinhole(const char * controlURL, const char * servicetype, - const char * remoteHost, - const char * remotePort, - const char * intClient, - const char * intPort, - const char * proto, - const char * leaseTime, - char * uniqueID); - -MINIUPNP_LIBSPEC int -UPNP_UpdatePinhole(const char * controlURL, const char * servicetype, - const char * uniqueID, - const char * leaseTime); - -MINIUPNP_LIBSPEC int -UPNP_DeletePinhole(const char * controlURL, const char * servicetype, const char * uniqueID); - -MINIUPNP_LIBSPEC int -UPNP_CheckPinholeWorking(const char * controlURL, const char * servicetype, - const char * uniqueID, int * isWorking); - -MINIUPNP_LIBSPEC int -UPNP_GetPinholePackets(const char * controlURL, const char * servicetype, - const char * uniqueID, int * packets); - -#ifdef __cplusplus -} -#endif - -#endif - |