diff --git a/about/docs_changelog.rst b/about/docs_changelog.rst index e6e1c5604..f75360d3e 100644 --- a/about/docs_changelog.rst +++ b/about/docs_changelog.rst @@ -282,7 +282,7 @@ Plugins ^^^^^^^ - :ref:`doc_making_main_screen_plugins` -- :ref:`doc_spatial_gizmo_plugins` +- :ref:`doc_3d_gizmo_plugins` Platform-specific ^^^^^^^^^^^^^^^^^ diff --git a/tutorials/3d/procedural_geometry/immediategeometry.rst b/tutorials/3d/procedural_geometry/immediatemesh.rst similarity index 100% rename from tutorials/3d/procedural_geometry/immediategeometry.rst rename to tutorials/3d/procedural_geometry/immediatemesh.rst diff --git a/tutorials/3d/using_gridmaps.rst b/tutorials/3d/using_gridmaps.rst index 8c3a7179a..fce9d221c 100644 --- a/tutorials/3d/using_gridmaps.rst +++ b/tutorials/3d/using_gridmaps.rst @@ -42,8 +42,8 @@ cases you'll want to assign collision bodies to the meshes. Collisions ---------- -You can manually assign a :ref:`class_StaticBody` and -:ref:`class_CollisionShape` to each mesh. Alternatively, you can use the "Mesh" menu +You can manually assign a :ref:`class_StaticBody3D` and +:ref:`class_CollisionShape3D` to each mesh. Alternatively, you can use the "Mesh" menu to automatically create the collision body based on the mesh data. .. image:: img/gridmap_create_body.png diff --git a/tutorials/assets_pipeline/importing_scenes.rst b/tutorials/assets_pipeline/importing_scenes.rst index 9e9c16dfa..c587b2fbc 100644 --- a/tutorials/assets_pipeline/importing_scenes.rst +++ b/tutorials/assets_pipeline/importing_scenes.rst @@ -434,8 +434,8 @@ will create a triangle mesh collision shape, which is a slow, but accurate option for collision detection. This option is usually what you want for level geometry (but see also ``-colonly`` below). -The option ``-convcol`` will create a :ref:`class_convexpolygonshape` instead of -a :ref:`class_concavepolygonshape`. Unlike triangle meshes which can be concave, +The option ``-convcol`` will create a :ref:`class_ConvexPolygonShape3D` instead of +a :ref:`class_ConcavePolygonShape3D`. Unlike triangle meshes which can be concave, a convex shape can only accurately represent a shape that doesn't have any concave angles (a pyramid is convex, but a hollow box is concave). Due to this, convex collision shapes are generally not suited for level geometry. When @@ -448,22 +448,22 @@ enough for collisions. This can create physics glitches and slow down the engine unnecessarily. To solve this, the ``-colonly`` modifier exists. It will remove the mesh upon -importing and will create a :ref:`class_staticbody` collision instead. +importing and will create a :ref:`class_StaticBody3D` collision instead. This helps the visual mesh and actual collision to be separated. -The option ``-convcolonly`` works in a similar way, but will create a :ref:`class_convexpolygonshape` instead. +The option ``-convcolonly`` works in a similar way, but will create a :ref:`class_ConvexPolygonShape3D` instead. With Collada files the option ``-colonly`` can also be used with Blender's empty objects. -On import, it will create a :ref:`class_staticbody` with +On import, it will create a :ref:`class_StaticBody3D` with a collision node as a child. The collision node will have one of a number of predefined shapes, depending on Blender's empty draw type: .. image:: img/3dimp_BlenderEmptyDrawTypes.png -- Single arrow will create a :ref:`class_rayshape`. -- Cube will create a :ref:`class_boxshape`. -- Image will create a :ref:`class_worldmarginshape`. -- Sphere (and the others not listed) will create a :ref:`class_sphereshape`. +- Single arrow will create a :ref:`class_SeparationRayShape3D`. +- Cube will create a :ref:`class_BoxShape3D`. +- Image will create a :ref:`class_WorldBoundaryShape3D`. +- Sphere (and the others not listed) will create a :ref:`class_SphereShape3D`. When possible, **try to use a few primitive collision shapes** instead of triangle mesh or convex shapes. Primitive shapes often have the best performance and @@ -493,13 +493,13 @@ Create a VehicleBody (-vehicle) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A mesh node with the ``-vehicle`` suffix will be imported as a child to a -:ref:`class_VehicleBody` node. +:ref:`class_VehicleBody3D` node. Create a VehicleWheel (-wheel) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ A mesh node with the ``-wheel`` suffix will be imported as a child to a -:ref:`class_VehicleWheel` node. +:ref:`class_VehicleWheel3D` node. Rigid Body (-rigid) ~~~~~~~~~~~~~~~~~~~ diff --git a/tutorials/best_practices/godot_interfaces.rst b/tutorials/best_practices/godot_interfaces.rst index 6b07bf827..6a6c065d7 100644 --- a/tutorials/best_practices/godot_interfaces.rst +++ b/tutorials/best_practices/godot_interfaces.rst @@ -276,7 +276,7 @@ following checks, in order: - Note that this happens even for non-legal symbol names such as in the case of :ref:`TileSet `'s "1/tile_name" property. This refers to the name of the tile with ID 1, i.e. - :ref:`TileSet.tile_get_name(1) `. + ``TileSet.tile_get_name(1)``. As a result, this duck-typed system can locate a property either in the script, the object's class, or any class that object inherits, but only for things @@ -451,7 +451,7 @@ accesses: // name or group can fill in for it. Also note that in C#, these methods // will be slower than static accesses with traditional interfaces. -- Outsource the access to a :ref:`FuncRef `. These may be useful +- Outsource the access to a :ref:`Callable `. These may be useful in cases where one needs the max level of freedom from dependencies. In this case, one relies on an external context to setup the method. diff --git a/tutorials/best_practices/scene_organization.rst b/tutorials/best_practices/scene_organization.rst index cfc2fe519..0bd4f921c 100644 --- a/tutorials/best_practices/scene_organization.rst +++ b/tutorials/best_practices/scene_organization.rst @@ -89,7 +89,7 @@ initialize it: // Child Call(MethodName); // Call parent-defined method (which child must own). -3. Initialize a :ref:`FuncRef ` property. Safer than a method +3. Initialize a :ref:`Callable ` property. Safer than a method as ownership of the method is unnecessary. Used to start behavior. .. tabs:: @@ -371,8 +371,8 @@ own place in the hierarchy as a sibling or some other relation. them. As nodes with no transform, Nodes will not pass along such information to their children. 2. The **imperative** solution: Use the ``set_as_toplevel`` setter for the - :ref:`CanvasItem ` or - :ref:`Node3D ` node. This will make + :ref:`CanvasItem ` or + :ref:`Node3D ` node. This will make the node ignore its inherited transform. .. note:: diff --git a/tutorials/inputs/inputevent.rst b/tutorials/inputs/inputevent.rst index 9595da1b1..5452380df 100644 --- a/tutorials/inputs/inputevent.rst +++ b/tutorials/inputs/inputevent.rst @@ -71,7 +71,7 @@ received input, in order: 1. First of all, the standard :ref:`Node._input() ` function will be called in any node that overrides it (and hasn't disabled input processing with :ref:`Node.set_process_input() `). - If any function consumes the event, it can call :ref:`SceneTree.set_input_as_handled() `, and the event will + If any function consumes the event, it can call :ref:`Viewport.set_input_as_handled() `, and the event will not spread any more. This ensures that you can filter all events of interest, even before the GUI. For gameplay input, :ref:`Node._unhandled_input() ` is generally a better fit, because it allows the GUI to intercept the events. 2. Second, it will try to feed the input to the GUI, and see if any @@ -87,7 +87,7 @@ received input, in order: 3. If so far no one consumed the event, the unhandled input callback will be called if overridden (and not disabled with :ref:`Node.set_process_unhandled_input() `). - If any function consumes the event, it can call :ref:`SceneTree.set_input_as_handled() `, and the + If any function consumes the event, it can call :ref:`Viewport.set_input_as_handled() `, and the event will not spread any more. The unhandled input callback is ideal for full-screen gameplay events, so they are not received when a GUI is active. 4. If no one wanted the event so far, and a :ref:`Camera3D ` is assigned to the Viewport with :ref:`Object Picking ` turned on, a ray to the physics world (in the ray direction from diff --git a/tutorials/io/data_paths.rst b/tutorials/io/data_paths.rst index 4b4d13551..119352fb9 100644 --- a/tutorials/io/data_paths.rst +++ b/tutorials/io/data_paths.rst @@ -92,7 +92,7 @@ by other applications for security reasons. On HTML5 exports, ``user://`` will refer to a virtual filesystem stored on the device via IndexedDB. (Interaction with the main filesystem can still be performed -through the :ref:`JavaScript ` singleton.) +through the :ref:`JavaScriptBridge ` singleton.) Converting paths to absolute paths or "local" paths --------------------------------------------------- diff --git a/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst b/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst index 2dfc41c4d..8f4a5f381 100644 --- a/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst +++ b/tutorials/performance/vertex_animation/animating_thousands_of_fish.rst @@ -28,7 +28,7 @@ Here is the fish we will be using for the example images, you can use any fish m shared with a creative commons license. CC0 1.0 Universal (CC0 1.0) Public Domain Dedication https://creativecommons.org/publicdomain/zero/1.0/ -Typically, you would use bones and a :ref:`Skeleton ` to animate objects. However, +Typically, you would use bones and a :ref:`Skeleton3D ` to animate objects. However, bones are animated on the CPU and so you end having to calculate thousands of operations every frame and it becomes impossible to have thousands of objects. Using vertex animation in a vertex shader, you avoid using bones and can instead calculate the full animation in a few lines of code diff --git a/tutorials/physics/collision_shapes_2d.rst b/tutorials/physics/collision_shapes_2d.rst index 4df6a5c1e..64d36e486 100644 --- a/tutorials/physics/collision_shapes_2d.rst +++ b/tutorials/physics/collision_shapes_2d.rst @@ -32,8 +32,8 @@ Godot provides the following primitive collision shape types: - :ref:`class_CircleShape2D` - :ref:`class_CapsuleShape2D` - :ref:`class_SegmentShape2D` -- :ref:`class_RayShape2D` (designed for characters) -- :ref:`class_LineShape2D` (infinite plane) +- :ref:`class_SeparationRayShape2D` (designed for characters) +- :ref:`class_WorldBoundaryShape2D` (infinite plane) You can represent the collision of most smaller objects using one or more primitive shapes. However, for more complex objects, such as a large ship or a diff --git a/tutorials/physics/collision_shapes_3d.rst b/tutorials/physics/collision_shapes_3d.rst index 47d384380..4f67e2eb9 100644 --- a/tutorials/physics/collision_shapes_3d.rst +++ b/tutorials/physics/collision_shapes_3d.rst @@ -12,9 +12,9 @@ This guide explains: Godot provides many kinds of collision shapes, with different performance and accuracy tradeoffs. -You can define the shape of a :ref:`class_PhysicsBody` by adding one or more -:ref:`CollisionShapes ` as child nodes. Note that you must -add a :ref:`class_Shape` *resource* to collision shape nodes in the Inspector +You can define the shape of a :ref:`class_PhysicsBody3D` by adding one or more +:ref:`CollisionShape3Ds ` as child nodes. Note that you must +add a :ref:`class_Shape3D` *resource* to collision shape nodes in the Inspector dock. .. note:: @@ -27,10 +27,10 @@ Primitive collision shapes Godot provides the following primitive collision shape types: -- :ref:`class_BoxShape` -- :ref:`class_SphereShape` -- :ref:`class_CapsuleShape` -- :ref:`class_CylinderShape` +- :ref:`class_BoxShape3D` +- :ref:`class_SphereShape3D` +- :ref:`class_CapsuleShape3D` +- :ref:`class_CylinderShape3D` You can represent the collision of most smaller objects using one or more primitive shapes. However, for more complex objects, such as a large ship or a @@ -43,7 +43,7 @@ better performance as well. Convex collision shapes ----------------------- -:ref:`Convex collision shapes ` are a compromise +:ref:`Convex collision shapes ` are a compromise between primitive collision shapes and concave collision shapes. They can represent shapes of any complexity, but with an important caveat. As their name implies, an individual shape can only represent a *convex* shape. For instance, @@ -75,7 +75,7 @@ viewport. The editor exposes two generation modes: Concave or trimesh collision shapes ----------------------------------- -:ref:`Concave collision shapes `, also called trimesh +:ref:`Concave collision shapes `, also called trimesh collision shapes, can take any form, from a few triangles to thousands of triangles. Concave shapes are the slowest option but are also the most accurate in Godot. **You can only use concave shapes within StaticBodies.** They will not diff --git a/tutorials/physics/ray-casting.rst b/tutorials/physics/ray-casting.rst index 980449276..9c862c4d2 100644 --- a/tutorials/physics/ray-casting.rst +++ b/tutorials/physics/ray-casting.rst @@ -14,7 +14,7 @@ do this in 2D and 3D. Godot stores all the low level game information in servers, while the scene is only a frontend. As such, ray casting is generally a lower-level task. For simple raycasts, nodes like -:ref:`RayCast ` and :ref:`RayCast2D ` +:ref:`RayCast3D ` and :ref:`RayCast2D ` will work, as they return every frame what the result of a raycast is. diff --git a/tutorials/physics/rigid_body.rst b/tutorials/physics/rigid_body.rst index 2637897bd..e24a0bb48 100644 --- a/tutorials/physics/rigid_body.rst +++ b/tutorials/physics/rigid_body.rst @@ -7,7 +7,7 @@ What is a rigid body? --------------------- A rigid body is one that is directly controlled by the physics engine in order to simulate the behavior of physical objects. -In order to define the shape of the body, it must have one or more :ref:`Shape ` objects assigned. Note that setting the position of these shapes will affect the body's center of mass. +In order to define the shape of the body, it must have one or more :ref:`Shape3D ` objects assigned. Note that setting the position of these shapes will affect the body's center of mass. How to control a rigid body --------------------------- diff --git a/tutorials/physics/soft_body.rst b/tutorials/physics/soft_body.rst index 2e72246d2..d4c69a686 100644 --- a/tutorials/physics/soft_body.rst +++ b/tutorials/physics/soft_body.rst @@ -42,9 +42,9 @@ Open the ``PlaneMesh`` properties and set the size(x: 0.5 y: 1) then set ``Subdi .. tip:: Subdivision generates a more tessellated mesh for better simulations. -Add a :ref:`BoneAttachment ` node under the skeleton node and select the Neck bone to attach the cloak to the character skeleton. +Add a :ref:`BoneAttachment3D ` node under the skeleton node and select the Neck bone to attach the cloak to the character skeleton. -.. note:: ``BoneAttachment`` node is to attach objects to a bone of a armature. The attached object will follow the bone's movement, weapon of a character can be attached this way. +.. note:: ``BoneAttachment3D`` node is to attach objects to a bone of a armature. The attached object will follow the bone's movement, weapon of a character can be attached this way. .. image:: img/softbody_cloak_bone_attach.png diff --git a/tutorials/plugins/editor/import_plugins.rst b/tutorials/plugins/editor/import_plugins.rst index fda289282..85a12cce5 100644 --- a/tutorials/plugins/editor/import_plugins.rst +++ b/tutorials/plugins/editor/import_plugins.rst @@ -94,21 +94,21 @@ Let's begin to code our plugin, one method at time: extends EditorImportPlugin - func get_importer_name(): + func _get_importer_name(): return "demos.sillymaterial" The first method is the -:ref:`get_importer_name()`. This is a +:ref:`_get_importer_name()`. This is a unique name for your plugin that is used by Godot to know which import was used in a certain file. When the files needs to be reimported, the editor will know which plugin to call. :: - func get_visible_name(): + func _get_visible_name(): return "Silly Material" -The :ref:`get_visible_name()` method is +The :ref:`_get_visible_name()` method is responsible for returning the name of the type it imports and it will be shown to the user in the Import dock. @@ -118,11 +118,11 @@ descriptive name for your plugin. :: - func get_recognized_extensions(): + func _get_recognized_extensions(): return ["mtxt"] Godot's import system detects file types by their extension. In the -:ref:`get_recognized_extensions()` +:ref:`_get_recognized_extensions()` method you return an array of strings to represent each extension that this plugin can understand. If an extension is recognized by more than one plugin, the user can select which one to use when importing the files. @@ -134,7 +134,7 @@ the user can select which one to use when importing the files. :: - func get_save_extension(): + func _get_save_extension(): return "material" The imported files are saved in the ``.import`` folder at the project's root. @@ -150,7 +150,7 @@ way by the engine. :: - func get_resource_type(): + func _get_resource_type(): return "StandardMaterial3D" The imported resource has a specific type, so the editor can know which property @@ -196,14 +196,14 @@ plugin: func get_preset_count(): return Presets.size() -The :ref:`get_preset_count() ` method +The :ref:`_get_preset_count() ` method returns the amount of presets that this plugins defines. We only have one preset now, but we can make this method future-proof by returning the size of our ``Presets`` enumeration. :: - func get_preset_name(preset): + func _get_preset_name(preset): match preset: Presets.DEFAULT: return "Default" @@ -212,7 +212,7 @@ now, but we can make this method future-proof by returning the size of our Here we have the -:ref:`get_preset_name() ` method, which +:ref:`_get_preset_name() ` method, which gives names to the presets as they will be presented to the user, so be sure to use short and clear names. @@ -226,7 +226,7 @@ you do this you have to be careful when you add more presets. :: - func get_import_options(preset): + func _get_import_options(preset): match preset: Presets.DEFAULT: return [{ @@ -237,7 +237,7 @@ you do this you have to be careful when you add more presets. return [] This is the method which defines the available options. -:ref:`get_import_options() ` returns +:ref:`_get_import_options() ` returns an array of dictionaries, and each dictionary contains a few keys that are checked to customize the option as its shown to the user. The following table shows the possible keys: @@ -271,11 +271,11 @@ of options first and then change it based on the preset. :: - func get_option_visibility(option, options): + func _get_option_visibility(option, options): return true For the -:ref:`get_option_visibility() ` +:ref:`_get_option_visibility() ` method, we simply return ``true`` because all of our options (i.e. the single one we defined) are visible all the time. @@ -286,12 +286,12 @@ The ``import`` method --------------------- The heavy part of the process, responsible for converting the files into -resources, is covered by the :ref:`import() ` +resources, is covered by the :ref:`_import() ` method. Our sample code is a bit long, so let's split in a few parts: :: - func import(source_file, save_path, options, r_platform_variants, r_gen_files): + func _import(source_file, save_path, options, r_platform_variants, r_gen_files): var file = File.new() var err = file.open(source_file, File.READ) if err != OK: diff --git a/tutorials/scripting/gdnative/gdnative_cpp_example.rst b/tutorials/scripting/gdnative/gdnative_cpp_example.rst index 733bdd5c7..36b40b6ed 100644 --- a/tutorials/scripting/gdnative/gdnative_cpp_example.rst +++ b/tutorials/scripting/gdnative/gdnative_cpp_example.rst @@ -642,7 +642,7 @@ node. In the **Node** dock, we can find our new signal and link it up by pressin the **Connect** button or double-clicking the signal. We've added a script on our main node and implemented our signal like this: -.. code-block:: GDScript +.. code-block:: gdscript extends Node diff --git a/tutorials/scripting/gdscript/gdscript_advanced.rst b/tutorials/scripting/gdscript/gdscript_advanced.rst index ffa2f0c3a..b35e0f10d 100644 --- a/tutorials/scripting/gdscript/gdscript_advanced.rst +++ b/tutorials/scripting/gdscript/gdscript_advanced.rst @@ -166,7 +166,7 @@ too. Some Examples: In GDScript, only base types (int, float, string and the vector types) are passed by value to functions (value is copied). Everything else (instances, arrays, dictionaries, etc) is passed as reference. Classes -that inherit :ref:`class_Reference` (the default if nothing is specified) +that inherit :ref:`class_RefCounted` (the default if nothing is specified) will be freed when not used, but manual memory management is allowed too if inheriting manually from :ref:`class_Object`. diff --git a/tutorials/shaders/using_viewport_as_texture.rst b/tutorials/shaders/using_viewport_as_texture.rst index 88a21f6f1..1b053fe3f 100644 --- a/tutorials/shaders/using_viewport_as_texture.rst +++ b/tutorials/shaders/using_viewport_as_texture.rst @@ -15,7 +15,7 @@ of making a procedural planet like the one below: .. note:: This tutorial does not cover how to code a dynamic atmosphere like the one this planet has. This tutorial assumes you are familiar with how to set up a basic scene including: -a :ref:`Camera3D `, a :ref:`light source `, a +a :ref:`Camera3D `, a :ref:`light source `, a :ref:`MeshInstance3D ` with a :ref:`Primitive Mesh `, and applying a :ref:`StandardMaterial3D ` to the mesh. The focus will be on using the :ref:`Viewport ` to dynamically create textures that can be applied to the mesh. @@ -297,7 +297,7 @@ when blending one transparent color on top of another, even if the background ha does in this case), you end up with weird color bleed issues. Setting ``blend_premul_alpha`` fixes that. Now the planet should look like it is reflecting light on the ocean but not the land. If you haven't done -so already, add an :ref:`OmniLight ` to the scene so you can move it around and see the +so already, add an :ref:`OmniLight3D ` to the scene so you can move it around and see the effect of the reflections on the ocean. .. image:: img/planet_ocean_reflect.png diff --git a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst index 447dd84a0..94987a8c8 100644 --- a/tutorials/shaders/your_first_shader/your_first_3d_shader.rst +++ b/tutorials/shaders/your_first_shader/your_first_3d_shader.rst @@ -278,7 +278,7 @@ again, where it says "Perspective", and select "Display Normal". Note how the mesh color goes flat. This is because the lighting on it is flat. Let's add a light! -First, we will add an :ref:`OmniLight` to the scene. +First, we will add an :ref:`OmniLight3D` to the scene. .. image:: img/light.png diff --git a/tutorials/ui/bbcode_in_richtextlabel.rst b/tutorials/ui/bbcode_in_richtextlabel.rst index d5dc3c628..328963766 100644 --- a/tutorials/ui/bbcode_in_richtextlabel.rst +++ b/tutorials/ui/bbcode_in_richtextlabel.rst @@ -26,7 +26,7 @@ By default :ref:`class_RichTextLabel` functions exactly the same as the normal l has the :ref:`property_text ` property, which you can edit to have uniformly formatted text. To be able to use BBCodes and rich text formatting you need to turn on the BBCode mode by setting :ref:`bbcode_enabled `. -After that you can edit the :ref:`bbcode_text ` +After that you can edit the :ref:`text ` property using available tags. Both properties are located in the "Bb Code" section of the Inspector.