Browse Source

Sync classref with current source

Rémi Verschelde 6 năm trước cách đây
mục cha
commit
9443b521fb

+ 75 - 21
classes/[email protected]

@@ -66,9 +66,9 @@ Methods
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`float<class_float>`                                 | :ref:`floor<class_@GDScript_method_floor>` **(** :ref:`float<class_float>` s **)**                                                                                                                                                     |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| :ref:`float<class_float>`                                 | :ref:`fmod<class_@GDScript_method_fmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**                                                                                                                          |
+| :ref:`float<class_float>`                                 | :ref:`fmod<class_@GDScript_method_fmod>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**                                                                                                                          |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| :ref:`float<class_float>`                                 | :ref:`fposmod<class_@GDScript_method_fposmod>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**                                                                                                                    |
+| :ref:`float<class_float>`                                 | :ref:`fposmod<class_@GDScript_method_fposmod>` **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**                                                                                                                    |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`FuncRef<class_FuncRef>`                             | :ref:`funcref<class_@GDScript_method_funcref>` **(** :ref:`Object<class_Object>` instance, :ref:`String<class_String>` funcname **)**                                                                                                  |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -96,6 +96,8 @@ Methods
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`Variant<class_Variant>`                             | :ref:`lerp<class_@GDScript_method_lerp>` **(** :ref:`Variant<class_Variant>` from, :ref:`Variant<class_Variant>` to, :ref:`float<class_float>` weight **)**                                                                            |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| :ref:`float<class_float>`                                 | :ref:`lerp_angle<class_@GDScript_method_lerp_angle>` **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**                                                                        |
++-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`float<class_float>`                                 | :ref:`linear2db<class_@GDScript_method_linear2db>` **(** :ref:`float<class_float>` nrg **)**                                                                                                                                           |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`Resource<class_Resource>`                           | :ref:`load<class_@GDScript_method_load>` **(** :ref:`String<class_String>` path **)**                                                                                                                                                  |
@@ -114,7 +116,9 @@ Methods
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`Vector2<class_Vector2>`                             | :ref:`polar2cartesian<class_@GDScript_method_polar2cartesian>` **(** :ref:`float<class_float>` r, :ref:`float<class_float>` th **)**                                                                                                   |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
-| :ref:`float<class_float>`                                 | :ref:`pow<class_@GDScript_method_pow>` **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**                                                                                                                            |
+| :ref:`int<class_int>`                                     | :ref:`posmod<class_@GDScript_method_posmod>` **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)**                                                                                                                              |
++-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| :ref:`float<class_float>`                                 | :ref:`pow<class_@GDScript_method_pow>` **(** :ref:`float<class_float>` base, :ref:`float<class_float>` exp **)**                                                                                                                       |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`Resource<class_Resource>`                           | :ref:`preload<class_@GDScript_method_preload>` **(** :ref:`String<class_String>` path **)**                                                                                                                                            |
 +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -492,42 +496,45 @@ Rounds ``s`` to the closest smaller integer and returns it.
 
 .. _class_@GDScript_method_fmod:
 
-- :ref:`float<class_float>` **fmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
+- :ref:`float<class_float>` **fmod** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
 
-Returns the floating-point remainder of ``x/y``.
+Returns the floating-point remainder of ``a/b``, keeping the sign of ``a``.
 
 ::
 
     # Remainder is 1.5
     var remainder = fmod(7, 5.5)
 
+For the integer remainder operation, use the % operator.
+
 .. _class_@GDScript_method_fposmod:
 
-- :ref:`float<class_float>` **fposmod** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
+- :ref:`float<class_float>` **fposmod** **(** :ref:`float<class_float>` a, :ref:`float<class_float>` b **)**
 
-Returns the floating-point remainder of ``x/y`` that wraps equally in positive and negative.
+Returns the floating-point modulus of ``a/b`` that wraps equally in positive and negative.
 
 ::
 
-    var i = -10
-    while i < 0:
-        prints(i, fposmod(i, 10))
+    var i = -6
+    while i < 5:
+        prints(i, fposmod(i, 3))
         i += 1
 
 Produces:
 
 ::
 
-    -10 10
-    -9 1
-    -8 2
-    -7 3
-    -6 4
-    -5 5
-    -4 6
-    -3 7
-    -2 8
-    -1 9
+    -6 0
+    -5 1
+    -4 2
+    -3 0
+    -2 1
+    -1 2
+    0 0
+    1 1
+    2 2
+    3 0
+    4 1
 
 .. _class_@GDScript_method_funcref:
 
@@ -679,6 +686,24 @@ If both are of the same vector type (:ref:`Vector2<class_Vector2>`, :ref:`Vector
     lerp(0, 4, 0.75) # Returns 3.0
     lerp(Vector2(1, 5), Vector2(3, 2), 0.5) # Returns Vector2(2, 3.5)
 
