diff --git a/README.md b/README.md index 7563e3ab94e..6e522eef4d1 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ **[Godot Engine](https://godotengine.org) is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface.** It provides a -comprehensive set of common tools, so that users can focus on making games -without having to reinvent the wheel. Games can be exported in one click to a +comprehensive set of [common tools](https://godotengine.org/features), so that users can focus on making games +without having to reinvent the wheel. Games can be exported with one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms (HTML5) and @@ -19,18 +19,19 @@ Windows), mobile platforms (Android, iOS), as well as Web-based platforms ## Free, open source and community-driven -Godot is completely free and open source under the very permissive MIT license. +Godot is completely free and open source under the very permissive [MIT license](https://godotengine.org/license). No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the [Software Freedom Conservancy](https://sfconservancy.org/) not-for-profit. -Before being open sourced in February 2014, Godot had been developed by Juan -Linietsky and Ariel Manzur (both still maintaining the project) for several +Before being open sourced in [February 2014](https://github.com/godotengine/godot/commit/0b806ee0fc9097fa7bda7ac0109191c9c5e0a1ac), +Godot had been developed by [Juan Linietsky](https://github.com/reduz) and +[Ariel Manzur](https://github.com/punto-) (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles. -![Screenshot of a 3D scene in Godot Engine](https://raw.githubusercontent.com/godotengine/godot-design/master/screenshots/editor_tps_demo_1920x1080.jpg) +![Screenshot of a 3D scene in the Godot Engine editor](https://raw.githubusercontent.com/godotengine/godot-design/master/screenshots/editor_tps_demo_1920x1080.jpg) ## Getting the engine @@ -49,7 +50,7 @@ for compilation instructions for every supported platform. Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed [on the homepage](https://godotengine.org/community). -To get in touch with the engine developers, the best way is to join the +The best way to get in touch with the core engine developers is to join the [Godot Contributors Chat](https://chat.godotengine.org). To get started contributing to the project, see the [contributing guide](CONTRIBUTING.md). @@ -62,8 +63,8 @@ It is maintained by the Godot community in its own [GitHub repository](https://g The [class reference](https://docs.godotengine.org/en/latest/classes/) is also accessible from the Godot editor. -The official demos are maintained in their own [GitHub repository](https://github.com/godotengine/godot-demo-projects) -as well. +We also maintain official demos in their own [GitHub repository](https://github.com/godotengine/godot-demo-projects) +as well as a list of [awesome Godot community resources](https://github.com/godotengine/awesome-godot). There are also a number of other [learning resources](https://docs.godotengine.org/en/latest/community/tutorials.html) diff --git a/core/os/os.cpp b/core/os/os.cpp index b71a1d897cc..0d056078825 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -673,6 +673,15 @@ bool OS::has_feature(const String &p_feature) { if (p_feature == "riscv") { return true; } +#elif defined(__powerpc__) +#if defined(__powerpc64__) + if (p_feature == "ppc64") { + return true; + } +#endif + if (p_feature == "ppc") { + return true; + } #endif if (_check_internal_feature_support(p_feature)) { diff --git a/core/ustring.cpp b/core/ustring.cpp index 02bc0417950..3013aa8bbc5 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -42,6 +42,7 @@ #include "core/translation.h" #include "core/ucaps.h" #include "core/variant.h" +#include "core/version_generated.gen.h" #include #include @@ -4128,7 +4129,7 @@ String String::property_name_encode() const { // as well as '"', '=' or ' ' (32) const CharType *cstr = c_str(); for (int i = 0; cstr[i]; i++) { - if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] < 33 || cstr[i] > 126) { + if (cstr[i] == '=' || cstr[i] == '"' || cstr[i] == ';' || cstr[i] == '[' || cstr[i] == ']' || cstr[i] < 33 || cstr[i] > 126) { return "\"" + c_escape_multiline() + "\""; } } @@ -4498,15 +4499,19 @@ String TTR(const String &p_text) { return p_text; } +/* DTR is used for the documentation, handling descriptions extracted from the XML. + * It also replaces `$DOCS_URL` with the actual URL to the documentation's branch, + * to allow dehardcoding it in the XML and doing proper substitutions everywhere. + */ String DTR(const String &p_text) { // Comes straight from the XML, so remove indentation and any trailing whitespace. const String text = p_text.dedent().strip_edges(); if (TranslationServer::get_singleton()) { - return TranslationServer::get_singleton()->doc_translate(text); + return String(TranslationServer::get_singleton()->doc_translate(text)).replace("$DOCS_URL", VERSION_DOCS_URL); } - return text; + return text.replace("$DOCS_URL", VERSION_DOCS_URL); } #endif diff --git a/core/ustring.h b/core/ustring.h index bdc75c7a849..bec9163674a 100644 --- a/core/ustring.h +++ b/core/ustring.h @@ -45,11 +45,15 @@ class CharProxy { CowData &_cowdata; static const T _null = 0; - _FORCE_INLINE_ CharProxy(const int &p_index, CowData &cowdata) : + _FORCE_INLINE_ CharProxy(const int &p_index, CowData &p_cowdata) : _index(p_index), - _cowdata(cowdata) {} + _cowdata(p_cowdata) {} public: + _FORCE_INLINE_ CharProxy(const CharProxy &p_other) : + _index(p_other._index), + _cowdata(p_other._cowdata) {} + _FORCE_INLINE_ operator T() const { if (unlikely(_index == _cowdata.size())) { return _null; @@ -62,12 +66,12 @@ public: return _cowdata.ptr() + _index; } - _FORCE_INLINE_ void operator=(const T &other) const { - _cowdata.set(_index, other); + _FORCE_INLINE_ void operator=(const T &p_other) const { + _cowdata.set(_index, p_other); } - _FORCE_INLINE_ void operator=(const CharProxy &other) const { - _cowdata.set(_index, other.operator T()); + _FORCE_INLINE_ void operator=(const CharProxy &p_other) const { + _cowdata.set(_index, p_other.operator T()); } }; diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 12f36bab4e1..4a44cf641c0 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -245,6 +245,7 @@ struct _VariantCall { VCALL_LOCALMEM3R(String, count); VCALL_LOCALMEM3R(String, countn); VCALL_LOCALMEM2R(String, substr); + VCALL_LOCALMEM2R(String, get_slice); VCALL_LOCALMEM2R(String, find); VCALL_LOCALMEM1R(String, find_last); VCALL_LOCALMEM2R(String, findn); @@ -1633,6 +1634,7 @@ void register_variant_methods() { ADDFUNC1R(STRING, INT, String, naturalnocasecmp_to, STRING, "to", varray()); ADDFUNC0R(STRING, INT, String, length, varray()); ADDFUNC2R(STRING, STRING, String, substr, INT, "from", INT, "len", varray(-1)); + ADDFUNC2R(STRING, STRING, String, get_slice, STRING, "delimiter", INT, "slice", varray()); ADDFUNC2R(STRING, INT, String, find, STRING, "what", INT, "from", varray(0)); diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index d2435cb229a..8bcce70f871 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -9,9 +9,9 @@ [b]Note:[/b] Unlike [Rect2], [AABB] does not have a variant that uses integer coordinates. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html - https://docs.godotengine.org/en/3.4/tutorials/math/vector_math.html - https://docs.godotengine.org/en/3.4/tutorials/math/vectors_advanced.html + $DOCS_URL/tutorials/math/index.html + $DOCS_URL/tutorials/math/vector_math.html + $DOCS_URL/tutorials/math/vectors_advanced.html @@ -39,7 +39,14 @@ - Returns this [AABB] expanded to include a given point. + Returns a copy of this [AABB] expanded to include a given point. + [b]Example:[/b] + [codeblock] + # position (-3, 2, 0), size (1, 1, 1) + var box = AABB(Vector3(-3, 2, 0), Vector3(1, 1, 1)) + # position (-3, -1, 0), size (3, 4, 2), so we fit both the original AABB and Vector3(0, -1, 2) + var box2 = box.expand(Vector3(0, -1, 2)) + [/codeblock] diff --git a/doc/classes/ARVRCamera.xml b/doc/classes/ARVRCamera.xml index ff12438d653..6993093ead7 100644 --- a/doc/classes/ARVRCamera.xml +++ b/doc/classes/ARVRCamera.xml @@ -8,7 +8,7 @@ The position and orientation of this node is automatically updated by the ARVR Server to represent the location of the HMD if such tracking is available and can thus be used by game logic. Note that, in contrast to the ARVR Controller, the render thread has access to the most up-to-date tracking data of the HMD and the location of the ARVRCamera can lag a few milliseconds behind what is used for rendering as a result. - https://docs.godotengine.org/en/3.4/tutorials/vr/index.html + $DOCS_URL/tutorials/vr/index.html diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index 758a0f74ccc..642eb9d3b31 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -9,7 +9,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/vr/index.html + $DOCS_URL/tutorials/vr/index.html diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index 2774bbc85ed..91a9b2d8d3b 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -8,7 +8,7 @@ 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]. - https://docs.godotengine.org/en/3.4/tutorials/vr/index.html + $DOCS_URL/tutorials/vr/index.html diff --git a/doc/classes/ARVROrigin.xml b/doc/classes/ARVROrigin.xml index 36178b5b185..0725e5f23dc 100644 --- a/doc/classes/ARVROrigin.xml +++ b/doc/classes/ARVROrigin.xml @@ -10,7 +10,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/vr/index.html + $DOCS_URL/tutorials/vr/index.html diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml index 93455ab2932..73abb6d34ad 100644 --- a/doc/classes/ARVRPositionalTracker.xml +++ b/doc/classes/ARVRPositionalTracker.xml @@ -9,7 +9,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/vr/index.html + $DOCS_URL/tutorials/vr/index.html diff --git a/doc/classes/ARVRServer.xml b/doc/classes/ARVRServer.xml index 14e6f561abf..a02ce6b575f 100644 --- a/doc/classes/ARVRServer.xml +++ b/doc/classes/ARVRServer.xml @@ -7,7 +7,7 @@ The AR/VR server is the heart of our Advanced and Virtual Reality solution and handles all the processing. - https://docs.godotengine.org/en/3.4/tutorials/vr/index.html + $DOCS_URL/tutorials/vr/index.html diff --git a/doc/classes/AnimatedSprite.xml b/doc/classes/AnimatedSprite.xml index 9b34669bcc5..6c7049b7edd 100644 --- a/doc/classes/AnimatedSprite.xml +++ b/doc/classes/AnimatedSprite.xml @@ -8,7 +8,7 @@ [b]Note:[/b] You can associate a set of normal maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] suffix. For example, having 2 [SpriteFrames] resources [code]run[/code] and [code]run_normal[/code] will make it so the [code]run[/code] animation uses the normal map. - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_sprite_animation.html + $DOCS_URL/tutorials/2d/2d_sprite_animation.html https://godotengine.org/asset-library/asset/515 diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 12d7c212708..849c1098ff7 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -7,7 +7,7 @@ Animations are created using a [SpriteFrames] resource, which can be configured in the editor via the SpriteFrames panel. - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_sprite_animation.html + $DOCS_URL/tutorials/2d/2d_sprite_animation.html diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index b118fc90b6a..ee0a3d8aff3 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -17,7 +17,7 @@ Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types. - https://docs.godotengine.org/en/3.4/tutorials/animation/index.html + $DOCS_URL/tutorials/animation/index.html diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index a26fa0a19d0..27f13e465c3 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -8,7 +8,7 @@ Inherit this when creating nodes mainly for use in [AnimationNodeBlendTree], otherwise [AnimationRootNode] should be used instead. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeAdd2.xml b/doc/classes/AnimationNodeAdd2.xml index 2605a361dba..3ee04191013 100644 --- a/doc/classes/AnimationNodeAdd2.xml +++ b/doc/classes/AnimationNodeAdd2.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Blends two animations additively based on an amount value in the [code][0.0, 1.0][/code] range. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeAdd3.xml b/doc/classes/AnimationNodeAdd3.xml index 24b8af88c2c..0e9be2cb598 100644 --- a/doc/classes/AnimationNodeAdd3.xml +++ b/doc/classes/AnimationNodeAdd3.xml @@ -11,7 +11,7 @@ - A +add animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationNodeAnimation.xml b/doc/classes/AnimationNodeAnimation.xml index 1c107d0e9dd..dcafb3cc187 100644 --- a/doc/classes/AnimationNodeAnimation.xml +++ b/doc/classes/AnimationNodeAnimation.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Only features one output set using the [member animation] property. Use it as an input for [AnimationNode] that blend animations together. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationNodeBlend2.xml b/doc/classes/AnimationNodeBlend2.xml index 0412d29eec5..84a0a74754f 100644 --- a/doc/classes/AnimationNodeBlend2.xml +++ b/doc/classes/AnimationNodeBlend2.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. Blends two animations linearly based on an amount value in the [code][0.0, 1.0][/code] range. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationNodeBlend3.xml b/doc/classes/AnimationNodeBlend3.xml index b831ce7478b..37462da6ae7 100644 --- a/doc/classes/AnimationNodeBlend3.xml +++ b/doc/classes/AnimationNodeBlend3.xml @@ -11,7 +11,7 @@ - A +blend animation to blend with when the blend amount is in the [code][0.0, 1.0][/code] range - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index 1f715778005..dc5df500721 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -10,7 +10,7 @@ You can set the extents of the axis using the [member min_space] and [member max_space]. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index d7cc97c2cee..d289dcc2b5d 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -9,7 +9,7 @@ You can add vertices to the blend space with [method add_blend_point] and automatically triangulate it by setting [member auto_triangles] to [code]true[/code]. Otherwise, use [method add_triangle] and [method remove_triangle] to create up the blend space by hand. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index cb4cf3211eb..7086dec7658 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -7,7 +7,7 @@ This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index d51473624d6..70cd76e78a0 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -7,7 +7,7 @@ A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationNodeOutput.xml b/doc/classes/AnimationNodeOutput.xml index ebd65429d88..14d9665b75f 100644 --- a/doc/classes/AnimationNodeOutput.xml +++ b/doc/classes/AnimationNodeOutput.xml @@ -6,7 +6,7 @@ - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index dda15e5a4e5..afd7e246c84 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -12,7 +12,7 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index 9e4f2902307..698a7972c22 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -12,7 +12,7 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 33c058e3369..5a422b56409 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -5,13 +5,13 @@ - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html - 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/3.4/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: + 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=$DOCS_URL/tutorials/animation/animation_tree.html#controlling-from-code][/url]). For example, if [member AnimationTree.tree_root] is an [AnimationNodeStateMachine] and [member advance_condition] is set to [code]"idle"[/code]: [codeblock] $animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0) [/codeblock] diff --git a/doc/classes/AnimationNodeTimeScale.xml b/doc/classes/AnimationNodeTimeScale.xml index 220ccbdfa59..cd555264036 100644 --- a/doc/classes/AnimationNodeTimeScale.xml +++ b/doc/classes/AnimationNodeTimeScale.xml @@ -7,7 +7,7 @@ Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/125 diff --git a/doc/classes/AnimationNodeTimeSeek.xml b/doc/classes/AnimationNodeTimeSeek.xml index 70b66c05f68..e3bff363710 100644 --- a/doc/classes/AnimationNodeTimeSeek.xml +++ b/doc/classes/AnimationNodeTimeSeek.xml @@ -18,7 +18,7 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index a7f963ccca5..08ce9aaaca4 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -7,7 +7,7 @@ Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index db9cc30399a..fb55cdf716c 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -9,8 +9,8 @@ Updating the target properties of animations occurs at process time. - https://docs.godotengine.org/en/3.4/tutorials/animation/index.html - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_sprite_animation.html + $DOCS_URL/tutorials/animation/index.html + $DOCS_URL/tutorials/2d/2d_sprite_animation.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index 53f61e841fd..80f68ded1f6 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -8,7 +8,7 @@ [b]Note:[/b] When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index 97b2bda9680..66271ab2729 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -9,7 +9,7 @@ See [AnimationTree] for a more full-featured replacement of this node. - https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html + $DOCS_URL/tutorials/animation/animation_tree.html diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index eefc5127ff1..de313d0f442 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -7,7 +7,7 @@ 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping) and route audio to a custom audio bus. - https://docs.godotengine.org/en/3.4/tutorials/physics/using_area_2d.html + $DOCS_URL/tutorials/physics/using_area_2d.html https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/121 https://godotengine.org/asset-library/asset/120 diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index f212406b37d..9255c96900e 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -26,7 +26,7 @@ [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. - https://docs.godotengine.org/en/3.4/tutorials/content/procedural_geometry/arraymesh.html + $DOCS_URL/tutorials/content/procedural_geometry/arraymesh.html diff --git a/doc/classes/AudioEffectDistortion.xml b/doc/classes/AudioEffectDistortion.xml index 56dc9318d63..eefc4d4a872 100644 --- a/doc/classes/AudioEffectDistortion.xml +++ b/doc/classes/AudioEffectDistortion.xml @@ -9,7 +9,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_buses.html + $DOCS_URL/tutorials/audio/audio_buses.html diff --git a/doc/classes/AudioEffectFilter.xml b/doc/classes/AudioEffectFilter.xml index 65a4e330f7f..927c972d376 100644 --- a/doc/classes/AudioEffectFilter.xml +++ b/doc/classes/AudioEffectFilter.xml @@ -7,7 +7,7 @@ Allows frequencies other than the [member cutoff_hz] to pass. - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_buses.html + $DOCS_URL/tutorials/audio/audio_buses.html diff --git a/doc/classes/AudioEffectHighShelfFilter.xml b/doc/classes/AudioEffectHighShelfFilter.xml index 95bdd22c187..ad8b1341d28 100644 --- a/doc/classes/AudioEffectHighShelfFilter.xml +++ b/doc/classes/AudioEffectHighShelfFilter.xml @@ -6,7 +6,7 @@ - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_buses.html + $DOCS_URL/tutorials/audio/audio_buses.html diff --git a/doc/classes/AudioEffectLowShelfFilter.xml b/doc/classes/AudioEffectLowShelfFilter.xml index 5a7bbc2b109..311c682fc04 100644 --- a/doc/classes/AudioEffectLowShelfFilter.xml +++ b/doc/classes/AudioEffectLowShelfFilter.xml @@ -6,7 +6,7 @@ - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_buses.html + $DOCS_URL/tutorials/audio/audio_buses.html diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index bf884bc74e6..316e3aabfe5 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -7,7 +7,7 @@ Allows the user to record sound from a microphone. It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample. - https://docs.godotengine.org/en/3.4/tutorials/audio/recording_with_microphone.html + $DOCS_URL/tutorials/audio/recording_with_microphone.html https://godotengine.org/asset-library/asset/527 diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index c82b88b68db..d07be409a09 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -7,7 +7,7 @@ [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. - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_buses.html + $DOCS_URL/tutorials/audio/audio_buses.html https://godotengine.org/asset-library/asset/525 https://godotengine.org/asset-library/asset/527 https://godotengine.org/asset-library/asset/528 diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index 3f64b63cb67..efa08bcc27d 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -7,7 +7,7 @@ Base class for audio streams. Audio streams are used for sound effects and music playback, and support WAV (via [AudioStreamSample]) and OGG (via [AudioStreamOGGVorbis]) file formats. - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_streams.html + $DOCS_URL/tutorials/audio/audio_streams.html https://godotengine.org/asset-library/asset/526 https://godotengine.org/asset-library/asset/527 https://godotengine.org/asset-library/asset/528 diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 821b3a0356b..2bc43a2caee 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -8,7 +8,7 @@ To play audio positionally, use [AudioStreamPlayer2D] or [AudioStreamPlayer3D] instead of [AudioStreamPlayer]. - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_streams.html + $DOCS_URL/tutorials/audio/audio_streams.html https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/525 https://godotengine.org/asset-library/asset/526 diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index fd5e2c32548..36d97c6528c 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -9,7 +9,7 @@ [b]Note:[/b] Hiding an [AudioStreamPlayer2D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer2D]'s audio output, set [member volume_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing). - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_streams.html + $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 2bf0863b0cf..f944e1a46d1 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -10,7 +10,7 @@ [b]Note:[/b] Hiding an [AudioStreamPlayer3D] node does not disable its audio output. To temporarily disable an [AudioStreamPlayer3D]'s audio output, set [member unit_db] to a very low value like [code]-100[/code] (which isn't audible to human hearing). - https://docs.godotengine.org/en/3.4/tutorials/audio/audio_streams.html + $DOCS_URL/tutorials/audio/audio_streams.html diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml index aa8ce562e26..9d7adda94f6 100644 --- a/doc/classes/BakedLightmap.xml +++ b/doc/classes/BakedLightmap.xml @@ -9,7 +9,7 @@ [b]Note:[/b] Due to how lightmaps work, most properties only have a visible effect once lightmaps are baked again. - https://docs.godotengine.org/en/3.4/tutorials/3d/baked_lightmaps.html + $DOCS_URL/tutorials/3d/baked_lightmaps.html diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 32d362a73d2..52a3d126977 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -10,9 +10,9 @@ For more information, read the "Matrices and transforms" documentation article. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html - https://docs.godotengine.org/en/3.4/tutorials/math/matrices_and_transforms.html - https://docs.godotengine.org/en/3.4/tutorials/3d/using_transforms.html + $DOCS_URL/tutorials/math/index.html + $DOCS_URL/tutorials/math/matrices_and_transforms.html + $DOCS_URL/tutorials/3d/using_transforms.html https://godotengine.org/asset-library/asset/584 https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 4b17f0d1ebe..fd4de2d871e 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -9,7 +9,7 @@ [b]Note:[/b] Unlike [Particles2D], the visibility rect is generated on-the-fly and doesn't need to be configured by the user. - https://docs.godotengine.org/en/3.4/tutorials/2d/particle_systems_2d.html + $DOCS_URL/tutorials/2d/particle_systems_2d.html diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 0cc88c4eccd..5353263af2f 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -12,8 +12,8 @@ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_transforms.html - https://docs.godotengine.org/en/3.4/tutorials/2d/custom_drawing_in_2d.html + $DOCS_URL/tutorials/2d/2d_transforms.html + $DOCS_URL/tutorials/2d/custom_drawing_in_2d.html https://godotengine.org/asset-library/asset/528 diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index 6722453d88e..d1964794055 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -7,8 +7,8 @@ Canvas drawing layer. [CanvasItem] nodes that are direct or indirect children of a [CanvasLayer] will be drawn in that layer. The layer is a numeric index that defines the draw order. The default 2D scene renders with index 0, so a [CanvasLayer] with index -1 will be drawn below, and one with index 1 will be drawn above. This is very useful for HUDs (in layer 1+ or above), or backgrounds (in layer -1 or below). - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_transforms.html - https://docs.godotengine.org/en/3.4/tutorials/2d/canvas_layers.html + $DOCS_URL/tutorials/2d/2d_transforms.html + $DOCS_URL/tutorials/2d/canvas_layers.html https://godotengine.org/asset-library/asset/515 diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index 239ba8cb9af..d8b59742ba7 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -7,7 +7,7 @@ By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect]. - https://docs.godotengine.org/en/3.4/tutorials/gui/bbcode_in_richtextlabel.html + $DOCS_URL/tutorials/gui/bbcode_in_richtextlabel.html https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project diff --git a/doc/classes/ClippedCamera.xml b/doc/classes/ClippedCamera.xml index 8d95698abae..ed8ab25c411 100644 --- a/doc/classes/ClippedCamera.xml +++ b/doc/classes/ClippedCamera.xml @@ -75,7 +75,7 @@ If [code]true[/code], the camera stops on contact with [PhysicsBody]s. - The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The camera's collision mask. Only objects in at least one collision layer matching the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The camera's collision margin. The camera can't get closer than this distance to a colliding object. diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml index e9dba9ec034..fde905d92fb 100644 --- a/doc/classes/CollisionObject.xml +++ b/doc/classes/CollisionObject.xml @@ -172,11 +172,11 @@ The physics layers this CollisionObject3D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. - [b]Note:[/b] 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + [b]Note:[/b] 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 [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. - [b]Note:[/b] 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + [b]Note:[/b] 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 [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. If [code]true[/code], the [CollisionObject] will continue to receive input events as the mouse is dragged across its shapes. diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 0d8a58306e4..908cda2b958 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -200,11 +200,11 @@ The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. - [b]Note:[/b] 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + [b]Note:[/b] 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 [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. - [b]Note:[/b] 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 [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + [b]Note:[/b] 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 [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. 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. diff --git a/doc/classes/CollisionShape.xml b/doc/classes/CollisionShape.xml index 9d562fa66e5..1ead0746950 100644 --- a/doc/classes/CollisionShape.xml +++ b/doc/classes/CollisionShape.xml @@ -7,7 +7,7 @@ Editor facility for creating and editing collision shapes in 3D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area] to give it a detection shape, or add it to a [PhysicsBody] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject.shape_owner_get_shape] to get the actual shape. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/physics_introduction.html https://godotengine.org/asset-library/asset/126 https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 0704b7ef185..2d03328ba64 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -7,7 +7,7 @@ Editor facility for creating and editing collision shapes in 2D space. You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/physics_introduction.html https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/121 https://godotengine.org/asset-library/asset/113 diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 7daba821d41..4d598b1291d 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -14,9 +14,9 @@ [b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use [method get_color], [method get_constant], [method get_font], [method get_icon], [method get_stylebox], and the [code]add_*_override[/code] methods provided by this class. - https://docs.godotengine.org/en/3.4/tutorials/gui/index.html - https://docs.godotengine.org/en/3.4/tutorials/2d/custom_drawing_in_2d.html - https://docs.godotengine.org/en/3.4/tutorials/gui/control_node_gallery.html + $DOCS_URL/tutorials/gui/index.html + $DOCS_URL/tutorials/2d/custom_drawing_in_2d.html + $DOCS_URL/tutorials/gui/control_node_gallery.html https://github.com/godotengine/godot-demo-projects/tree/master/gui @@ -790,7 +790,7 @@ The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value. - [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/3.4/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. + [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=$DOCS_URL/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. [b]Note:[/b] If the Control node is a child of a [Container] node, the scale will be reset to [code]Vector2(1, 1)[/code] when the scene is instanced. To set the Control's scale when it's instanced, wait for one frame using [code]yield(get_tree(), "idle_frame")[/code] then set its [member rect_scale] property. diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 50fdf7b7a4a..dad53201fc4 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -84,7 +84,7 @@ [b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary itself can still be mutated by defining the values of individual keys. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized. - https://docs.godotengine.org/en/3.4/getting_started/scripting/gdscript/gdscript_basics.html#dictionary + $DOCS_URL/getting_started/scripting/gdscript/gdscript_basics.html#dictionary https://godotengine.org/asset-library/asset/676 https://godotengine.org/asset-library/asset/677 diff --git a/doc/classes/DirectionalLight.xml b/doc/classes/DirectionalLight.xml index 18e5b61dea0..3997d7ae484 100644 --- a/doc/classes/DirectionalLight.xml +++ b/doc/classes/DirectionalLight.xml @@ -7,7 +7,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/3d/lights_and_shadows.html + $DOCS_URL/tutorials/3d/lights_and_shadows.html diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 2ad7ee1dbbb..8d1aea21fa3 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -25,7 +25,7 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/getting_started/step_by_step/filesystem.html + $DOCS_URL/getting_started/step_by_step/filesystem.html diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index f6ab62c5b1c..13d25635431 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -48,7 +48,7 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/tutorials/plugins/editor/import_plugins.html + $DOCS_URL/tutorials/plugins/editor/import_plugins.html diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index a599e7d656a..221f7c6b9f6 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -13,7 +13,7 @@ On each of these calls, the "add" functions can be called. - https://docs.godotengine.org/en/3.4/tutorials/plugins/editor/inspector_plugins.html + $DOCS_URL/tutorials/plugins/editor/inspector_plugins.html diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 28a52b22ae5..1c4d42603f3 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -7,7 +7,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/plugins/editor/index.html + $DOCS_URL/tutorials/plugins/editor/index.html diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 5040fe5fcb1..745378b8d22 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -26,7 +26,7 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/getting_started/workflow/assets/importing_scenes.html#custom-script + $DOCS_URL/getting_started/workflow/assets/importing_scenes.html#custom-script diff --git a/doc/classes/EditorSpatialGizmoPlugin.xml b/doc/classes/EditorSpatialGizmoPlugin.xml index 169fde9f9eb..fde6716b542 100644 --- a/doc/classes/EditorSpatialGizmoPlugin.xml +++ b/doc/classes/EditorSpatialGizmoPlugin.xml @@ -7,7 +7,7 @@ EditorSpatialGizmoPlugin allows you to define a new type of Gizmo. There are two main ways to do so: extending [EditorSpatialGizmoPlugin] for the simpler gizmos, or creating a new [EditorSpatialGizmo] type. See the tutorial in the documentation for more info. - https://docs.godotengine.org/en/3.4/tutorials/plugins/editor/spatial_gizmos.html + $DOCS_URL/tutorials/plugins/editor/spatial_gizmos.html diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index 69fa43db8a6..1ce7c9f5aa5 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -146,7 +146,7 @@ else: simulate_physics() [/codeblock] - See [url=https://docs.godotengine.org/en/3.4/tutorials/misc/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information. + See [url=$DOCS_URL/tutorials/misc/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information. [b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [code]F5[/code]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project. diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 16ffbe5e144..5b2b9ad555c 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -12,8 +12,8 @@ These effects will only apply when the [Viewport]'s intended usage is "3D" or "3D Without Effects". This can be configured for the root Viewport with [member ProjectSettings.rendering/quality/intended_usage/framebuffer_allocation], or for specific Viewports via the [member Viewport.usage] property. - https://docs.godotengine.org/en/3.4/tutorials/3d/environment_and_post_processing.html - https://docs.godotengine.org/en/3.4/tutorials/3d/high_dynamic_range.html + $DOCS_URL/tutorials/3d/environment_and_post_processing.html + $DOCS_URL/tutorials/3d/high_dynamic_range.html https://godotengine.org/asset-library/asset/123 https://godotengine.org/asset-library/asset/110 https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 93829001b98..6fc54aacf0e 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -20,12 +20,12 @@ file.close() return content [/codeblock] - In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/3.4/tutorials/io/data_paths.html]Data paths[/url] documentation. + In the example above, the file will be saved in the user data folder as specified in the [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] documentation. [b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. [b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals. - https://docs.godotengine.org/en/3.4/getting_started/step_by_step/filesystem.html + $DOCS_URL/getting_started/step_by_step/filesystem.html https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 865b172c4a1..5c3a104ee02 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -12,7 +12,7 @@ [b]Note:[/b] Due to a renderer limitation, emissive [ShaderMaterial]s cannot emit light when used in a [GIProbe]. Only emissive [SpatialMaterial]s can emit light in a [GIProbe]. - https://docs.godotengine.org/en/3.4/tutorials/3d/gi_probes.html + $DOCS_URL/tutorials/3d/gi_probes.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index c06c5552f46..dc18d69d337 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -13,8 +13,8 @@ [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. - https://docs.godotengine.org/en/3.4/tutorials/networking/http_client_class.html - https://docs.godotengine.org/en/3.4/tutorials/networking/ssl_certificates.html + $DOCS_URL/tutorials/networking/http_client_class.html + $DOCS_URL/tutorials/networking/ssl_certificates.html diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index d0861bb51ce..99698c4efd1 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -67,8 +67,8 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/tutorials/networking/http_request_class.html - https://docs.godotengine.org/en/3.4/tutorials/networking/ssl_certificates.html + $DOCS_URL/tutorials/networking/http_request_class.html + $DOCS_URL/tutorials/networking/ssl_certificates.html diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index c45bb45f6a2..32dee0b0959 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -9,7 +9,7 @@ [b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import. - https://docs.godotengine.org/en/3.4/getting_started/workflow/assets/importing_images.html + $DOCS_URL/getting_started/workflow/assets/importing_images.html @@ -259,7 +259,7 @@ - Loads an image from file [code]path[/code]. See [url=https://docs.godotengine.org/en/3.4/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations. + Loads an image from file [code]path[/code]. See [url=$DOCS_URL/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects. See also [ImageTexture] description for usage examples. diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 748af5165c3..3b0e08bc779 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -28,7 +28,7 @@ [b]Note:[/b] The maximum texture size is 16384×16384 pixels due to graphics hardware limitations. - https://docs.godotengine.org/en/3.4/getting_started/workflow/assets/importing_images.html + $DOCS_URL/getting_started/workflow/assets/importing_images.html diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 269b9dd72d1..f6a0a36c98d 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -7,7 +7,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/inputs/index.html + $DOCS_URL/tutorials/inputs/index.html https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 78d4d51ed2c..db4f26809d2 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -7,8 +7,8 @@ Base class of all sort of input event. See [method Node._input]. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_transforms.html + $DOCS_URL/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/2d/2d_transforms.html https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 374bb0300db..cef906cb43d 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -7,7 +7,7 @@ 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]. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html#actions + $DOCS_URL/tutorials/inputs/inputevent.html#actions https://godotengine.org/asset-library/asset/515 https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/InputEventJoypadButton.xml b/doc/classes/InputEventJoypadButton.xml index 8e692721800..4eb558b09f8 100644 --- a/doc/classes/InputEventJoypadButton.xml +++ b/doc/classes/InputEventJoypadButton.xml @@ -7,7 +7,7 @@ Input event type for gamepad buttons. For gamepad analog sticks and joysticks, see [InputEventJoypadMotion]. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/inputs/inputevent.html diff --git a/doc/classes/InputEventJoypadMotion.xml b/doc/classes/InputEventJoypadMotion.xml index 449b90e340c..52518af4b7e 100644 --- a/doc/classes/InputEventJoypadMotion.xml +++ b/doc/classes/InputEventJoypadMotion.xml @@ -7,7 +7,7 @@ Stores information about joystick motions. One [InputEventJoypadMotion] represents one axis at a time. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/inputs/inputevent.html diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index b780b189795..f5a470e0dbf 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -7,7 +7,7 @@ Stores key presses on the keyboard. Supports key presses, key releases and [member echo] events. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/inputs/inputevent.html diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 410c09b2afd..0f6c98f12ef 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -7,7 +7,7 @@ Stores general mouse events information. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/inputs/inputevent.html diff --git a/doc/classes/InputEventMouseButton.xml b/doc/classes/InputEventMouseButton.xml index 3298be67a05..d57ff5ec9b6 100644 --- a/doc/classes/InputEventMouseButton.xml +++ b/doc/classes/InputEventMouseButton.xml @@ -7,7 +7,7 @@ Contains mouse click information. See [method Node._input]. - https://docs.godotengine.org/en/3.4/tutorials/inputs/mouse_and_input_coordinates.html + $DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html diff --git a/doc/classes/InputEventMouseMotion.xml b/doc/classes/InputEventMouseMotion.xml index 6c6a81b1273..7064d6a87c7 100644 --- a/doc/classes/InputEventMouseMotion.xml +++ b/doc/classes/InputEventMouseMotion.xml @@ -8,7 +8,7 @@ [b]Note:[/b] By default, this event is only emitted once per frame rendered at most. If you need more precise input reporting, call [method Input.set_use_accumulated_input] with [code]false[/code] to make events emitted as often as possible. If you use InputEventMouseMotion to draw lines, consider implementing [url=https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm]Bresenham's line algorithm[/url] as well to avoid visible gaps in lines if the user is moving the mouse quickly. - https://docs.godotengine.org/en/3.4/tutorials/inputs/mouse_and_input_coordinates.html + $DOCS_URL/tutorials/inputs/mouse_and_input_coordinates.html https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index 8ff8a759e0b..d8aeb417824 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -7,7 +7,7 @@ Contains screen drag information. See [method Node._input]. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/inputs/inputevent.html diff --git a/doc/classes/InputEventScreenTouch.xml b/doc/classes/InputEventScreenTouch.xml index f6c4457e98d..4e188efe7f7 100644 --- a/doc/classes/InputEventScreenTouch.xml +++ b/doc/classes/InputEventScreenTouch.xml @@ -8,7 +8,7 @@ Stores multi-touch press/release information. Supports touch press, touch release and [member index] for multi-touch count and order. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/inputs/inputevent.html diff --git a/doc/classes/InputEventWithModifiers.xml b/doc/classes/InputEventWithModifiers.xml index 7f2c8079e36..b551a71e060 100644 --- a/doc/classes/InputEventWithModifiers.xml +++ b/doc/classes/InputEventWithModifiers.xml @@ -7,7 +7,7 @@ Contains keys events information with modifiers support like [code]Shift[/code] or [code]Alt[/code]. See [method Node._input]. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html + $DOCS_URL/tutorials/inputs/inputevent.html diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index c782d0366d8..cae76cef16a 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -7,7 +7,7 @@ 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]. - https://docs.godotengine.org/en/3.4/tutorials/inputs/inputevent.html#inputmap + $DOCS_URL/tutorials/inputs/inputevent.html#inputmap diff --git a/doc/classes/JNISingleton.xml b/doc/classes/JNISingleton.xml index 1e00ae224ce..a6faa5ae473 100644 --- a/doc/classes/JNISingleton.xml +++ b/doc/classes/JNISingleton.xml @@ -7,7 +7,7 @@ The JNISingleton is implemented only in the Android export. It's used to call methods and connect signals from an Android plugin written in Java or Kotlin. Methods and signals can be called and connected to the JNISingleton as if it is a Node. See [url=https://en.wikipedia.org/wiki/Java_Native_Interface]Java Native Interface - Wikipedia[/url] for more information. - https://docs.godotengine.org/en/3.4/tutorials/plugins/android/android_plugin.html + $DOCS_URL/tutorials/plugins/android/android_plugin.html diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index 2f71213d429..0d74be689c1 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -5,10 +5,10 @@ The JavaScript singleton is implemented only in the HTML5 export. It's used to access the browser's JavaScript context. This allows interaction with embedding pages or calling third-party JavaScript APIs. - [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=https://docs.godotengine.org/en/3.4/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information. + [b]Note:[/b] This singleton can be disabled at build-time to improve security. By default, the JavaScript singleton is enabled. Official export templates also have the JavaScript singleton enabled. See [url=$DOCS_URL/development/compiling/compiling_for_web.html]Compiling for the Web[/url] in the documentation for more information. - https://docs.godotengine.org/en/3.4/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script + $DOCS_URL/getting_started/workflow/export/exporting_for_web.html#calling-javascript-from-script diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 7390d26a28f..b5893e02f4e 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -9,7 +9,7 @@ [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 don't require advanced physics. - https://docs.godotengine.org/en/3.4/tutorials/physics/kinematic_character_2d.html + $DOCS_URL/tutorials/physics/kinematic_character_2d.html https://godotengine.org/asset-library/asset/126 https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml index 8aaa743653f..32eeb9f317c 100644 --- a/doc/classes/KinematicBody2D.xml +++ b/doc/classes/KinematicBody2D.xml @@ -9,8 +9,8 @@ [b]Kinematic characters:[/b] KinematicBody2D also has an API for moving objects (the [method move_and_collide] and [method move_and_slide] methods) while performing collision tests. This makes them really useful to implement characters that collide against a world, but don't require advanced physics. - https://docs.godotengine.org/en/3.4/tutorials/physics/kinematic_character_2d.html - https://docs.godotengine.org/en/3.4/tutorials/physics/using_kinematic_body_2d.html + $DOCS_URL/tutorials/physics/kinematic_character_2d.html + $DOCS_URL/tutorials/physics/using_kinematic_body_2d.html https://godotengine.org/asset-library/asset/113 https://godotengine.org/asset-library/asset/120 diff --git a/doc/classes/Light.xml b/doc/classes/Light.xml index bba851b1995..f411a618cb3 100644 --- a/doc/classes/Light.xml +++ b/doc/classes/Light.xml @@ -7,7 +7,7 @@ Light is the [i]abstract[/i] base class for light nodes. As it can't be instanced, it shouldn't be used directly. Other types of light nodes inherit from it. Light contains the common variables and parameters used for lighting. - https://docs.godotengine.org/en/3.4/tutorials/3d/lights_and_shadows.html + $DOCS_URL/tutorials/3d/lights_and_shadows.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index 0305fa19e83..7b165639306 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -8,7 +8,7 @@ [b]Note:[/b] Light2D can also be used as a mask. - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_lights_and_shadows.html + $DOCS_URL/tutorials/2d/2d_lights_and_shadows.html diff --git a/doc/classes/LightOccluder2D.xml b/doc/classes/LightOccluder2D.xml index 06d8dce490f..a96782beebe 100644 --- a/doc/classes/LightOccluder2D.xml +++ b/doc/classes/LightOccluder2D.xml @@ -7,7 +7,7 @@ Occludes light cast by a Light2D, casting shadows. The LightOccluder2D must be provided with an [OccluderPolygon2D] in order for the shadow to be computed. - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_lights_and_shadows.html + $DOCS_URL/tutorials/2d/2d_lights_and_shadows.html diff --git a/doc/classes/MeshInstance2D.xml b/doc/classes/MeshInstance2D.xml index 66c2b597f17..0c0a020761e 100644 --- a/doc/classes/MeshInstance2D.xml +++ b/doc/classes/MeshInstance2D.xml @@ -7,7 +7,7 @@ Node used for displaying a [Mesh] in 2D. Can be constructed from an existing [Sprite] via a tool in the editor toolbar. Select "Sprite" then "Convert to Mesh2D", select settings in popup and press "Create Mesh2D". - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_meshes.html + $DOCS_URL/tutorials/2d/2d_meshes.html diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 9cceaf6a999..5d51c970495 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -10,8 +10,8 @@ Since instances may have any behavior, the AABB used for visibility must be provided by the user. - https://docs.godotengine.org/en/3.4/tutorials/3d/vertex_animation/animating_thousands_of_fish.html - https://docs.godotengine.org/en/3.4/tutorials/optimization/using_multimesh.html + $DOCS_URL/tutorials/3d/vertex_animation/animating_thousands_of_fish.html + $DOCS_URL/tutorials/optimization/using_multimesh.html diff --git a/doc/classes/MultiMeshInstance.xml b/doc/classes/MultiMeshInstance.xml index e4656a163c5..d2a11c48226 100644 --- a/doc/classes/MultiMeshInstance.xml +++ b/doc/classes/MultiMeshInstance.xml @@ -8,9 +8,9 @@ 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). - https://docs.godotengine.org/en/3.4/tutorials/3d/vertex_animation/animating_thousands_of_fish.html - https://docs.godotengine.org/en/3.4/tutorials/3d/using_multi_mesh_instance.html - https://docs.godotengine.org/en/3.4/tutorials/optimization/using_multimesh.html + $DOCS_URL/tutorials/3d/vertex_animation/animating_thousands_of_fish.html + $DOCS_URL/tutorials/3d/using_multi_mesh_instance.html + $DOCS_URL/tutorials/optimization/using_multimesh.html diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index 48ba8fe4e83..8986a029c6f 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -7,7 +7,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/threads/using_multiple_threads.html + $DOCS_URL/tutorials/threads/using_multiple_threads.html diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index e4f1b16a1c4..44d19c5584b 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -8,7 +8,7 @@ [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. - https://docs.godotengine.org/en/3.4/tutorials/networking/high_level_multiplayer.html + $DOCS_URL/tutorials/networking/high_level_multiplayer.html https://godotengine.org/asset-library/asset/537 diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 77759409935..15a049f3180 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -17,7 +17,7 @@ [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. - https://docs.godotengine.org/en/3.4/getting_started/step_by_step/scenes_and_nodes.html + $DOCS_URL/getting_started/step_by_step/scenes_and_nodes.html https://github.com/godotengine/godot-demo-projects/ diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 6d9fc960e1b..5dea345a1b5 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -7,7 +7,7 @@ A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. - https://docs.godotengine.org/en/3.4/tutorials/2d/custom_drawing_in_2d.html + $DOCS_URL/tutorials/2d/custom_drawing_in_2d.html https://github.com/godotengine/godot-demo-projects/tree/master/2d diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index ce20e9f8275..e5f4f2f3862 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -131,7 +131,7 @@ - Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. + Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. @@ -155,7 +155,7 @@ - Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. + Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. @@ -176,7 +176,7 @@ - Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. + Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. @@ -591,7 +591,7 @@ - Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the 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/3.4/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. + Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the 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=$DOCS_URL/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. [b]Note:[/b] Tag names are case-sensitive. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index ffa61289b80..7c29acb1246 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -21,8 +21,8 @@ [b]Note:[/b] Due to a bug, you can't create a "plain" Object using [code]Object.new()[/code]. Instead, use [code]ClassDB.instance("Object")[/code]. This bug only applies to Object itself, not any of its descendents like [Reference]. - https://docs.godotengine.org/en/3.4/getting_started/workflow/best_practices/node_alternatives.html - https://docs.godotengine.org/en/3.4/getting_started/scripting/gdscript/gdscript_exports.html#advanced-exports + $DOCS_URL/getting_started/workflow/best_practices/node_alternatives.html + $DOCS_URL/getting_started/scripting/gdscript/gdscript_exports.html#advanced-exports diff --git a/doc/classes/OmniLight.xml b/doc/classes/OmniLight.xml index 6f9d34ec580..6722b754305 100644 --- a/doc/classes/OmniLight.xml +++ b/doc/classes/OmniLight.xml @@ -8,7 +8,7 @@ [b]Note:[/b] By default, only 32 OmniLights may affect a single mesh [i]resource[/i] at once. Consider splitting your level into several meshes to decrease the likelihood that more than 32 lights will affect the same mesh resource. Splitting the level mesh will also improve frustum culling effectiveness, leading to greater performance. If you need to use more lights per mesh, you can increase [member ProjectSettings.rendering/limits/rendering/max_lights_per_object] at the cost of shader compilation times. - https://docs.godotengine.org/en/3.4/tutorials/3d/lights_and_shadows.html + $DOCS_URL/tutorials/3d/lights_and_shadows.html diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 71a90b60222..6a23f9b0940 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -10,7 +10,7 @@ [b]Note:[/b] After working on a Particles node, remember to update its [member visibility_aabb] by selecting it, clicking the [b]Particles[/b] menu at the top of the 3D editor viewport then choose [b]Generate Visibility AABB[/b]. Otherwise, particles may suddenly disappear depending on the camera position and angle. - https://docs.godotengine.org/en/3.4/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html + $DOCS_URL/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index c677318d89a..b4345548a4a 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -11,7 +11,7 @@ [b]Note:[/b] Unlike [CPUParticles2D], [Particles2D] currently ignore the texture region defined in [AtlasTexture]s. - https://docs.godotengine.org/en/3.4/tutorials/2d/particle_systems_2d.html + $DOCS_URL/tutorials/2d/particle_systems_2d.html https://godotengine.org/asset-library/asset/515 diff --git a/doc/classes/Physics2DDirectBodyState.xml b/doc/classes/Physics2DDirectBodyState.xml index d73cb857b42..2c7b40cb9f8 100644 --- a/doc/classes/Physics2DDirectBodyState.xml +++ b/doc/classes/Physics2DDirectBodyState.xml @@ -7,8 +7,8 @@ Provides direct access to a physics body in the [Physics2DServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/ray-casting.html diff --git a/doc/classes/Physics2DDirectSpaceState.xml b/doc/classes/Physics2DDirectSpaceState.xml index 28a93939d50..ffe8c6a24e8 100644 --- a/doc/classes/Physics2DDirectSpaceState.xml +++ b/doc/classes/Physics2DDirectSpaceState.xml @@ -7,8 +7,8 @@ Direct access object to a space in the [Physics2DServer]. It's used mainly to do queries against objects and areas residing in a given space. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/ray-casting.html diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml index b464d30a5e9..d05cd7af4a9 100644 --- a/doc/classes/Physics2DShapeQueryParameters.xml +++ b/doc/classes/Physics2DShapeQueryParameters.xml @@ -25,7 +25,7 @@ If [code]true[/code], the query will take [PhysicsBody2D]s into account. - The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layer(s) the query will take into account (as a bitmask). See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/PhysicsBody.xml b/doc/classes/PhysicsBody.xml index 72dd5823777..39be965f695 100644 --- a/doc/classes/PhysicsBody.xml +++ b/doc/classes/PhysicsBody.xml @@ -7,7 +7,7 @@ PhysicsBody is an abstract base class for implementing a physics body. All *Body types inherit from it. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/physics_introduction.html diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 1cf2792d2a1..ab29ba83f65 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -7,7 +7,7 @@ PhysicsBody2D is an abstract base class for implementing a physics body. All *Body2D types inherit from it. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/physics_introduction.html diff --git a/doc/classes/PhysicsDirectBodyState.xml b/doc/classes/PhysicsDirectBodyState.xml index e9809c99692..ec7ba9bd213 100644 --- a/doc/classes/PhysicsDirectBodyState.xml +++ b/doc/classes/PhysicsDirectBodyState.xml @@ -7,8 +7,8 @@ Provides direct access to a physics body in the [PhysicsServer], allowing safe changes to physics properties. This object is passed via the direct state callback of rigid/character bodies, and is intended for changing the direct state of that body. See [method RigidBody._integrate_forces]. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/ray-casting.html diff --git a/doc/classes/PhysicsDirectSpaceState.xml b/doc/classes/PhysicsDirectSpaceState.xml index 60b40bd7d30..6ec05cf48d5 100644 --- a/doc/classes/PhysicsDirectSpaceState.xml +++ b/doc/classes/PhysicsDirectSpaceState.xml @@ -7,8 +7,8 @@ Direct access object to a space in the [PhysicsServer]. It's used mainly to do queries against objects and areas residing in a given space. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/ray-casting.html diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml index cc2140b9ca7..00a875e53d2 100644 --- a/doc/classes/PhysicsShapeQueryParameters.xml +++ b/doc/classes/PhysicsShapeQueryParameters.xml @@ -25,7 +25,7 @@ If [code]true[/code], the query will take [PhysicsBody]s into account. - The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layer(s) the query will take into account (as a bitmask). See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 853e3e1bb54..ce35bb9a210 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -7,7 +7,7 @@ Plane represents a normalized plane equation. Basically, "normal" is the normal of the plane (a,b,c normalized), and "d" is the distance from the origin to the plane (in the direction of "normal"). "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html + $DOCS_URL/tutorials/math/index.html diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 3a4462769bf..d2e96584ba5 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -6,8 +6,8 @@ Contains global variables accessible from everywhere. Use [method get_setting], [method set_setting] or [method has_setting] to access them. Variables stored in [code]project.godot[/code] are also loaded into ProjectSettings, making this object very useful for reading custom game configuration options. When naming a Project Settings property, use the full path to the setting including the category. For example, [code]"application/config/name"[/code] for the project name. Category and property names can be viewed in the Project Settings dialog. - [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url]. - [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=https://docs.godotengine.org/en/latest/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations. + [b]Feature tags:[/b] Project settings can be overridden for specific platforms and configurations (debug, release, ...) using [url=$DOCS_URL/getting_started/workflow/export/feature_tags.html]feature tags[/url]. + [b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=$DOCS_URL/getting_started/workflow/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations. https://godotengine.org/asset-library/asset/675 @@ -67,7 +67,7 @@ - Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=https://docs.godotengine.org/en/3.4/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. + Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. [b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: [codeblock] var path = "" @@ -198,7 +198,7 @@ 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. The window title will be set to match the project name automatically on startup. - [b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=https://docs.godotengine.org/en/3.4/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information. + [b]Note:[/b] Changing this value will also change the user data folder's path if [member application/config/use_custom_user_dir] is [code]false[/code]. After renaming the project, you will no longer be able to access existing data in [code]user://[/code] unless you rename the old folder to match the new project name. See [url=$DOCS_URL/tutorials/io/data_paths.html]Data paths[/url] in the documentation for more information. Specifies a file to override project settings. For example: [code]user://custom_settings.cfg[/code]. See "Overriding" in the [ProjectSettings] class description at the top for more information. @@ -276,7 +276,9 @@ Safer override for [member audio/mix_rate] in the Web platform. Here [code]0[/code] means "let the browser choose" (since some browsers do not like forcing the mix rate). - 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. + Specifies the preferred 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. + Audio output latency may be constrained by the host operating system and audio hardware drivers. If the host can not provide the specified audio output latency then Godot will attempt to use the nearest latency allowed by the host. As such you should always use [method AudioServer.get_output_latency] to determine the actual audio output latency. + [b]Note:[/b] This setting is ignored on Windows. Safer override for [member audio/output_latency] in the Web platform, to avoid audio issues especially on mobile devices. @@ -475,7 +477,7 @@ Sets the main window to full screen when the project starts. Note that this is not [i]exclusive[/i] fullscreen. On Windows and Linux, a borderless window is used to emulate fullscreen. On macOS, a new desktop is used to display the running project. - Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=https://docs.godotengine.org/en/3.4/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. + Regardless of the platform, enabling fullscreen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling fullscreen mode. [b]Note:[/b] This setting is ignored on iOS, Android, and HTML5. diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index ec0e45eddff..5666a02dd5d 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -9,7 +9,7 @@ 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. - https://docs.godotengine.org/en/3.4/tutorials/3d/using_transforms.html#interpolating-with-quaternions + $DOCS_URL/tutorials/3d/using_transforms.html#interpolating-with-quaternions https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index 8e0ed51577d..1a427971b2a 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -16,7 +16,7 @@ [b]Note:[/b] The default values of [member seed] and [member state] properties are pseudo-random, and changes when calling [method randomize]. The [code]0[/code] value documented here is a placeholder, and not the actual default seed. - https://docs.godotengine.org/en/3.4/tutorials/math/random_number_generation.html + $DOCS_URL/tutorials/math/random_number_generation.html diff --git a/doc/classes/RayCast.xml b/doc/classes/RayCast.xml index 897b118bff8..ec3d31e6648 100644 --- a/doc/classes/RayCast.xml +++ b/doc/classes/RayCast.xml @@ -11,7 +11,7 @@ RayCast calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame), use [method force_raycast_update] after adjusting the raycast. - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/ray-casting.html https://godotengine.org/asset-library/asset/676 @@ -117,7 +117,7 @@ If [code]true[/code], collision with [PhysicsBody]s will be reported. - The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The custom color to use to draw the shape in the editor and at run-time if [b]Visible Collision Shapes[/b] is enabled in the [b]Debug[/b] menu. This color will be highlighted at run-time if the [RayCast] is colliding with something. diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index ad376e2aa59..792ecf988ae 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -11,7 +11,7 @@ RayCast2D calculates intersection every physics frame (see [Node]), and the result is cached so it can be used later until the next frame. If multiple queries are required between physics frames (or during the same frame) use [method force_raycast_update] after adjusting the raycast. - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/ray-casting.html @@ -113,7 +113,7 @@ If [code]true[/code], collision with [PhysicsBody2D]s will be reported. - The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The ray's collision mask. Only objects in at least one collision layer enabled in the mask will be detected. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. If [code]true[/code], collisions will be reported. diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index c60a20e1f1b..00469002c96 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -9,9 +9,9 @@ The 3D counterpart to [Rect2] is [AABB]. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html - https://docs.godotengine.org/en/3.4/tutorials/math/vector_math.html - https://docs.godotengine.org/en/3.4/tutorials/math/vectors_advanced.html + $DOCS_URL/tutorials/math/index.html + $DOCS_URL/tutorials/math/vector_math.html + $DOCS_URL/tutorials/math/vectors_advanced.html @@ -56,7 +56,14 @@ - Returns this [Rect2] expanded to include a given point. + Returns a copy of this [Rect2] expanded to include a given point. + [b]Example:[/b] + [codeblock] + # position (-3, 2), size (1, 1) + var rect = Rect2(Vector2(-3, 2), Vector2(1, 1)) + # position (-3, -1), size (3, 4), so we fit both rect and Vector2(0, -1) + var rect2 = rect.expand(Vector2(0, -1)) + [/codeblock] @@ -100,7 +107,8 @@ - Returns [code]true[/code] if the [Rect2] contains a point. + Returns [code]true[/code] if the [Rect2] contains a point. By convention, the right and bottom edges of the [Rect2] are considered exclusive, so points on these edges are [b]not[/b] included. + [b]Note:[/b] This method is not reliable for [Rect2] with a [i]negative size[/i]. Use [method abs] to get a positive sized equivalent rectangle to check for contained points. diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml index 836e6e7609a..cda535e6b20 100644 --- a/doc/classes/Reference.xml +++ b/doc/classes/Reference.xml @@ -10,7 +10,7 @@ [b]Note:[/b] In C#, references will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free references that are no longer in use. This means that unused references will linger on for a while before being removed. - https://docs.godotengine.org/en/3.4/getting_started/workflow/best_practices/node_alternatives.html + $DOCS_URL/getting_started/workflow/best_practices/node_alternatives.html diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index a60952571fc..3e128028716 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -10,7 +10,7 @@ [b]Note:[/b] The GLES2 backend will only display two reflection probes at the same time for a single mesh. If possible, split up large meshes that span over multiple reflection probes into smaller ones. - https://docs.godotengine.org/en/3.4/tutorials/3d/reflection_probes.html + $DOCS_URL/tutorials/3d/reflection_probes.html diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 849405bc944..6c442334288 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -8,8 +8,8 @@ [b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed. - https://docs.godotengine.org/en/3.4/getting_started/step_by_step/resources.html - https://docs.godotengine.org/en/3.4/getting_started/workflow/best_practices/node_alternatives.html + $DOCS_URL/getting_started/step_by_step/resources.html + $DOCS_URL/getting_started/workflow/best_practices/node_alternatives.html diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml index a1052bcaeea..57a819e13f7 100644 --- a/doc/classes/ResourceImporter.xml +++ b/doc/classes/ResourceImporter.xml @@ -7,7 +7,7 @@ This is the base class for the resource importers implemented in core. To implement your own resource importers using editor plugins, see [EditorImportPlugin]. - https://docs.godotengine.org/en/3.4/tutorials/plugins/editor/import_plugins.html + $DOCS_URL/tutorials/plugins/editor/import_plugins.html diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index b23fe45f7b6..02db6398ec4 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -13,7 +13,7 @@ [b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively. - https://docs.godotengine.org/en/3.4/tutorials/gui/bbcode_in_richtextlabel.html + $DOCS_URL/tutorials/gui/bbcode_in_richtextlabel.html https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 115851f2b78..156b2676098 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -12,7 +12,7 @@ [b]Note:[/b] Unicode characters after [code]0xffff[/code] (such as most emoji) are [i]not[/i] supported on Windows. They will display as unknown characters instead. This will be resolved in Godot 4.0. - https://docs.godotengine.org/en/3.4/tutorials/gui/bbcode_in_richtextlabel.html + $DOCS_URL/tutorials/gui/bbcode_in_richtextlabel.html https://godotengine.org/asset-library/asset/132 https://godotengine.org/asset-library/asset/677 diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 3109ae057cb..208e9e5f37a 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -11,7 +11,7 @@ With Bullet physics (the default), the center of mass is the RigidBody3D center. With GodotPhysics, the center of mass is the average of the [CollisionShape] centers. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/physics_introduction.html https://godotengine.org/asset-library/asset/524 https://godotengine.org/asset-library/asset/675 diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml index 0afddc3d28b..9b1a09df44c 100644 --- a/doc/classes/RootMotionView.xml +++ b/doc/classes/RootMotionView.xml @@ -8,7 +8,7 @@ [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain [Node] in the running project. This means a script attached to a [RootMotionView] node [i]must[/i] have [code]extends Node[/code] instead of [code]extends RootMotionView[/code]. Additionally, it must not be a [code]@tool[/code] script. - https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#root-motion + $DOCS_URL/tutorials/animation/animation_tree.html#root-motion diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index c4991cd819a..aa3486f0065 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -9,8 +9,8 @@ [SceneTree] is the default [MainLoop] implementation used by scenes, and is thus in charge of the game loop. - https://docs.godotengine.org/en/3.4/getting_started/step_by_step/scene_tree.html - https://docs.godotengine.org/en/3.4/tutorials/viewports/multiple_resolutions.html + $DOCS_URL/getting_started/step_by_step/scene_tree.html + $DOCS_URL/tutorials/viewports/multiple_resolutions.html diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index 2f27f006cf0..8a27c332a50 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -8,7 +8,7 @@ The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. - https://docs.godotengine.org/en/3.4/getting_started/step_by_step/scripting.html + $DOCS_URL/getting_started/step_by_step/scripting.html diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index d4c1e51fad3..f535d24afd6 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -7,7 +7,7 @@ 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]. - https://docs.godotengine.org/en/3.4/tutorials/threads/using_multiple_threads.html + $DOCS_URL/tutorials/threads/using_multiple_threads.html diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index dd6ceaf6c25..900c07957f2 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -7,8 +7,8 @@ This class allows you to define a custom shader program that can be used by a [ShaderMaterial]. Shaders allow you to write your own custom behavior for rendering objects or updating particle information. For a detailed explanation and usage, please see the tutorials linked below. - https://docs.godotengine.org/en/3.4/tutorials/shading/index.html - https://docs.godotengine.org/en/3.4/tutorials/shading/your_first_shader/what_are_shaders.html + $DOCS_URL/tutorials/shading/index.html + $DOCS_URL/tutorials/shading/your_first_shader/what_are_shaders.html diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index 8d902086bf2..6758ad5fa67 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -8,7 +8,7 @@ [b]Note:[/b] Due to a renderer limitation, emissive [ShaderMaterial]s cannot emit light when used in a [GIProbe]. Only emissive [SpatialMaterial]s can emit light in a [GIProbe]. - https://docs.godotengine.org/en/3.4/tutorials/shading/index.html + $DOCS_URL/tutorials/shading/index.html diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml index 2a31d549d65..000d903e291 100644 --- a/doc/classes/Shape.xml +++ b/doc/classes/Shape.xml @@ -7,7 +7,7 @@ Base class for all 3D shape resources. Nodes that inherit from this can be used as shapes for a [PhysicsBody] or [Area] objects. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/physics_introduction.html diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index ba610532f91..375d7775466 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -7,7 +7,7 @@ Base class for all 2D shapes. All 2D shape types inherit from this. - https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html + $DOCS_URL/tutorials/physics/physics_introduction.html diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index 5e6f18ce412..5538bcc5b61 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -7,7 +7,7 @@ Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones. - https://docs.godotengine.org/en/3.4/tutorials/animation/2d_skeletons.html + $DOCS_URL/tutorials/animation/2d_skeletons.html diff --git a/doc/classes/SoftBody.xml b/doc/classes/SoftBody.xml index 02b9d258612..81b97d63d27 100644 --- a/doc/classes/SoftBody.xml +++ b/doc/classes/SoftBody.xml @@ -7,7 +7,7 @@ A deformable physics body. Used to create elastic or deformable objects such as cloth, rubber, or other flexible materials. - https://docs.godotengine.org/en/3.4/tutorials/physics/soft_body.html + $DOCS_URL/tutorials/physics/soft_body.html @@ -90,10 +90,10 @@ The physics layers this SoftBody 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. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + 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. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - The physics layers this SoftBody scans for collisions. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layers this SoftBody scans for collisions. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. diff --git a/doc/classes/Spatial.xml b/doc/classes/Spatial.xml index 511911975ac..dc9d7290b4c 100644 --- a/doc/classes/Spatial.xml +++ b/doc/classes/Spatial.xml @@ -9,7 +9,7 @@ [b]Note:[/b] Unless otherwise specified, all methods that have angle parameters must have angles specified as [i]radians[/i]. To convert degrees to radians, use [method @GDScript.deg2rad]. - https://docs.godotengine.org/en/3.4/tutorials/3d/introduction_to_3d.html + $DOCS_URL/tutorials/3d/introduction_to_3d.html https://github.com/godotengine/godot-demo-projects/tree/master/3d diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml index 47861055fc5..8f2cae373a2 100644 --- a/doc/classes/SpatialMaterial.xml +++ b/doc/classes/SpatialMaterial.xml @@ -7,7 +7,7 @@ This provides a default material with a wide variety of rendering features and properties without the need to write shader code. See the tutorial below for details. - https://docs.godotengine.org/en/3.4/tutorials/3d/spatial_material.html + $DOCS_URL/tutorials/3d/spatial_material.html diff --git a/doc/classes/SpotLight.xml b/doc/classes/SpotLight.xml index c1d8c09d459..db990701226 100644 --- a/doc/classes/SpotLight.xml +++ b/doc/classes/SpotLight.xml @@ -8,7 +8,7 @@ [b]Note:[/b] By default, only 32 SpotLights may affect a single mesh [i]resource[/i] at once. Consider splitting your level into several meshes to decrease the likelihood that more than 32 lights will affect the same mesh resource. Splitting the level mesh will also improve frustum culling effectiveness, leading to greater performance. If you need to use more lights per mesh, you can increase [member ProjectSettings.rendering/limits/rendering/max_lights_per_object] at the cost of shader compilation times. - https://docs.godotengine.org/en/3.4/tutorials/3d/lights_and_shadows.html + $DOCS_URL/tutorials/3d/lights_and_shadows.html https://godotengine.org/asset-library/asset/678 diff --git a/doc/classes/SpringArm.xml b/doc/classes/SpringArm.xml index 046ae36a298..72b242157f4 100644 --- a/doc/classes/SpringArm.xml +++ b/doc/classes/SpringArm.xml @@ -41,7 +41,7 @@ - The layers against which the collision check shall be done. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The layers against which the collision check shall be done. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. When the collision check is made, a candidate length for the SpringArm is given. diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index 04df87357a6..37748ff6c76 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -7,7 +7,7 @@ SSL stream peer. This object can be used to connect to an SSL server or accept a single SSL client connection. - https://docs.godotengine.org/en/3.4/tutorials/networking/ssl_certificates.html + $DOCS_URL/tutorials/networking/ssl_certificates.html diff --git a/doc/classes/String.xml b/doc/classes/String.xml index b11931e214f..6616ea5193e 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -7,7 +7,7 @@ This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference-counted and use a copy-on-write approach, so passing them around is cheap in resources. - https://docs.godotengine.org/en/3.4/getting_started/scripting/gdscript/gdscript_format_string.html + $DOCS_URL/getting_started/scripting/gdscript/gdscript_format_string.html @@ -335,6 +335,19 @@ If the string is a valid file path, returns the filename. + + + + + + Splits a string using a [code]delimiter[/code] and returns a substring at index [code]slice[/code]. Returns an empty string if the index doesn't exist. + This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index. + Example: + [codeblock] + print("i/am/example/string".get_slice("/", 2)) # Prints 'example'. + [/codeblock] + + @@ -690,6 +703,7 @@ Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length. 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 [code]0[/code] means that all items are split. + If you need only one element from the array at a specific index, [method get_slice] is a more performant option. Example: [codeblock] var some_string = "One,Two,Three,Four" diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 089038df739..1cad05da028 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -8,7 +8,7 @@ Theme resources can alternatively be loaded by writing them in a [code].theme[/code] file, see the documentation for more information. - https://docs.godotengine.org/en/3.4/tutorials/gui/gui_skinning.html + $DOCS_URL/tutorials/gui/gui_skinning.html diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index cde4d93b9eb..72a6405eca7 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -8,8 +8,8 @@ [b]Note:[/b] Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger. - https://docs.godotengine.org/en/3.4/tutorials/threads/using_multiple_threads.html - https://docs.godotengine.org/en/3.4/tutorials/threads/thread_safe_apis.html + $DOCS_URL/tutorials/threads/using_multiple_threads.html + $DOCS_URL/tutorials/threads/thread_safe_apis.html https://godotengine.org/asset-library/asset/676 diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 1e23ad4e370..b44a4d35316 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -8,7 +8,7 @@ When doing physics queries against the tilemap, the cell coordinates are encoded as [code]metadata[/code] for each detected collision shape returned by methods such as [method Physics2DDirectSpaceState.intersect_shape], [method Physics2DDirectBodyState.get_contact_collider_shape_metadata], etc. - https://docs.godotengine.org/en/3.4/tutorials/2d/using_tilemaps.html + $DOCS_URL/tutorials/2d/using_tilemaps.html https://godotengine.org/asset-library/asset/120 https://godotengine.org/asset-library/asset/112 https://godotengine.org/asset-library/asset/111 @@ -246,10 +246,10 @@ Friction value for static body collisions (see [code]collision_use_kinematic[/code]). - The collision layer(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The collision layer(s) for all colliders in the TileMap. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. - The collision mask(s) for all colliders in the TileMap. See [url=https://docs.godotengine.org/en/3.4/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The collision mask(s) for all colliders in the TileMap. See [url=$DOCS_URL/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. If [code]true[/code], TileMap collisions will be handled as a kinematic body. If [code]false[/code], collisions will be handled as static body. diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index c3ee2980914..867961035c2 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -8,7 +8,7 @@ Tiles are referenced by a unique integer ID. - https://docs.godotengine.org/en/3.4/tutorials/2d/using_tilemaps.html + $DOCS_URL/tutorials/2d/using_tilemaps.html https://godotengine.org/asset-library/asset/120 https://godotengine.org/asset-library/asset/112 https://godotengine.org/asset-library/asset/111 diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index a04e8bdc969..0aea4d7cc55 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -8,9 +8,9 @@ For more information, read the "Matrices and transforms" documentation article. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html - https://docs.godotengine.org/en/3.4/tutorials/math/matrices_and_transforms.html - https://docs.godotengine.org/en/3.4/tutorials/3d/using_transforms.html + $DOCS_URL/tutorials/math/index.html + $DOCS_URL/tutorials/math/matrices_and_transforms.html + $DOCS_URL/tutorials/3d/using_transforms.html https://godotengine.org/asset-library/asset/584 https://godotengine.org/asset-library/asset/125 https://godotengine.org/asset-library/asset/583 diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 96589196fc5..a50df44e457 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -8,8 +8,8 @@ For more information, read the "Matrices and transforms" documentation article. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html - https://docs.godotengine.org/en/3.4/tutorials/math/matrices_and_transforms.html + $DOCS_URL/tutorials/math/index.html + $DOCS_URL/tutorials/math/matrices_and_transforms.html https://godotengine.org/asset-library/asset/584 https://godotengine.org/asset-library/asset/583 diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index a11bfbb87ec..73366f971a3 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -7,8 +7,8 @@ Translations are resources that can be loaded and unloaded on demand. They map a string to another string. - https://docs.godotengine.org/en/3.4/tutorials/i18n/internationalizing_games.html - https://docs.godotengine.org/en/3.4/tutorials/i18n/locales.html + $DOCS_URL/tutorials/i18n/internationalizing_games.html + $DOCS_URL/tutorials/i18n/locales.html diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 87ed90c94d4..a99731cb7da 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -7,8 +7,8 @@ Server that manages all translations. Translations can be set to it and removed from it. - https://docs.godotengine.org/en/3.4/tutorials/i18n/internationalizing_games.html - https://docs.godotengine.org/en/3.4/tutorials/i18n/locales.html + $DOCS_URL/tutorials/i18n/internationalizing_games.html + $DOCS_URL/tutorials/i18n/locales.html diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index dde7729dd3b..cf91fa1678f 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -50,7 +50,7 @@ Modifications to a container will modify all references to it. A [Mutex] should be created to lock it if multi-threaded access is desired. - https://docs.godotengine.org/en/3.4/development/cpp/variant_class.html + $DOCS_URL/development/cpp/variant_class.html diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 0a83bb02a9e..d936680a629 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -8,9 +8,9 @@ [b]Note:[/b] In a boolean context, a Vector2 will evaluate to [code]false[/code] if it's equal to [code]Vector2(0, 0)[/code]. Otherwise, a Vector2 will always evaluate to [code]true[/code]. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html - https://docs.godotengine.org/en/3.4/tutorials/math/vector_math.html - https://docs.godotengine.org/en/3.4/tutorials/math/vectors_advanced.html + $DOCS_URL/tutorials/math/index.html + $DOCS_URL/tutorials/math/vector_math.html + $DOCS_URL/tutorials/math/vectors_advanced.html https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab https://godotengine.org/asset-library/asset/584 https://github.com/godotengine/godot-demo-projects/tree/master/2d diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 26238dbe351..15411e9be6a 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -8,9 +8,9 @@ [b]Note:[/b] In a boolean context, a Vector3 will evaluate to [code]false[/code] if it's equal to [code]Vector3(0, 0, 0)[/code]. Otherwise, a Vector3 will always evaluate to [code]true[/code]. - https://docs.godotengine.org/en/3.4/tutorials/math/index.html - https://docs.godotengine.org/en/3.4/tutorials/math/vector_math.html - https://docs.godotengine.org/en/3.4/tutorials/math/vectors_advanced.html + $DOCS_URL/tutorials/math/index.html + $DOCS_URL/tutorials/math/vector_math.html + $DOCS_URL/tutorials/math/vectors_advanced.html https://www.youtube.com/playlist?list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab https://godotengine.org/asset-library/asset/584 https://github.com/godotengine/godot-demo-projects/tree/master/3d diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index d7a2a11ee73..22bff87e4b9 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -12,8 +12,8 @@ Finally, viewports can also behave as render targets, in which case they will not be visible unless the associated texture is used to draw. - https://docs.godotengine.org/en/3.4/tutorials/2d/2d_transforms.html - https://docs.godotengine.org/en/3.4/tutorials/viewports/index.html + $DOCS_URL/tutorials/2d/2d_transforms.html + $DOCS_URL/tutorials/viewports/index.html https://godotengine.org/asset-library/asset/127 https://godotengine.org/asset-library/asset/128 https://godotengine.org/asset-library/asset/129 diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index f88059ac183..4ceb9d34f61 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -15,7 +15,7 @@ In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. - https://docs.godotengine.org/en/3.4/tutorials/optimization/using_servers.html + $DOCS_URL/tutorials/optimization/using_servers.html diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index fd173f36309..6507c5d139b 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -7,7 +7,7 @@ Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node has also connection ports that allow to connect it to another nodes and control the flow of the shader. - https://docs.godotengine.org/en/3.4/tutorials/shading/visual_shaders.html + $DOCS_URL/tutorials/shading/visual_shaders.html diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index e009972c488..8494a71764a 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -13,7 +13,7 @@ [/codeblock] - https://docs.godotengine.org/en/3.4/tutorials/plugins/editor/visual_shader_plugins.html + $DOCS_URL/tutorials/plugins/editor/visual_shader_plugins.html diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 5569b23aff1..ef627a96197 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -6,7 +6,7 @@ Gives access to input variables (built-ins) available for the shader. See the shading reference for the list of available built-ins for each shader type (check [code]Tutorials[/code] section for link). - https://docs.godotengine.org/en/3.4/tutorials/shading/shading_reference/index.html + $DOCS_URL/tutorials/shading/shading_reference/index.html diff --git a/doc/classes/World.xml b/doc/classes/World.xml index 2909592c452..61c57677599 100644 --- a/doc/classes/World.xml +++ b/doc/classes/World.xml @@ -7,7 +7,7 @@ Class that has everything pertaining to a world. A physics space, a visual scenario and a sound space. Spatial nodes register their resources into the current world. - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/ray-casting.html diff --git a/doc/classes/World2D.xml b/doc/classes/World2D.xml index 0f96f3f7e76..a10fb3da725 100644 --- a/doc/classes/World2D.xml +++ b/doc/classes/World2D.xml @@ -7,7 +7,7 @@ Class that has everything pertaining to a 2D world. A physics space, a visual scenario and a sound space. 2D nodes register their resources into the current 2D world. - https://docs.godotengine.org/en/3.4/tutorials/physics/ray-casting.html + $DOCS_URL/tutorials/physics/ray-casting.html diff --git a/doc/classes/WorldEnvironment.xml b/doc/classes/WorldEnvironment.xml index 8884758899d..f768c9838c4 100644 --- a/doc/classes/WorldEnvironment.xml +++ b/doc/classes/WorldEnvironment.xml @@ -9,7 +9,7 @@ The [WorldEnvironment] allows the user to specify default lighting parameters (e.g. ambient lighting), various post-processing effects (e.g. SSAO, DOF, Tonemapping), and how to draw the background (e.g. solid color, skybox). Usually, these are added in order to improve the realism/color balance of the scene. - https://docs.godotengine.org/en/3.4/tutorials/3d/environment_and_post_processing.html + $DOCS_URL/tutorials/3d/environment_and_post_processing.html https://godotengine.org/asset-library/asset/123 https://godotengine.org/asset-library/asset/110 https://godotengine.org/asset-library/asset/678 diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py index 746bfd199d4..62edefb692f 100755 --- a/doc/tools/make_rst.py +++ b/doc/tools/make_rst.py @@ -11,10 +11,8 @@ from collections import OrderedDict # Uncomment to do type checks. I have it commented out so it works below Python 3.5 # from typing import List, Dict, TextIO, Tuple, Iterable, Optional, DefaultDict, Any, Union -# http(s)://docs.godotengine.org///path/to/page.html(#fragment-tag) -GODOT_DOCS_PATTERN = re.compile( - r"^http(?:s)?://docs\.godotengine\.org/(?:[a-zA-Z0-9.\-_]*)/(?:[a-zA-Z0-9.\-_]*)/(.*)\.html(#.*)?$" -) +# $DOCS_URL/path/to/page.html(#fragment-tag) +GODOT_DOCS_PATTERN = re.compile(r"^\$DOCS_URL/(.*)\.html(#.*)?$") def print_error(error, state): # type: (str, State) -> None @@ -728,16 +726,11 @@ def rstize_text(text, state): # type: (str, State) -> str # Handle [tags] inside_code = False - inside_url = False - url_has_name = False - url_link = "" pos = 0 tag_depth = 0 previous_pos = 0 while True: pos = text.find("[", pos) - if inside_url and (pos > previous_pos): - url_has_name = True if pos == -1: break @@ -856,17 +849,23 @@ def rstize_text(text, state): # type: (str, State) -> str elif cmd.find("image=") == 0: tag_text = "" # '![](' + cmd[6:] + ')' elif cmd.find("url=") == 0: - url_link = cmd[4:] - tag_text = "`" - tag_depth += 1 - inside_url = True - url_has_name = False - elif cmd == "/url": - tag_text = ("" if url_has_name else url_link) + " <" + url_link + ">`__" - tag_depth -= 1 - escape_post = True - inside_url = False - url_has_name = False + # URLs are handled in full here as we need to extract the optional link + # title to use `make_link`. + link_url = cmd[4:] + endurl_pos = text.find("[/url]", endq_pos + 1) + if endurl_pos == -1: + print_error( + "Tag depth mismatch for [url]: no closing [/url], file: {}".format(state.current_class), state + ) + break + link_title = text[endq_pos + 1 : endurl_pos] + tag_text = make_link(link_url, link_title) + + pre_text = text[:pos] + text = pre_text + tag_text + text[endurl_pos + 6 :] + pos = len(pre_text) + len(tag_text) + previous_pos = pos + continue elif cmd == "center": tag_depth += 1 tag_text = "" @@ -1081,21 +1080,22 @@ def make_link(url, title): # type: (str, str) -> str if match.lastindex == 2: # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: # `#calling-javascript-from-script in Exporting For Web` - return "`" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`" - # Commented out alternative: Instead just emit: - # `Subsection in Exporting For Web` - # return "`Subsection <../" + groups[0] + ".html" + groups[1] + ">`__ in :doc:`../" + groups[0] + "`" + # Or use the title if provided. + if title != "": + return "`" + title + " <../" + groups[0] + ".html" + groups[1] + ">`__" + return "`" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`__ in :doc:`../" + groups[0] + "`" elif match.lastindex == 1: # Doc reference, for example: # `Math` + if title != "": + return ":doc:`" + title + " <../" + groups[0] + ">`" return ":doc:`../" + groups[0] + "`" else: # External link, for example: # `http://enet.bespin.org/usergroup0.html` if title != "": return "`" + title + " <" + url + ">`__" - else: - return "`" + url + " <" + url + ">`__" + return "`" + url + " <" + url + ">`__" if __name__ == "__main__": diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index 0853ad521a5..8556d9dbb24 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -34,6 +34,7 @@ #include "core/os/os.h" #include "core/project_settings.h" +#include "core/version.h" #ifdef ALSAMIDI_ENABLED #include "drivers/alsa/asound-so_wrap.h" @@ -191,7 +192,7 @@ Error AudioDriverPulseAudio::init_device() { Error err = detect_channels(); if (err != OK) { // This most likely means there are no sinks. - ERR_PRINT("PulseAudio: init device failed to detect number of channels"); + ERR_PRINT("PulseAudio: init device failed to detect number of output channels"); return err; } @@ -211,7 +212,7 @@ Error AudioDriverPulseAudio::init_device() { break; default: - WARN_PRINT("PulseAudio: Unsupported number of channels: " + itos(pa_map.channels)); + WARN_PRINT("PulseAudio: Unsupported number of output channels: " + itos(pa_map.channels)); pa_channel_map_init_stereo(&pa_map); channels = 2; break; @@ -221,8 +222,8 @@ Error AudioDriverPulseAudio::init_device() { buffer_frames = closest_power_of_2(latency * mix_rate / 1000); pa_buffer_size = buffer_frames * pa_map.channels; - print_verbose("PulseAudio: detected " + itos(pa_map.channels) + " channels"); - print_verbose("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); + print_verbose("PulseAudio: detected " + itos(pa_map.channels) + " output channels"); + print_verbose("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated output latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); pa_sample_spec spec; spec.format = PA_SAMPLE_S16LE; @@ -293,7 +294,17 @@ Error AudioDriverPulseAudio::init() { pa_ml = pa_mainloop_new(); ERR_FAIL_COND_V(pa_ml == nullptr, ERR_CANT_OPEN); - pa_ctx = pa_context_new(pa_mainloop_get_api(pa_ml), "Godot"); + String context_name; + if (Engine::get_singleton()->is_editor_hint()) { + context_name = VERSION_NAME " Editor"; + } else { + context_name = GLOBAL_GET("application/config/name"); + if (context_name.empty()) { + context_name = VERSION_NAME " Project"; + } + } + + pa_ctx = pa_context_new(pa_mainloop_get_api(pa_ml), context_name.utf8().ptr()); ERR_FAIL_COND_V(pa_ctx == nullptr, ERR_CANT_OPEN); pa_ready = 0; @@ -381,16 +392,18 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) { ad->lock(); ad->start_counting_ticks(); + int16_t *out_ptr = ad->samples_out.ptrw(); + if (!ad->active) { for (unsigned int i = 0; i < ad->pa_buffer_size; i++) { - ad->samples_out.write[i] = 0; + out_ptr[i] = 0; } } else { ad->audio_server_process(ad->buffer_frames, ad->samples_in.ptrw()); if (ad->channels == ad->pa_map.channels) { for (unsigned int i = 0; i < ad->pa_buffer_size; i++) { - ad->samples_out.write[i] = ad->samples_in[i] >> 16; + out_ptr[i] = ad->samples_in[i] >> 16; } } else { // Uneven amount of channels @@ -399,11 +412,11 @@ void AudioDriverPulseAudio::thread_func(void *p_udata) { for (unsigned int i = 0; i < ad->buffer_frames; i++) { for (int j = 0; j < ad->pa_map.channels - 1; j++) { - ad->samples_out.write[out_idx++] = ad->samples_in[in_idx++] >> 16; + out_ptr[out_idx++] = ad->samples_in[in_idx++] >> 16; } uint32_t l = ad->samples_in[in_idx++] >> 16; uint32_t r = ad->samples_in[in_idx++] >> 16; - ad->samples_out.write[out_idx++] = (l + r) / 2; + out_ptr[out_idx++] = (l + r) / 2; } } } @@ -689,6 +702,8 @@ Error AudioDriverPulseAudio::capture_init_device() { break; } + print_verbose("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); + pa_sample_spec spec; spec.format = PA_SAMPLE_S16LE; diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 0c901aff215..6c871a232f4 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -64,7 +64,12 @@ void EditorAutoloadSettings::_notification(int p_what) { bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, String *r_error) { if (!p_name.is_valid_identifier()) { if (r_error) { - *r_error = TTR("Invalid name.") + "\n" + TTR("Valid characters:") + " a-z, A-Z, 0-9 or _"; + *r_error = TTR("Invalid name.") + " "; + if (p_name.size() > 0 && p_name.left(1).is_numeric()) { + *r_error += TTR("Cannot begin with a digit."); + } else { + *r_error += TTR("Valid characters:") + " a-z, A-Z, 0-9 or _"; + } } return false; @@ -72,7 +77,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin if (ClassDB::class_exists(p_name)) { if (r_error) { - *r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing engine class name."); + *r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing engine class name."); } return false; @@ -81,7 +86,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin for (int i = 0; i < Variant::VARIANT_MAX; i++) { if (Variant::get_type_name(Variant::Type(i)) == p_name) { if (r_error) { - *r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing built-in type name."); + *r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing built-in type name."); } return false; @@ -91,7 +96,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin for (int i = 0; i < GlobalConstants::get_global_constant_count(); i++) { if (GlobalConstants::get_global_constant_name(i) == p_name) { if (r_error) { - *r_error = TTR("Invalid name.") + "\n" + TTR("Must not collide with an existing global constant name."); + *r_error = TTR("Invalid name.") + " " + TTR("Must not collide with an existing global constant name."); } return false; @@ -104,7 +109,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, Strin for (List::Element *E = keywords.front(); E; E = E->next()) { if (E->get() == p_name) { if (r_error) { - *r_error = TTR("Invalid name.") + "\n" + TTR("Keyword cannot be used as an autoload name."); + *r_error = TTR("Invalid name.") + " " + TTR("Keyword cannot be used as an autoload name."); } return false; @@ -338,8 +343,11 @@ void EditorAutoloadSettings::_autoload_path_text_changed(const String p_path) { } void EditorAutoloadSettings::_autoload_text_changed(const String p_name) { - add_autoload->set_disabled( - autoload_add_path->get_line_edit()->get_text() == "" || !_autoload_name_is_valid(p_name, nullptr)); + String error_string; + bool is_name_valid = _autoload_name_is_valid(p_name, &error_string); + add_autoload->set_disabled(autoload_add_path->get_line_edit()->get_text() == "" || !is_name_valid); + error_message->set_text(error_string); + error_message->set_visible(autoload_add_name->get_text() != "" && !is_name_valid); } Node *EditorAutoloadSettings::_create_autoload(const String &p_path) { @@ -830,6 +838,12 @@ EditorAutoloadSettings::EditorAutoloadSettings() { HBoxContainer *hbc = memnew(HBoxContainer); add_child(hbc); + error_message = memnew(Label); + error_message->hide(); + error_message->set_align(Label::Align::ALIGN_RIGHT); + error_message->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor")); + add_child(error_message); + Label *l = memnew(Label); l->set_text(TTR("Path:")); hbc->add_child(l); diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h index c54dd649c1d..028a7f80453 100644 --- a/editor/editor_autoload_settings.h +++ b/editor/editor_autoload_settings.h @@ -76,6 +76,7 @@ class EditorAutoloadSettings : public VBoxContainer { EditorLineEditFileChooser *autoload_add_path; LineEdit *autoload_add_name; Button *add_autoload; + Label *error_message; bool _autoload_name_is_valid(const String &p_name, String *r_error = nullptr); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index 02c04ea95ce..0757e571c14 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -32,13 +32,14 @@ #include "core/os/input.h" #include "core/os/keyboard.h" +#include "core/version_generated.gen.h" #include "doc_data_compressed.gen.h" #include "editor/plugins/script_editor_plugin.h" #include "editor_node.h" #include "editor_scale.h" #include "editor_settings.h" -#define CONTRIBUTE_URL "https://docs.godotengine.org/en/latest/community/contributing/updating_the_class_reference.html" +#define CONTRIBUTE_URL vformat("%s/community/contributing/updating_the_class_reference.html", VERSION_DOCS_URL) DocData *EditorHelp::doc = nullptr; diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index b9125ecd181..8a7e401267b 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1621,7 +1621,7 @@ void EditorNode::_save_all_scenes() { } else { _save_scene_with_preview(scene->get_filename()); } - } else { + } else if (scene->get_filename() != "") { all_saved = false; } } @@ -2108,7 +2108,8 @@ void EditorNode::_edit_current() { if (main_plugin) { // special case if use of external editor is true - if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { + Resource *res = Object::cast_to(current_obj); + if (main_plugin->get_name() == "Script" && current_obj->get_class_name() != StringName("VisualScript") && res && !res->get_path().empty() && res->get_path().find("::") == -1 && (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")) || overrides_external_editor(current_obj))) { if (!changing_scene) { main_plugin->edit(current_obj); } diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp index aa3cabaeaf3..2064d8a28b9 100644 --- a/editor/editor_spin_slider.cpp +++ b/editor/editor_spin_slider.cpp @@ -230,7 +230,8 @@ void EditorSpinSlider::_value_input_gui_input(const Ref &p_event) { set_value(last_value + real_step); } - value_input->set_text(get_text_value()); + value_input_dirty = true; + set_process_internal(true); } break; case KEY_DOWN: { _evaluate_input_text(); @@ -243,7 +244,8 @@ void EditorSpinSlider::_value_input_gui_input(const Ref &p_event) { set_value(last_value - real_step); } - value_input->set_text(get_text_value()); + value_input_dirty = true; + set_process_internal(true); } break; } } @@ -371,6 +373,14 @@ void EditorSpinSlider::_notification(int p_what) { value_input->add_style_override("normal", stylebox); } break; + case NOTIFICATION_INTERNAL_PROCESS: + if (value_input_dirty) { + value_input_dirty = false; + value_input->set_text(get_text_value()); + } + set_process_internal(false); + break; + case NOTIFICATION_DRAW: _draw_spin_slider(); break; @@ -590,6 +600,7 @@ EditorSpinSlider::EditorSpinSlider() { value_input->connect("focus_exited", this, "_value_focus_exited"); value_input->connect("gui_input", this, "_value_input_gui_input"); value_input_just_closed = false; + value_input_dirty = false; hide_slider = false; read_only = false; use_custom_label_color = false; diff --git a/editor/editor_spin_slider.h b/editor/editor_spin_slider.h index fae52ea661e..097d9f1d317 100644 --- a/editor/editor_spin_slider.h +++ b/editor/editor_spin_slider.h @@ -64,6 +64,7 @@ class EditorSpinSlider : public Range { LineEdit *value_input; bool value_input_just_closed; + bool value_input_dirty; void _grabber_gui_input(const Ref &p_event); void _value_input_closed(); diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp index f2a7ff35729..6dfd6c8dc29 100644 --- a/editor/import/resource_importer_obj.cpp +++ b/editor/import/resource_importer_obj.cpp @@ -391,11 +391,11 @@ static Error _parse_obj(const String &p_path, List> &r_meshes, bool p_ current_material_library = l.replace("mtllib", "").strip_edges(); if (!material_map.has(current_material_library)) { Map> lib; - Error err = _parse_material_library(current_material_library, lib, r_missing_deps); - if (err == ERR_CANT_OPEN) { - String dir = p_path.get_base_dir(); - err = _parse_material_library(dir.plus_file(current_material_library), lib, r_missing_deps); + String lib_path = current_material_library; + if (lib_path.is_rel_path()) { + lib_path = p_path.get_base_dir().plus_file(current_material_library); } + Error err = _parse_material_library(lib_path, lib, r_missing_deps); if (err == OK) { material_map[current_material_library] = lib; } diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp index fc51dc31a2b..4dd87b6fc01 100644 --- a/editor/plugins/script_editor_plugin.cpp +++ b/editor/plugins/script_editor_plugin.cpp @@ -1969,9 +1969,10 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra Ref