+.. _class_@GDScript_method_lerp_angle:
+
+- :ref:`float<class_float>` **lerp_angle** **(** :ref:`float<class_float>` from, :ref:`float<class_float>` to, :ref:`float<class_float>` weight **)**
+
+Linearly interpolates between two angles (in radians) by a normalized value.
+
+Similar to :ref:`lerp<class_@GDScript_method_lerp>` but interpolate correctly when the angles wrap around :ref:`TAU<class_@GDScript_constant_TAU>`.
+
+::
+
+    extends Sprite
+    var elapsed = 0.0
+    func _process(delta):
+        var min_angle = deg2rad(0.0)
+        var max_angle = deg2rad(90.0)
+        rotation = lerp_angle(min_angle, max_angle, elapsed)
+        elapsed += delta
+
 .. _class_@GDScript_method_linear2db:
 
 - :ref:`float<class_float>` **linear2db** **(** :ref:`float<class_float>` nrg **)**
@@ -780,9 +805,38 @@ Note that JSON objects do not preserve key order like Godot dictionaries, thus y
 
 Converts a 2D point expressed in the polar coordinate system (a distance from the origin ``r`` and an angle ``th``) to the cartesian coordinate system (X and Y axis).
 
+.. _class_@GDScript_method_posmod:
+
+- :ref:`int<class_int>` **posmod** **(** :ref:`int<class_int>` a, :ref:`int<class_int>` b **)**
+
+Returns the integer modulus of ``a/b`` that wraps equally in positive and negative.
+
+::
+
+    var i = -6
+    while i < 5:
+        prints(i, posmod(i, 3))
+        i += 1
+
+Produces:
+
+::
+
+    -6 0
+    -5 1
+    -4 2
+    -3 0
+    -2 1
+    -1 2
+    0 0
+    1 1
+    2 2
+    3 0
+    4 1
+
 .. _class_@GDScript_method_pow:
 
-- :ref:`float<class_float>` **pow** **(** :ref:`float<class_float>` x, :ref:`float<class_float>` y **)**
+- :ref:`float<class_float>` **pow** **(** :ref:`float<class_float>` base, :ref:`float<class_float>` exp **)**
 
 Returns the result of ``x`` raised to the power of ``y``.
 

+ 29 - 30
classes/class_astar.rst

@@ -95,8 +95,8 @@ Adds a new point at the given position with the given identifier. The algorithm
 
 ::
 
-    var as = AStar.new()
-    as.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1
+    var astar = AStar.new()
+    astar.add_point(1, Vector3(1, 0, 0), 4) # Adds the point (1, 0, 0) with weight_scale 4 and id 1
 
 If there already exists a point for the given ``id``, its position and weight scale are updated to the given values.
 
@@ -120,10 +120,10 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o
 
 ::
 
-    var as = AStar.new()
-    as.add_point(1, Vector3(1, 1, 0))
-    as.add_point(2, Vector3(0, 5, 0))
-    as.connect_points(1, 2, false)
+    var astar = AStar.new()
+    astar.add_point(1, Vector3(1, 1, 0))
+    astar.add_point(2, Vector3(0, 5, 0))
+    astar.connect_points(1, 2, false)
 
 .. _class_AStar_method_disconnect_points:
 
@@ -151,11 +151,11 @@ Returns the closest position to ``to_position`` that resides inside a segment be
 
 ::
 
-    var as = AStar.new()
-    as.add_point(1, Vector3(0, 0, 0))
-    as.add_point(2, Vector3(0, 5, 0))
-    as.connect_points(1, 2)
-    var res = as.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0)
+    var astar = AStar.new()
+    astar.add_point(1, Vector3(0, 0, 0))
+    astar.add_point(2, Vector3(0, 5, 0))
+    astar.connect_points(1, 2)
+    var res = astar.get_closest_position_in_segment(Vector3(3, 3, 0)) # Returns (0, 3, 0)
 
 The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the closest position in the segment to the given point.
 
@@ -167,19 +167,18 @@ Returns an array with the IDs of the points that form the path found by AStar be
 
 ::
 
-    var as = AStar.new()
-    as.add_point(1, Vector3(0, 0, 0))
-    as.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1
-    as.add_point(3, Vector3(1, 1, 0))
-    as.add_point(4, Vector3(2, 0, 0))
+    var astar = AStar.new()
+    astar.add_point(1, Vector3(0, 0, 0))
+    astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1
+    astar.add_point(3, Vector3(1, 1, 0))
+    astar.add_point(4, Vector3(2, 0, 0))
     
-    as.connect_points(1, 2, false)
-    as.connect_points(2, 3, false)
-    as.connect_points(4, 3, false)
-    as.connect_points(1, 4, false)
-    as.connect_points(5, 4, false)
+    astar.connect_points(1, 2, false)
+    astar.connect_points(2, 3, false)
+    astar.connect_points(4, 3, false)
+    astar.connect_points(1, 4, false)
     
-    var res = as.get_id_path(1, 3) # Returns [1, 2, 3]
+    var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
 
 If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
 
@@ -191,16 +190,16 @@ Returns an array with the IDs of the points that form the connection with the gi
 
 ::
 
-    var as = AStar.new()
-    as.add_point(1, Vector3(0, 0, 0))
-    as.add_point(2, Vector3(0, 1, 0))
-    as.add_point(3, Vector3(1, 1, 0))
-    as.add_point(4, Vector3(2, 0, 0))
+    var astar = AStar.new()
+    astar.add_point(1, Vector3(0, 0, 0))
+    astar.add_point(2, Vector3(0, 1, 0))
+    astar.add_point(3, Vector3(1, 1, 0))
+    astar.add_point(4, Vector3(2, 0, 0))
     
-    as.connect_points(1, 2, true)
-    as.connect_points(1, 3, true)
+    astar.connect_points(1, 2, true)
+    astar.connect_points(1, 3, true)
     
-    var neighbors = as.get_point_connections(1) # Returns [2, 3]
+    var neighbors = astar.get_point_connections(1) # Returns [2, 3]
 
 .. _class_AStar_method_get_point_path:
 

+ 29 - 30
classes/class_astar2d.rst

@@ -77,8 +77,8 @@ Adds a new point at the given position with the given identifier. The algorithm
 
 ::
 
-    var as = AStar2D.new()
-    as.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
+    var astar = AStar2D.new()
+    astar.add_point(1, Vector2(1, 0), 4) # Adds the point (1, 0) with weight_scale 4 and id 1
 
 If there already exists a point for the given ``id``, its position and weight scale are updated to the given values.
 
@@ -102,10 +102,10 @@ Creates a segment between the given points. If ``bidirectional`` is ``false``, o
 
 ::
 
-    var as = AStar2D.new()
-    as.add_point(1, Vector2(1, 1))
-    as.add_point(2, Vector2(0, 5))
-    as.connect_points(1, 2, false)
+    var astar = AStar2D.new()
+    astar.add_point(1, Vector2(1, 1))
+    astar.add_point(2, Vector2(0, 5))
+    astar.connect_points(1, 2, false)
 
 .. _class_AStar2D_method_disconnect_points:
 
@@ -133,11 +133,11 @@ Returns the closest position to ``to_position`` that resides inside a segment be
 
 ::
 
-    var as = AStar2D.new()
-    as.add_point(1, Vector2(0, 0))
-    as.add_point(2, Vector2(0, 5))
-    as.connect_points(1, 2)
-    var res = as.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)
+    var astar = AStar2D.new()
+    astar.add_point(1, Vector2(0, 0))
+    astar.add_point(2, Vector2(0, 5))
+    astar.connect_points(1, 2)
+    var res = astar.get_closest_position_in_segment(Vector2(3, 3)) # Returns (0, 3)
 
 The result is in the segment that goes from ``y = 0`` to ``y = 5``. It's the closest position in the segment to the given point.
 
@@ -149,19 +149,18 @@ Returns an array with the IDs of the points that form the path found by AStar2D
 
 ::
 
-    var as = AStar2D.new()
-    as.add_point(1, Vector2(0, 0))
-    as.add_point(2, Vector2(0, 1), 1) # Default weight is 1
-    as.add_point(3, Vector2(1, 1))
-    as.add_point(4, Vector2(2, 0))
+    var astar = AStar2D.new()
+    astar.add_point(1, Vector2(0, 0))
+    astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1
+    astar.add_point(3, Vector2(1, 1))
+    astar.add_point(4, Vector2(2, 0))
     
-    as.connect_points(1, 2, false)
-    as.connect_points(2, 3, false)
-    as.connect_points(4, 3, false)
-    as.connect_points(1, 4, false)
-    as.connect_points(5, 4, false)
+    astar.connect_points(1, 2, false)
+    astar.connect_points(2, 3, false)
+    astar.connect_points(4, 3, false)
+    astar.connect_points(1, 4, false)
     
-    var res = as.get_id_path(1, 3) # Returns [1, 2, 3]
+    var res = astar.get_id_path(1, 3) # Returns [1, 2, 3]
 
 If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` instead, because now even though the distance is longer, it's "easier" to get through point 4 than through point 2.
 
@@ -173,16 +172,16 @@ Returns an array with the IDs of the points that form the connection with the gi
 
 ::
 
-    var as = AStar2D.new()
-    as.add_point(1, Vector2(0, 0))
-    as.add_point(2, Vector2(0, 1))
-    as.add_point(3, Vector2(1, 1))
-    as.add_point(4, Vector2(2, 0))
+    var astar = AStar2D.new()
+    astar.add_point(1, Vector2(0, 0))
+    astar.add_point(2, Vector2(0, 1))
+    astar.add_point(3, Vector2(1, 1))
+    astar.add_point(4, Vector2(2, 0))
     
-    as.connect_points(1, 2, true)
-    as.connect_points(1, 3, true)
+    astar.connect_points(1, 2, true)
+    astar.connect_points(1, 3, true)
     
-    var neighbors = as.get_point_connections(1) # Returns [2, 3]
+    var neighbors = astar.get_point_connections(1) # Returns [2, 3]
 
 .. _class_AStar2D_method_get_point_path:
 

+ 2 - 2
classes/class_directionallight.rst

@@ -26,7 +26,7 @@ Properties
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+-------+
 | :ref:`ShadowDepthRange<enum_DirectionalLight_ShadowDepthRange>` | :ref:`directional_shadow_depth_range<class_DirectionalLight_property_directional_shadow_depth_range>`           | 0     |
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+-------+
-| :ref:`float<class_float>`                                       | :ref:`directional_shadow_max_distance<class_DirectionalLight_property_directional_shadow_max_distance>`         | 200.0 |
+| :ref:`float<class_float>`                                       | :ref:`directional_shadow_max_distance<class_DirectionalLight_property_directional_shadow_max_distance>`         | 100.0 |
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+-------+
 | :ref:`ShadowMode<enum_DirectionalLight_ShadowMode>`             | :ref:`directional_shadow_mode<class_DirectionalLight_property_directional_shadow_mode>`                         | 2     |
 +-----------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+-------+
@@ -130,7 +130,7 @@ Optimizes shadow rendering for detail versus movement. See :ref:`ShadowDepthRang
 - :ref:`float<class_float>` **directional_shadow_max_distance**
 
 +-----------+------------------+
-| *Default* | 200.0            |
+| *Default* | 100.0            |
 +-----------+------------------+
 | *Setter*  | set_param(value) |
 +-----------+------------------+

+ 2 - 0
classes/class_editorinterface.rst

@@ -185,6 +185,8 @@ Saves the scene as a file at ``path``.
 
 - void **select_file** **(** :ref:`String<class_String>` file **)**
 
+Selects the file, with the path provided by ``file``, in the FileSystem dock.
+
 .. _class_EditorInterface_method_set_plugin_enabled:
 
 - void **set_plugin_enabled** **(** :ref:`String<class_String>` plugin, :ref:`bool<class_bool>` enabled **)**

+ 47 - 21
classes/class_editorplugin.rst

@@ -270,27 +270,27 @@ Adds a script at ``path`` to the Autoload list as ``name``.
 
 - :ref:`ToolButton<class_ToolButton>` **add_control_to_bottom_panel** **(** :ref:`Control<class_Control>` control, :ref:`String<class_String>` title **)**
 
-Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with ``queue_free()``.
+Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
 
 .. _class_EditorPlugin_method_add_control_to_container:
 
 - void **add_control_to_container** **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)**
 
-Adds a custom control to a container (see ``CONTAINER_*`` enum). There are many locations where custom controls can be added in the editor UI.
+Adds a custom control to a container (see :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`). There are many locations where custom controls can be added in the editor UI.
 
 Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
 
-When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>` and free it with ``queue_free()``.
+When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
 
 .. _class_EditorPlugin_method_add_control_to_dock:
 
 - void **add_control_to_dock** **(** :ref:`DockSlot<enum_EditorPlugin_DockSlot>` slot, :ref:`Control<class_Control>` control **)**
 
-Adds the control to a specific dock slot (see ``DOCK_*`` enum for options).
+Adds the control to a specific dock slot (see :ref:`DockSlot<enum_EditorPlugin_DockSlot>` for options).
 
 If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
 
-When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>` and free it with ``queue_free()``.
+When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
 
 .. _class_EditorPlugin_method_add_custom_type:
 
@@ -358,6 +358,8 @@ Clear all the state and reset the object being edited to zero. This ensures your
 
 - void **disable_plugin** **(** **)** virtual
 
+Called by the engine when the user disables the ``EditorPlugin`` in the Plugin tab of the project settings window.
+
 .. _class_EditorPlugin_method_edit:
 
 - void **edit** **(** :ref:`Object<class_Object>` object **)** virtual
@@ -368,19 +370,12 @@ This function is used for plugins that edit specific object types (nodes or reso
 
 - void **enable_plugin** **(** **)** virtual
 
+Called by the engine when the user enables the ``EditorPlugin`` in the Plugin tab of the project settings window.
+
 .. _class_EditorPlugin_method_forward_canvas_draw_over_viewport:
 
 - void **forward_canvas_draw_over_viewport** **(** :ref:`Control<class_Control>` overlay **)** virtual
 
-This method is called when there is an input event in the 2D viewport, e.g. the user clicks with the mouse in the 2D space (canvas GUI). Keep in mind that for this method to be called you have to first declare the virtual method :ref:`handles<class_EditorPlugin_method_handles>` so the editor knows that you want to work with the workspace:
-
-::
-
-    func handles(object):
-        return true
-
-Also note that the edited scene must have a root node.
-
 .. _class_EditorPlugin_method_forward_canvas_force_draw_over_viewport:
 
 - void **forward_canvas_force_draw_over_viewport** **(** :ref:`Control<class_Control>` overlay **)** virtual
@@ -389,18 +384,49 @@ Also note that the edited scene must have a root node.
 
 - :ref:`bool<class_bool>` **forward_canvas_gui_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** virtual
 
+Called when there is a root node in the current edited scene, :ref:`handles<class_EditorPlugin_method_handles>` is implemented and an :ref:`InputEvent<class_InputEvent>` happens in the 2D viewport. Intercepts the :ref:`InputEvent<class_InputEvent>`, if ``return true`` ``EditorPlugin`` consumes the ``event``, otherwise forwards ``event`` to other Editor classes. Example:
+
+::
+
+    # Prevents the InputEvent to reach other Editor classes
+    func forward_canvas_gui_input(event):
+        var forward = true
+        return forward
+
+Must ``return false`` in order to forward the :ref:`InputEvent<class_InputEvent>` to other Editor classes. Example:
+
+::
+
+    # Consumes InputEventMouseMotion and forwards other InputEvent types
+    func forward_canvas_gui_input(event):
+        var forward = false
+        if event is InputEventMouseMotion:
+            forward = true
+        return forward
+
 .. _class_EditorPlugin_method_forward_spatial_gui_input:
 
 - :ref:`bool<class_bool>` **forward_spatial_gui_input** **(** :ref:`Camera<class_Camera>` camera, :ref:`InputEvent<class_InputEvent>` event **)** virtual
 
-This method is called when there is an input event in the 3D viewport, e.g. the user clicks with the mouse in the 3D space (spatial GUI). Keep in mind that for this method to be called you have to first declare the virtual method :ref:`handles<class_EditorPlugin_method_handles>` so the editor knows that you want to work with the workspace:
+Called when there is a root node in the current edited scene, :ref:`handles<class_EditorPlugin_method_handles>` is implemented and an :ref:`InputEvent<class_InputEvent>` happens in the 3D viewport. Intercepts the :ref:`InputEvent<class_InputEvent>`, if ``return true`` ``EditorPlugin`` consumes the ``event``, otherwise forwards ``event`` to other Editor classes. Example:
 
 ::
 
-    func handles(object):
-        return true
+    # Prevents the InputEvent to reach other Editor classes
+    func forward_spatial_gui_input(camera, event):
+        var forward = true
+        return forward
+
+Must ``return false`` in order to forward the :ref:`InputEvent<class_InputEvent>` to other Editor classes. Example:
+
+::
 
-Also note that the edited scene must have a root node.
+    # Consumes InputEventMouseMotion and forwards other InputEvent types
+    func forward_spatial_gui_input(camera, event):
+        var forward = false
+        if event is InputEventMouseMotion:
+            forward = true
+        return forward
 
 .. _class_EditorPlugin_method_get_breakpoints:
 
@@ -492,19 +518,19 @@ Removes an Autoload ``name`` from the list.
 
 - void **remove_control_from_bottom_panel** **(** :ref:`Control<class_Control>` control **)**
 
-Removes the control from the bottom panel. You have to manually ``queue_free()`` the control.
+Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control.
 
 .. _class_EditorPlugin_method_remove_control_from_container:
 
 - void **remove_control_from_container** **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)**
 
-Removes the control from the specified container. You have to manually ``queue_free()`` the control.
+Removes the control from the specified container. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control.
 
 .. _class_EditorPlugin_method_remove_control_from_docks:
 
 - void **remove_control_from_docks** **(** :ref:`Control<class_Control>` control **)**
 
-Removes the control from the dock. You have to manually ``queue_free()`` the control.
+Removes the control from the dock. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control.
 
 .. _class_EditorPlugin_method_remove_custom_type:
 

+ 1 - 1
classes/class_editorsceneimporter.rst

@@ -16,7 +16,7 @@ EditorSceneImporter
 Brief Description
 -----------------
 
-
+Imports scenes from third-parties' 3D files.
 
 Methods
 -------

+ 33 - 25
classes/class_engine.rst

@@ -34,31 +34,33 @@ Properties
 Methods
 -------
 
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`Dictionary<class_Dictionary>` | :ref:`get_author_info<class_Engine_method_get_author_info>` **(** **)** const                              |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`Array<class_Array>`           | :ref:`get_copyright_info<class_Engine_method_get_copyright_info>` **(** **)** const                        |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`Dictionary<class_Dictionary>` | :ref:`get_donor_info<class_Engine_method_get_donor_info>` **(** **)** const                                |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`int<class_int>`               | :ref:`get_frames_drawn<class_Engine_method_get_frames_drawn>` **(** **)**                                  |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`float<class_float>`           | :ref:`get_frames_per_second<class_Engine_method_get_frames_per_second>` **(** **)** const                  |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`Dictionary<class_Dictionary>` | :ref:`get_license_info<class_Engine_method_get_license_info>` **(** **)** const                            |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`String<class_String>`         | :ref:`get_license_text<class_Engine_method_get_license_text>` **(** **)** const                            |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`MainLoop<class_MainLoop>`     | :ref:`get_main_loop<class_Engine_method_get_main_loop>` **(** **)** const                                  |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`Object<class_Object>`         | :ref:`get_singleton<class_Engine_method_get_singleton>` **(** :ref:`String<class_String>` name **)** const |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`Dictionary<class_Dictionary>` | :ref:`get_version_info<class_Engine_method_get_version_info>` **(** **)** const                            |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`bool<class_bool>`             | :ref:`has_singleton<class_Engine_method_has_singleton>` **(** :ref:`String<class_String>` name **)** const |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
-| :ref:`bool<class_bool>`             | :ref:`is_in_physics_frame<class_Engine_method_is_in_physics_frame>` **(** **)** const                      |
-+-------------------------------------+------------------------------------------------------------------------------------------------------------+
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`Dictionary<class_Dictionary>` | :ref:`get_author_info<class_Engine_method_get_author_info>` **(** **)** const                                       |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`Array<class_Array>`           | :ref:`get_copyright_info<class_Engine_method_get_copyright_info>` **(** **)** const                                 |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`Dictionary<class_Dictionary>` | :ref:`get_donor_info<class_Engine_method_get_donor_info>` **(** **)** const                                         |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`int<class_int>`               | :ref:`get_frames_drawn<class_Engine_method_get_frames_drawn>` **(** **)**                                           |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`float<class_float>`           | :ref:`get_frames_per_second<class_Engine_method_get_frames_per_second>` **(** **)** const                           |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`Dictionary<class_Dictionary>` | :ref:`get_license_info<class_Engine_method_get_license_info>` **(** **)** const                                     |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`String<class_String>`         | :ref:`get_license_text<class_Engine_method_get_license_text>` **(** **)** const                                     |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`MainLoop<class_MainLoop>`     | :ref:`get_main_loop<class_Engine_method_get_main_loop>` **(** **)** const                                           |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`float<class_float>`           | :ref:`get_physics_interpolation_fraction<class_Engine_method_get_physics_interpolation_fraction>` **(** **)** const |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`Object<class_Object>`         | :ref:`get_singleton<class_Engine_method_get_singleton>` **(** :ref:`String<class_String>` name **)** const          |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`Dictionary<class_Dictionary>` | :ref:`get_version_info<class_Engine_method_get_version_info>` **(** **)** const                                     |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`bool<class_bool>`             | :ref:`has_singleton<class_Engine_method_has_singleton>` **(** :ref:`String<class_String>` name **)** const          |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
+| :ref:`bool<class_bool>`             | :ref:`is_in_physics_frame<class_Engine_method_is_in_physics_frame>` **(** **)** const                               |
++-------------------------------------+---------------------------------------------------------------------------------------------------------------------+
 
 Description
 -----------
@@ -201,6 +203,12 @@ Returns Godot license text.
 
 Returns the main loop object (see :ref:`MainLoop<class_MainLoop>` and :ref:`SceneTree<class_SceneTree>`).
 
+.. _class_Engine_method_get_physics_interpolation_fraction:
+
+- :ref:`float<class_float>` **get_physics_interpolation_fraction** **(** **)** const
+
+Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation.
+
 .. _class_Engine_method_get_singleton:
 
 - :ref:`Object<class_Object>` **get_singleton** **(** :ref:`String<class_String>` name **)** const

+ 10 - 0
classes/class_inputevent.rst

@@ -88,6 +88,10 @@ Method Descriptions
 
 - :ref:`bool<class_bool>` **accumulate** **(** :ref:`InputEvent<class_InputEvent>` with_event **)**
 
+Returns ``true`` if the given input event and this input event can be added together (only for events of type :ref:`InputEventMouseMotion<class_InputEventMouseMotion>`).
+
+The given input event's position, global position and speed will be copied. The resulting ``relative`` is a sum of both events. Both events' modifiers have to be identical.
+
 .. _class_InputEvent_method_as_text:
 
 - :ref:`String<class_String>` **as_text** **(** **)** const
@@ -98,6 +102,8 @@ Returns a :ref:`String<class_String>` representation of the event.
 
 - :ref:`float<class_float>` **get_action_strength** **(** :ref:`String<class_String>` action **)** const
 
+Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type :ref:`InputEventJoypadMotion<class_InputEventJoypadMotion>`.
+
 .. _class_InputEvent_method_is_action:
 
 - :ref:`bool<class_bool>` **is_action** **(** :ref:`String<class_String>` action **)** const
@@ -138,7 +144,11 @@ Returns ``true`` if this input event is pressed. Not relevant for events of type
 
 - :ref:`bool<class_bool>` **shortcut_match** **(** :ref:`InputEvent<class_InputEvent>` event **)** const
 
+Returns ``true`` if the given input event is checking for the same key (:ref:`InputEventKey<class_InputEventKey>`), button (:ref:`InputEventJoypadButton<class_InputEventJoypadButton>`) or action (:ref:`InputEventAction<class_InputEventAction>`).
+
 .. _class_InputEvent_method_xformed_by:
 
 - :ref:`InputEvent<class_InputEvent>` **xformed_by** **(** :ref:`Transform2D<class_Transform2D>` xform, :ref:`Vector2<class_Vector2>` local_ofs=Vector2( 0, 0 ) **)** const
 
+Returns a copy of the given input event which has been offset by ``local_ofs`` and transformed by ``xform``. Relevant for events of type :ref:`InputEventMouseButton<class_InputEventMouseButton>`, :ref:`InputEventMouseMotion<class_InputEventMouseMotion>`, :ref:`InputEventScreenTouch<class_InputEventScreenTouch>`, :ref:`InputEventScreenDrag<class_InputEventScreenDrag>`, :ref:`InputEventMagnifyGesture<class_InputEventMagnifyGesture>` and :ref:`InputEventPanGesture<class_InputEventPanGesture>`.
+

+ 4 - 4
classes/class_spatialmaterial.rst

@@ -124,7 +124,7 @@ Properties
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
 | :ref:`Texture<class_Texture>`                                  | :ref:`metallic_texture<class_SpatialMaterial_property_metallic_texture>`                             |                     |
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
-| :ref:`TextureChannel<enum_SpatialMaterial_TextureChannel>`     | :ref:`metallic_texture_channel<class_SpatialMaterial_property_metallic_texture_channel>`             | 2                   |
+| :ref:`TextureChannel<enum_SpatialMaterial_TextureChannel>`     | :ref:`metallic_texture_channel<class_SpatialMaterial_property_metallic_texture_channel>`             | 0                   |
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
 | :ref:`bool<class_bool>`                                        | :ref:`normal_enabled<class_SpatialMaterial_property_normal_enabled>`                                 | false               |
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
@@ -188,7 +188,7 @@ Properties
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
 | :ref:`Texture<class_Texture>`                                  | :ref:`roughness_texture<class_SpatialMaterial_property_roughness_texture>`                           |                     |
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
-| :ref:`TextureChannel<enum_SpatialMaterial_TextureChannel>`     | :ref:`roughness_texture_channel<class_SpatialMaterial_property_roughness_texture_channel>`           | 1                   |
+| :ref:`TextureChannel<enum_SpatialMaterial_TextureChannel>`     | :ref:`roughness_texture_channel<class_SpatialMaterial_property_roughness_texture_channel>`           | 0                   |
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
 | :ref:`bool<class_bool>`                                        | :ref:`subsurf_scatter_enabled<class_SpatialMaterial_property_subsurf_scatter_enabled>`               | false               |
 +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------+---------------------+
@@ -1273,7 +1273,7 @@ General reflectivity amount.
 - :ref:`TextureChannel<enum_SpatialMaterial_TextureChannel>` **metallic_texture_channel**
 
 +-----------+-------------------------------------+
-| *Default* | 2                                   |
+| *Default* | 0                                   |
 +-----------+-------------------------------------+
 | *Setter*  | set_metallic_texture_channel(value) |
 +-----------+-------------------------------------+
@@ -1669,7 +1669,7 @@ Surface reflection. A value of ``0`` represents a perfect mirror while a value o
 - :ref:`TextureChannel<enum_SpatialMaterial_TextureChannel>` **roughness_texture_channel**
 
 +-----------+--------------------------------------+
-| *Default* | 1                                    |
+| *Default* | 0                                    |
 +-----------+--------------------------------------+
 | *Setter*  | set_roughness_texture_channel(value) |
 +-----------+--------------------------------------+

+ 2 - 2
classes/class_tree.rst

@@ -539,13 +539,13 @@ Returns the current selection's column.
 
 - void **set_column_expand** **(** :ref:`int<class_int>` column, :ref:`bool<class_bool>` expand **)**
 
-If ``true``, the column will have the "Expand" flag of :ref:`Control<class_Control>`.
+If ``true``, the column will have the "Expand" flag of :ref:`Control<class_Control>`. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>`.
 
 .. _class_Tree_method_set_column_min_width:
 
 - void **set_column_min_width** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` min_width **)**
 
-Sets the minimum width of a column.
+Sets the minimum width of a column. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to :ref:`Control.size_flags_stretch_ratio<class_Control_property_size_flags_stretch_ratio>`.
 
 .. _class_Tree_method_set_column_title:
 

+ 2 - 0
classes/class_treeitem.rst

@@ -448,6 +448,8 @@ Sets the given column's button :ref:`Texture<class_Texture>` at index ``button_i
 
 - void **set_button_disabled** **(** :ref:`int<class_int>` column, :ref:`int<class_int>` button_idx, :ref:`bool<class_bool>` disabled **)**
 
+If ``true``, disables the button at index ``button_idx`` in column ``column``.
+
 .. _class_TreeItem_method_set_cell_mode:
 
 - void **set_cell_mode** **(** :ref:`int<class_int>` column, :ref:`TreeCellMode<enum_TreeItem_TreeCellMode>` mode **)**

+ 26 - 0
classes/class_variant.rst

@@ -19,3 +19,29 @@ Description
 
 A Variant takes up only 20 bytes and can store almost any engine datatype inside of it. Variants are rarely used to hold information for long periods of time. Instead, they are used mainly for communication, editing, serialization and moving data around.
 
+A Variant:
+
+- Can store almost any datatype.
+
+- Can perform operations between many variants. GDScript uses Variant as its atomic/native datatype.
+
+- Can be hashed, so it can be compared quickly to other variants.
+
+- Can be used to convert safely between datatypes.
+
+- Can be used to abstract calling methods and their arguments. Godot exports all its functions through variants.
+
+- Can be used to defer calls or move data between threads.
+
+- Can be serialized as binary and stored to disk, or transferred via network.
+
+- Can be serialized to text and use it for printing values and editable settings.
+
+- Can work as an exported property, so the editor can edit it universally.
+
+- Can be used for dictionaries, arrays, parsers, etc.
+
+**Containers (:ref:`Array<class_Array>` and :ref:`Dictionary<class_Dictionary>`):** Both are implemented using variants. A :ref:`Dictionary<class_Dictionary>` can match any datatype used as key to any other datatype. An :ref:`Array<class_Array>` just holds an array of Variants. Of course, a Variant can also hold a :ref:`Dictionary<class_Dictionary>` and an :ref:`Array<class_Array>` inside, making it even more flexible.
+
+Modifications to a container will modify all references to it. A :ref:`Mutex<class_Mutex>` should be created to lock it if multi-threaded access is desired.
+

+ 9 - 1
classes/class_visualscriptbuiltinfunc.rst

@@ -158,6 +158,10 @@ Enumerations
 
 .. _class_VisualScriptBuiltinFunc_constant_MATH_SMOOTHSTEP:
 
+.. _class_VisualScriptBuiltinFunc_constant_MATH_POSMOD:
+
+.. _class_VisualScriptBuiltinFunc_constant_MATH_LERP_ANGLE:
+
 .. _class_VisualScriptBuiltinFunc_constant_FUNC_MAX:
 
 enum **BuiltinFunc**:
@@ -299,7 +303,11 @@ enum **BuiltinFunc**:
     var t = clamp((weight - from) / (to - from), 0.0, 1.0)
     return t * t * (3.0 - 2.0 * t)
 
-- **FUNC_MAX** = **65** --- Represents the size of the :ref:`BuiltinFunc<enum_VisualScriptBuiltinFunc_BuiltinFunc>` enum.
+- **MATH_POSMOD** = **65**
+
+- **MATH_LERP_ANGLE** = **66**
+
+- **FUNC_MAX** = **67** --- Represents the size of the :ref:`BuiltinFunc<enum_VisualScriptBuiltinFunc_BuiltinFunc>` enum.
 
 Description
 -----------