summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile2
-rw-r--r--doc/classes/@Global Scope.xml2
-rw-r--r--doc/classes/Animation.xml4
-rw-r--r--doc/classes/Area.xml47
-rw-r--r--doc/classes/Area2D.xml75
-rw-r--r--doc/classes/Array.xml2
-rw-r--r--doc/classes/AudioStreamPlayer.xml2
-rw-r--r--doc/classes/AudioStreamPlayer2D.xml2
-rw-r--r--doc/classes/AudioStreamPlayer3D.xml2
-rw-r--r--doc/classes/CanvasItem.xml2
-rw-r--r--doc/classes/CollisionObject.xml26
-rw-r--r--doc/classes/CollisionObject2D.xml33
-rw-r--r--doc/classes/EditorImportPlugin.xml54
-rw-r--r--doc/classes/EditorResourceConversionPlugin.xml29
-rw-r--r--doc/classes/EditorSpatialGizmo.xml2
-rw-r--r--doc/classes/Environment.xml86
-rw-r--r--doc/classes/GraphEdit.xml6
-rw-r--r--doc/classes/Range.xml9
-rw-r--r--doc/classes/RayShape.xml3
-rw-r--r--doc/classes/RichTextLabel.xml12
-rw-r--r--doc/classes/Shape.xml2
-rw-r--r--doc/classes/SpatialMaterial.xml80
-rw-r--r--doc/classes/SphereShape.xml3
-rw-r--r--doc/classes/Sprite.xml14
-rw-r--r--doc/classes/SpriteFrames.xml18
-rw-r--r--doc/classes/StaticBody2D.xml9
-rw-r--r--doc/classes/Transform2D.xml2
-rw-r--r--doc/tools/makerst.py54
28 files changed, 467 insertions, 115 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 4914c657d2..d68c66f8eb 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,5 +1,5 @@
BASEDIR = $(CURDIR)
-CLASSES = $(BASEDIR)/base/classes.xml
+CLASSES = $(BASEDIR)/classes/ $(BASEDIR)/../modules/
OUTPUTDIR = $(BASEDIR)/_build
TOOLSDIR = $(BASEDIR)/tools
diff --git a/doc/classes/@Global Scope.xml b/doc/classes/@Global Scope.xml
index a8fd377ecf..d8c9a57a88 100644
--- a/doc/classes/@Global Scope.xml
+++ b/doc/classes/@Global Scope.xml
@@ -1013,7 +1013,7 @@
</constant>
<constant name="ERR_TIMEOUT" value="24">
</constant>
- <constant name="ERR_CANT_AQUIRE_RESOURCE" value="28">
+ <constant name="ERR_CANT_ACQUIRE_RESOURCE" value="28">
</constant>
<constant name="ERR_INVALID_DATA" value="30">
</constant>
diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml
index 6cb4fd5b17..d853345268 100644
--- a/doc/classes/Animation.xml
+++ b/doc/classes/Animation.xml
@@ -368,9 +368,9 @@
</argument>
<argument index="1" name="time" type="float">
</argument>
- <argument index="2" name="loc" type="Vector3">
+ <argument index="2" name="location" type="Vector3">
</argument>
- <argument index="3" name="rot" type="Quat">
+ <argument index="3" name="rotation" type="Quat">
</argument>
<argument index="4" name="scale" type="Vector3">
</argument>
diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml
index c59bbee084..8797575038 100644
--- a/doc/classes/Area.xml
+++ b/doc/classes/Area.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Area" inherits="CollisionObject" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- General purpose area detection and influence for 3D physics.
+ General purpose area node for detection and 3D physics influence.
</brief_description>
<description>
- General purpose area detection for 3D physics. Areas can be used for detection of objects that enter/exit them, as well as overriding space parameters (changing gravity, damping, etc). For this, use any space override different from AREA_SPACE_OVERRIDE_DISABLE and point gravity at the center of mass.
+ 3D area that detects [CollisionObject] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
</description>
<tutorials>
</tutorials>
@@ -88,14 +88,14 @@
<return type="Array">
</return>
<description>
- Return a list of the areas that are totally or partially inside this area.
+ Returns a list of intersecting [Area]\ s.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the bodies ([PhysicsBody]) that are totally or partially inside this area.
+ Returns a list of intersecting [PhysicsBody]\ s.
</description>
</method>
<method name="get_priority" qualifiers="const">
@@ -169,7 +169,7 @@
<argument index="0" name="area" type="Node">
</argument>
<description>
- Return whether the area passed is totally or partially inside this area.
+ If [code]true[/code] the given area overlaps the Area.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
@@ -178,7 +178,7 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- Return whether the body passed is totally or partially inside this area.
+ If [code]true[/code] the given body overlaps the Area.
</description>
</method>
<method name="set_angular_damp">
@@ -374,30 +374,43 @@
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
+ The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
<member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus">
+ The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus">
+ If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code].
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
+ The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code].
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
+ The physics layers this area scans to determine collision detection.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity">
+ The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale">
+ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point">
+ If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code].
</member>
<member name="gravity_vec" type="Vector3" setter="set_gravity_vector" getter="get_gravity_vector">
+ The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
+ The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable">
+ If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code].
</member>
<member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring">
+ If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code].
</member>
<member name="priority" type="float" setter="set_priority" getter="get_priority">
+ The area's priority. Higher priority areas are processed first. Default value: 0.
</member>
<member name="reverb_bus_amount" type="float" setter="set_reverb_amount" getter="get_reverb_amount">
</member>
@@ -408,6 +421,7 @@
<member name="reverb_bus_uniformity" type="float" setter="set_reverb_uniformity" getter="get_reverb_uniformity">
</member>
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area.SpaceOverride">
+ Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values.
</member>
</members>
<signals>
@@ -415,14 +429,14 @@
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
+ Emitted when another area enters.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
+ Emitted when another area exits.
</description>
</signal>
<signal name="area_shape_entered">
@@ -435,7 +449,7 @@
<argument index="3" name="self_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ Emitted when another area enters, reporting which areas overlapped.
</description>
</signal>
<signal name="area_shape_exited">
@@ -448,21 +462,21 @@
<argument index="3" name="self_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ Emitted when another area exits, reporting which areas were overlapping.
</description>
</signal>
<signal name="body_entered">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
+ Emitted when a [PhysicsBody] object enters.
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
+ Emitted when a [PhysicsBody2D] object exits.
</description>
</signal>
<signal name="body_shape_entered">
@@ -475,7 +489,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
+ Emitted when a [PhysicsBody2D] object enters, reporting which shapes overlapped.
</description>
</signal>
<signal name="body_shape_exited">
@@ -488,20 +502,25 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
+ Emitted when a [PhysicsBody2D] object exits, reporting which shapes were overlapping.
</description>
</signal>
</signals>
<constants>
<constant name="SPACE_OVERRIDE_DISABLED" value="0">
+ This area does not affect gravity/damping.
</constant>
<constant name="SPACE_OVERRIDE_COMBINE" value="1">
+ This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order).
</constant>
<constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
+ This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE" value="3">
+ This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
+ This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas.
</constant>
</constants>
</class>
diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml
index e093b5cb49..0cbc079962 100644
--- a/doc/classes/Area2D.xml
+++ b/doc/classes/Area2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Area2D" inherits="CollisionObject2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- 2D area that detects nodes that enter or exit it. Can override 2D physics properties within range.
+ 2D area for detection and 2D physics influence.
</brief_description>
<description>
- 2D area that detects nodes that enter or exit it. Change the 'space_override' property SPACE_OVERRIDE_* to override physics parameters for nodes like [Rigidbody2D]. E.g. gravity, damping... See [CollisionObject2D] for usage.
+ 2D area that detects [CollisionObject2D] nodes overlapping, entering, or exiting. Can also alter or override local physics parameters (gravity, damping).
</description>
<tutorials>
</tutorials>
@@ -18,7 +18,7 @@
Return the angular damp rate.
</description>
</method>
- <method name="get_audio_bus" qualifiers="const">
+ <method name="get_audio_bus_name" qualifiers="const">
<return type="String">
</return>
<description>
@@ -88,14 +88,14 @@
<return type="Array">
</return>
<description>
- Returns a list of the [Area2D]s that intersect with this area.
+ Returns a list of intersecting [Area2D]\ s.
</description>
</method>
<method name="get_overlapping_bodies" qualifiers="const">
<return type="Array">
</return>
<description>
- Return a list of the [PhysicsBody2D]s that intersect with this area.
+ Returns a list of intersecting [PhysicsBody2D]\ s.
</description>
</method>
<method name="get_priority" qualifiers="const">
@@ -145,7 +145,7 @@
<argument index="0" name="area" type="Node">
</argument>
<description>
- Return whether the area passed is totally or partially inside this area.
+ If [code]true[/code] the given area overlaps the Area2D.
</description>
</method>
<method name="overlaps_body" qualifiers="const">
@@ -154,7 +154,7 @@
<argument index="0" name="body" type="Node">
</argument>
<description>
- Return whether the body passed is totally or partially inside this area.
+ If [code]true[/code] the given body overlaps the Area2D.
</description>
</method>
<method name="set_angular_damp">
@@ -167,7 +167,7 @@
In practice, as the fraction of speed lost gets smaller with each frame, a value of 1.0 does not mean the object will stop in exactly one second. Only when the physics calculations are done at 1 frame per second, it does stop in a second.
</description>
</method>
- <method name="set_audio_bus">
+ <method name="set_audio_bus_name">
<return type="void">
</return>
<argument index="0" name="name" type="String">
@@ -318,49 +318,46 @@
</methods>
<members>
<member name="angular_damp" type="float" setter="set_angular_damp" getter="get_angular_damp">
- The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'.
+ The rate at which objects stop spinning in this area. Represents the angular velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
- <member name="audio_bus_name" type="String" setter="set_audio_bus" getter="get_audio_bus">
- The name of the Area2D's audio bus.
+ <member name="audio_bus_name" type="String" setter="set_audio_bus_name" getter="get_audio_bus_name">
+ The name of the area's audio bus.
</member>
<member name="audio_bus_override" type="bool" setter="set_audio_bus_override" getter="is_overriding_audio_bus">
- If [code]true[/code], overrides the default audio bus with the Area2D's. Defaults to [code]false[/code].
+ If [code]true[/code] the area's audio bus overrides the default audio bus. Default value: [code]false[/code].
</member>
<member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer">
- The physics layer this Area2D is in.
- Collidable objects can exist in any of 32 different layers. These layers are not visual, but more of a tagging system instead. A collidable can use these layers/tags to select with which objects it can collide, using [method set_collision_mask].
- 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.
+ The area's physics layer(s). Collidable objects can exist in any of 32 different layers. A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See also [code]collision_mask[/code].
</member>
<member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask">
- The physics layers this Area2D scans to determine collision detections.
+ The physics layers this area scans to determine collision detection.
</member>
<member name="gravity" type="float" setter="set_gravity" getter="get_gravity">
- The gravity intensity within the Area2D (ranges -1024 to 1024). This is useful to alter the force of gravity without altering its direction.
- This value multiplies the gravity vector, whether it is the given vector ([method set_gravity_vector]), or a calculated one (when using a center of gravity).
+ The area's gravity intensity (ranges from -1024 to 1024). This value multiplies the gravity vector. This is useful to alter the force of gravity without altering its direction.
</member>
<member name="gravity_distance_scale" type="float" setter="set_gravity_distance_scale" getter="get_gravity_distance_scale">
- The falloff factor for point gravity. The greater this value is, the faster the strength of gravity decreases with the square of distance.
+ The falloff factor for point gravity. The greater the value, the faster gravity decreases with distance.
</member>
<member name="gravity_point" type="bool" setter="set_gravity_is_point" getter="is_gravity_a_point">
- If [code]true[/code], calculates gravity from a particular point during a space override (see [method set_space_override_mode]). If a point, [Vector2] position is set with [method set_gravity_vector]. Defaults to [code]false[/code].
+ If [code]true[/code] gravity is calculated from a point (set via [code]gravity_vec[/code]). Also see [code]space_override[/code]. Default value: [code]false[/code].
</member>
<member name="gravity_vec" type="Vector2" setter="set_gravity_vector" getter="get_gravity_vector">
- The gravitational direction/strength as a vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the attraction center.
+ The area's gravity vector (not normalized). If gravity is a point (see [method is_gravity_a_point]), this will be the point of attraction.
</member>
<member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp">
- The rate at which objects stop spinning in this area. Represents the amount of speed lost per second. If 1.0, physics bodies in the area stop rotating immediately. If 0.0, they never slow down. Does not incorporate external forces. The physics-update's rate affects 'angular_damp'.
+ The rate at which objects stop moving in this area. Represents the linear velocity lost per second. Values range from [code]0[/code] (no damping) to [code]1[/code] (full damping).
</member>
<member name="monitorable" type="bool" setter="set_monitorable" getter="is_monitorable">
- If [code]true[/code], other monitoring areas can detect this Area2D (is it undetectable at the moment?). Defaults to [code]true[/code].
+ If [code]true[/code] other monitoring areas can detect this area. Default value: [code]true[/code].
</member>
<member name="monitoring" type="bool" setter="set_monitoring" getter="is_monitoring">
- If [code]true[/code], this detects bodies/areas entering/exiting it (can it detect others at the moment?). Defaults to [code]true[/code].
+ If [code]true[/code] the area detects bodies or areas entering and exiting it. Default value: [code]true[/code].
</member>
<member name="priority" type="float" setter="set_priority" getter="get_priority">
- The processing order for this priority. Ranges from 0 to 128. Defaults to 0. Higher priorities are processed first.
+ The area's priority. Higher priority areas are processed first. Default value: 0.
</member>
<member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area2D.SpaceOverride">
- How to override gravity and damping calculations within this Area2D, if at all. Consult the SPACE_OVERRIDE_* constants for available options.
+ Override mode for gravity and damping calculations within this area. See the SPACE_OVERRIDE_* constants for values.
</member>
</members>
<signals>
@@ -368,14 +365,14 @@
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area enters this area. The only parameter passed is the area that entered this area.
+ Emitted when another area enters.
</description>
</signal>
<signal name="area_exited">
<argument index="0" name="area" type="Object">
</argument>
<description>
- This signal is triggered only once when an area exits this area. The only parameter passed is the area that exited this area.
+ Emitted when another area exits.
</description>
</signal>
<signal name="area_shape_entered">
@@ -388,7 +385,7 @@
<argument index="3" name="self_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area enters this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ Emitted when another area enters, reporting which shapes overlapped.
</description>
</signal>
<signal name="area_shape_exited">
@@ -401,21 +398,21 @@
<argument index="3" name="self_shape" type="int">
</argument>
<description>
- This signal triggers only once when an area exits this area. The first parameter is the area's [RID]. The second one is the area as an object. The third one is the index of the shape entering this area, and the fourth one is the index of the shape in this area that reported the entering.
+ Emitted when another area exits, reporting which shapes were overlapping.
</description>
</signal>
<signal name="body_entered">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body enters this area. The only parameter passed is the body that entered this area.
+ Emitted when a [PhysicsBody2D] object enters.
</description>
</signal>
<signal name="body_exited">
<argument index="0" name="body" type="Object">
</argument>
<description>
- This signal is triggered only once when a body exits this area. The only parameter passed is the body that exited this area.
+ Emitted when a [PhysicsBody2D] object exits.
</description>
</signal>
<signal name="body_shape_entered">
@@ -428,7 +425,7 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body enters this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape of the body that entered this area, and the fourth one is the index of the shape in this area that reported the entering.
+ Emitted when a [PhysicsBody2D] object enters, reporting which shapes overlapped.
</description>
</signal>
<signal name="body_shape_exited">
@@ -441,25 +438,25 @@
<argument index="3" name="area_shape" type="int">
</argument>
<description>
- This signal triggers only once when a body exits this area. The first parameter is the body's [RID]. The second one is the body as an object. The third one is the index of the shape exiting this area, and the fourth one is the index of the shape in this area that reported the exit.
+ Emitted when a [PhysicsBody2D] object exits, reporting which shapes were overlapping.
</description>
</signal>
</signals>
<constants>
<constant name="SPACE_OVERRIDE_DISABLED" value="0">
- This area does not affect gravity/damp. These are areas that exist only to detect collisions and objects entering or exiting them.
+ This area does not affect gravity/damping.
</constant>
<constant name="SPACE_OVERRIDE_COMBINE" value="1">
- This area adds its gravity/damp values to whatever has been calculated so far. This way, many overlapping areas can combine their physics to make interesting effects.
+ This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order).
</constant>
<constant name="SPACE_OVERRIDE_COMBINE_REPLACE" value="2">
- This area adds its gravity/damp values to whatever has been calculated so far. Then stops taking into account the rest of the areas, even the default one.
+ This area adds its gravity/damping values to whatever has been calculated so far (in [code]priority[/code] order), ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE" value="3">
- This area replaces any gravity/damp, even the default one, and stops taking into account the rest of the areas.
+ This area replaces any gravity/damping, even the defaults, ignoring any lower priority areas.
</constant>
<constant name="SPACE_OVERRIDE_REPLACE_COMBINE" value="4">
- This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one.
+ This area replaces any gravity/damping calculated so far (in [code]priority[/code] order), but keeps calculating the rest of the areas.
</constant>
</constants>
</class>
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index f833764141..9542c83eaf 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -213,7 +213,7 @@
</description>
</method>
<method name="resize">
- <argument index="0" name="position" type="int">
+ <argument index="0" name="size" type="int">
</argument>
<description>
Resize the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are Null.
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index 2dba35bec0..9b104fe757 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -23,7 +23,7 @@
<description>
</description>
</method>
- <method name="get_position">
+ <method name="get_playback_position">
<return type="float">
</return>
<description>
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 68afffdb41..600e0858dd 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -36,7 +36,7 @@
<description>
</description>
</method>
- <method name="get_position">
+ <method name="get_playback_position">
<return type="float">
</return>
<description>
diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml
index 1577c1e4d3..886b2b975a 100644
--- a/doc/classes/AudioStreamPlayer3D.xml
+++ b/doc/classes/AudioStreamPlayer3D.xml
@@ -78,7 +78,7 @@
<description>
</description>
</method>
- <method name="get_position">
+ <method name="get_playback_position">
<return type="float">
</return>
<description>
diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml
index 8fc2ff2bc2..4a9890ea18 100644
--- a/doc/classes/CanvasItem.xml
+++ b/doc/classes/CanvasItem.xml
@@ -172,7 +172,7 @@
</return>
<argument index="0" name="position" type="Vector2">
</argument>
- <argument index="1" name="rot" type="float">
+ <argument index="1" name="rotation" type="float">
</argument>
<argument index="2" name="scale" type="Vector2">
</argument>
diff --git a/doc/classes/CollisionObject.xml b/doc/classes/CollisionObject.xml
index 98023a5898..64e9e07925 100644
--- a/doc/classes/CollisionObject.xml
+++ b/doc/classes/CollisionObject.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CollisionObject" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Base node for collision objects.
</brief_description>
<description>
+ CollisionObject is the base class for physics objects. It can hold any number of collision [Shape]\ s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods.
</description>
<tutorials>
</tutorials>
@@ -31,7 +33,7 @@
<argument index="0" name="owner" type="Object">
</argument>
<description>
- Creates new holder for the shapes. Argument is a [CollisionShape] node. It will return owner_id which usually you will want to save for later use.
+ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference.
</description>
</method>
<method name="get_capture_input_on_drag" qualifiers="const">
@@ -44,13 +46,14 @@
<return type="RID">
</return>
<description>
+ Returns the object's [RID].
</description>
</method>
<method name="get_shape_owners">
<return type="Array">
</return>
<description>
- Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
+ Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument.
</description>
</method>
<method name="is_ray_pickable" qualifiers="const">
@@ -65,6 +68,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
+ If [code]true[/code] the shape owner and its shapes are disabled.
</description>
</method>
<method name="remove_shape_owner">
@@ -73,6 +77,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
+ Removes the given shape owner.
</description>
</method>
<method name="set_capture_input_on_drag">
@@ -97,6 +102,7 @@
<argument index="0" name="shape_index" type="int">
</argument>
<description>
+ Returns the [code]owner_id[/code] of the given shape.
</description>
</method>
<method name="shape_owner_add_shape">
@@ -107,6 +113,7 @@
<argument index="1" name="shape" type="Shape">
</argument>
<description>
+ Adds a [Shape] to the shape owner.
</description>
</method>
<method name="shape_owner_clear_shapes">
@@ -115,7 +122,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
- Will remove all the shapes associated with given owner.
+ Removes all shapes from the shape owner.
</description>
</method>
<method name="shape_owner_get_owner" qualifiers="const">
@@ -124,6 +131,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
+ Returns the parent object of the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
@@ -134,7 +142,7 @@
<argument index="1" name="shape_id" type="int">
</argument>
<description>
- Will return a [Shape]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
+ Returns the [Shape] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
@@ -143,7 +151,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
- Returns number of shapes to which given owner is associated to.
+ Returns the number of shapes the given shape owner contains.
</description>
</method>
<method name="shape_owner_get_shape_index" qualifiers="const">
@@ -162,7 +170,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
- Will return [Transform] of an owner node.
+ Returns the shape owner's [Transform].
</description>
</method>
<method name="shape_owner_remove_shape">
@@ -173,7 +181,7 @@
<argument index="1" name="shape_id" type="int">
</argument>
<description>
- Removes related shape from the owner.
+ Removes a shape from the given shape owner.
</description>
</method>
<method name="shape_owner_set_disabled">
@@ -184,6 +192,7 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
+ If [code]true[/code] disables the given shape owner.
</description>
</method>
<method name="shape_owner_set_transform">
@@ -194,6 +203,7 @@
<argument index="1" name="transform" type="Transform">
</argument>
<description>
+ Sets the [Transform] of the given shape owner.
</description>
</method>
</methods>
@@ -220,10 +230,12 @@
</signal>
<signal name="mouse_entered">
<description>
+ Emitted when the mouse pointer enters any of this object's shapes.
</description>
</signal>
<signal name="mouse_exited">
<description>
+ Emitted when the mouse pointer exits all this object's shapes.
</description>
</signal>
</signals>
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index db1412805f..52743bd37d 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CollisionObject2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
<brief_description>
- Base node for 2D collisionables.
+ Base node for 2D collision objects.
</brief_description>
<description>
- CollisionObject2D is the base class for 2D physics collisionables. They can hold any number of 2D collision shapes. Usually, they are edited by placing [CollisionShape2D] and/or [CollisionPolygon2D] nodes as children. Such nodes are for reference and not present outside the editor, so code should use the regular shape API.
+ CollisionObject2D is the base class for 2D physics objects. It can hold any number of 2D collision [Shape2D]\ s. Each shape must be assigned to a [i]shape owner[/i]. The CollisionObject2D can have any number of shape owners. Shape owners are not nodes and do not appear in the editor, but are accessible through code using the [code]shape_owner_*[/code] methods.
</description>
<tutorials>
</tutorials>
@@ -29,21 +29,21 @@
<argument index="0" name="owner" type="Object">
</argument>
<description>
- Creates new holder for the shapes. Argument is a [CollisionShape2D] node. It will return owner_id which usually you will want to save for later use.
+ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference.
</description>
</method>
<method name="get_rid" qualifiers="const">
<return type="RID">
</return>
<description>
- Return the RID of this object.
+ Returns the object's [RID].
</description>
</method>
<method name="get_shape_owners">
<return type="Array">
</return>
<description>
- Shape owner is a node which is holding concrete shape resources. This method will return an array which is holding an integer numbers that are representing unique ID of each owner. You can use those ids when you are using others shape_owner methods.
+ Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument.
</description>
</method>
<method name="is_pickable" qualifiers="const">
@@ -59,6 +59,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
+ If [code]true[/code] the shape owner and its shapes are disabled.
</description>
</method>
<method name="is_shape_owner_one_way_collision_enabled" qualifiers="const">
@@ -75,6 +76,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
+ Removes the given shape owner.
</description>
</method>
<method name="set_pickable">
@@ -92,6 +94,7 @@
<argument index="0" name="shape_index" type="int">
</argument>
<description>
+ Returns the [code]owner_id[/code] of the given shape.
</description>
</method>
<method name="shape_owner_add_shape">
@@ -102,6 +105,7 @@
<argument index="1" name="shape" type="Shape2D">
</argument>
<description>
+ Adds a [Shape2D] to the shape owner.
</description>
</method>
<method name="shape_owner_clear_shapes">
@@ -110,7 +114,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
- Will remove all the shapes associated with given owner.
+ Removes all shapes from the shape owner.
</description>
</method>
<method name="shape_owner_get_owner" qualifiers="const">
@@ -119,6 +123,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
+ Returns the parent object of the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape" qualifiers="const">
@@ -129,7 +134,7 @@
<argument index="1" name="shape_id" type="int">
</argument>
<description>
- Will return a [Shape2D]. First argument owner_id is an integer that can be obtained from [method get_shape_owners]. Shape_id is a position of the shape inside owner; it's a value in range from 0 to [method shape_owner_get_shape_count].
+ Returns the [Shape2D] with the given id from the given shape owner.
</description>
</method>
<method name="shape_owner_get_shape_count" qualifiers="const">
@@ -138,7 +143,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
- Returns number of shapes to which given owner is associated to.
+ Returns the number of shapes the given shape owner contains.
</description>
</method>
<method name="shape_owner_get_shape_index" qualifiers="const">
@@ -157,7 +162,7 @@
<argument index="0" name="owner_id" type="int">
</argument>
<description>
- Will return [Transform2D] of an owner node.
+ Returns the shape owner's [Transform2D].
</description>
</method>
<method name="shape_owner_remove_shape">
@@ -168,7 +173,7 @@
<argument index="1" name="shape_id" type="int">
</argument>
<description>
- Removes related shape from the owner.
+ Removes a shape from the given shape owner.
</description>
</method>
<method name="shape_owner_set_disabled">
@@ -179,6 +184,7 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
+ If [code]true[/code] disables the given shape owner.
</description>
</method>
<method name="shape_owner_set_one_way_collision">
@@ -199,11 +205,13 @@
<argument index="1" name="transform" type="Transform2D">
</argument>
<description>
+ Sets the [Transform2D] of the given shape owner.
</description>
</method>
</methods>
<members>
<member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable">
+ 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.
</member>
</members>
<signals>
@@ -215,16 +223,17 @@
<argument index="2" name="shape_idx" type="int">
</argument>
<description>
+ Emitted when an input event occurs and [code]input_pickable[/code] is [code]true[/code].
</description>
</signal>
<signal name="mouse_entered">
<description>
- This event fires only once when the mouse pointer enters any shape of this object.
+ Emitted when the mouse pointer enters any of this object's shapes.
</description>
</signal>
<signal name="mouse_exited">
<description>
- This event fires only once when the mouse pointer exits all shapes of this object.
+ Emitted when the mouse pointer exits all this object's shapes.
</description>
</signal>
</signals>
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 0ced30bda6..05319e926c 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -1,8 +1,54 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="EditorImportPlugin" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Registers a custom resource importer in the editor. Use the class to parse any file and import it as a new resource type.
</brief_description>
<description>
+ EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin].
+
+ EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extension] and [method get_resource_type]). They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].import[/code] directory.
+
+
+ Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
+ [codeblock]
+ tool
+ extends EditorImportPlugin
+
+ func get_importer_name():
+ return "my.special.plugin"
+
+ func get_visible_name():
+ return "Special Mesh Importer"
+
+ func get_recognized_extensions():
+ return ["special", "spec"]
+
+ func get_save_extension():
+ return "mesh"
+
+ func get_resource_type():
+ return "Mesh"
+
+ func get_preset_count():
+ return 1
+
+ func get_preset_name(i):
+ return "Default"
+
+ func get_import_optons(i):
+ return [{"name": "my_option", "default_value": false}]
+
+ func load(src, dst, opts, r_platform_variants, r_gen_files):
+ var f = File.new()
+ if f.open(src, File.READ) != OK:
+ return FAILED
+
+ var mesh = Mesh.new()
+
+ var save = dst + "." + get_save_extension()
+ ResourceSaver.save(file, mesh)
+ return OK
+ [/codeblock]
</description>
<tutorials>
</tutorials>
@@ -15,12 +61,14 @@
<argument index="0" name="preset" type="int">
</argument>
<description>
+ Get the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: "name", "default_value", "property_hint" (optional), "hint_string" (optional), "usage" (optional).
</description>
</method>
<method name="get_importer_name" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Get the unique name of the importer.
</description>
</method>
<method name="get_option_visibility" qualifiers="virtual">
@@ -37,6 +85,7 @@
<return type="int">
</return>
<description>
+ Get the number of initial presets defined by the plugin. Use [method get_import_options] to get the default options for the preset and [method get_preset_name] to get the name of the preset.
</description>
</method>
<method name="get_preset_name" qualifiers="virtual">
@@ -45,30 +94,35 @@
<argument index="0" name="preset" type="int">
</argument>
<description>
+ Get the name of the options preset at this index.
</description>
</method>
<method name="get_recognized_extensions" qualifiers="virtual">
<return type="Array">
</return>
<description>
+ Get the list of file extensions to associate with this loader (case insensitive). e.g. ["obj"].
</description>
</method>
<method name="get_resource_type" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Get the godot resource type associated with this loader. e.g. "Mesh" or "Animation".
</description>
</method>
<method name="get_save_extension" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Get the extension used to save this resource in the [code].import[/code] directory.
</description>
</method>
<method name="get_visible_name" qualifiers="virtual">
<return type="String">
</return>
<description>
+ Get the name to display in the import window.
</description>
</method>
<method name="import" qualifiers="virtual">
diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml
new file mode 100644
index 0000000000..e165ae376b
--- /dev/null
+++ b/doc/classes/EditorResourceConversionPlugin.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="EditorResourceConversionPlugin" inherits="Reference" category="Core" version="3.0.alpha.custom_build">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <demos>
+ </demos>
+ <methods>
+ <method name="_convert" qualifiers="virtual">
+ <return type="Resource">
+ </return>
+ <argument index="0" name="resource" type="Resource">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="_converts_to" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml
index de9ea5282a..baab995fab 100644
--- a/doc/classes/EditorSpatialGizmo.xml
+++ b/doc/classes/EditorSpatialGizmo.xml
@@ -24,6 +24,8 @@
</return>
<argument index="0" name="triangles" type="TriangleMesh">
</argument>
+ <argument index="1" name="bounds" type="Rect3">
+ </argument>
<description>
Add collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw].
</description>
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 4338b188a6..3880c45a86 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -1,8 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Environment" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
+<class name="Environment" inherits="Resource" category="Core" version="3.0">
<brief_description>
+ Resource for environment nodes (like [WorldEnvironment]) that define multiple rendering options.
</brief_description>
<description>
+ Resource for environment nodes (like [WorldEnvironment]) that define multiple environment operations (such as background [Sky] or [Color], ambient light, fog, depth-of-field...). These parameters affect the final render of the scene. The order of these operations is:
+ - DOF Blur
+ - Motion Blur
+ - Bloom
+ - Tonemap (auto exposure)
+ - Adjustments
</description>
<tutorials>
</tutorials>
@@ -982,118 +989,174 @@
</methods>
<members>
<member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness">
+ Global brightness value of the rendered scene (default value is 1).
</member>
<member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
+ Applies the provided [Texture] resource to affect the global color aspect of the rendered scene.
</member>
<member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast">
+ Global contrast value of the rendered scene (default value is 1).
</member>
<member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled">
+ Enables the adjustment_* options provided by this resource. If false, adjustments modifications will have no effect on the rendered scene.
</member>
<member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation">
+ Global color saturation value of the rendered scene (default value is 1).
</member>
<member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color">
+ [Color] of the ambient light.
</member>
<member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy">
+ Energy of the ambient light. The higher the value, the stronger the light.
</member>
<member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution">
+ Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene.
</member>
<member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure">
+ Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light.
</member>
<member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max">
+ Maximum luminance value for the auto exposure.
</member>
<member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min">
+ Minimum luminance value for the auto exposure.
</member>
<member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey">
+ Scale of the auto exposure effect. Affects the intensity of auto exposure.
</member>
<member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed">
+ Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure.
</member>
<member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer">
+ Maximum layer id (if using Layer background mode).
</member>
<member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color">
+ Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes).
</member>
<member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy">
+ Power of light emitted by the background.
</member>
<member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode">
+ Defines the mode of background.
</member>
<member name="background_sky" type="Sky" setter="set_sky" getter="get_sky">
+ [Sky] resource defined as background.
</member>
<member name="background_sky_scale" type="float" setter="set_sky_scale" getter="get_sky_scale">
+ [Sky] resource's scale.
</member>
<member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount">
+ Amount of far blur.
</member>
<member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance">
+ Distance from the camera where the far blur effect affects the rendering.
</member>
<member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled">
+ Enables the far blur effect.
</member>
<member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality">
+ Quality of the far blur quality.
</member>
<member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition">
+ Transition between no-blur area and far blur.
</member>
<member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount">
+ Amount of near blur.
</member>
<member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance">
+ Distance from the camera where the near blur effect affects the rendering.
</member>
<member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled">
+ Enables the near blur effect.
</member>
<member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality">
+ Quality of the near blur quality.
</member>
<member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition">
+ Transition between near blur and no-blur area.
</member>
<member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color">
+ Fog's [Color].
</member>
<member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin">
+ Fog's depth starting distance from the camera.
</member>
<member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve">
+ Value defining the fog depth intensity.
</member>
<member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled">
+ Enables the fog depth.
</member>
<member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled">
+ Enables the fog. Needs fog_height_enabled and/or for_depth_enabled to actually display fog.
</member>
<member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve">
+ Value defining the fog height intensity.
</member>
<member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled">
+ Enables the fog height.
</member>
<member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max">
+ Maximum height of fog.
</member>
<member name="fog_height_min" type="float" setter="set_fog_height_min" getter="get_fog_height_min">
+ Minimum height of fog.
</member>
<member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount">
+ Amount of sun that affects the fog rendering.
</member>
<member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color">
+ Sun [Color].
</member>
<member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve">
+ Amount of light that the fog transmits.
</member>
<member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled">
+ Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog.
</member>
<member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled">
</member>
<member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode">
+ Glow blending mode.
</member>
<member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom">
+ Bloom value (global glow).
</member>
<member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled">
+ Enables glow rendering.
</member>
<member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale">
+ Bleed scale of the HDR glow.
</member>
<member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold">
+ Bleed threshold of the HDR glow.
</member>
<member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity">
+ Glow intensity.
</member>
<member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ First level of glow (most local).
</member>
<member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Second level of glow.
</member>
<member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Third level of glow.
</member>
<member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Fourth level of glow.
</member>
<member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Fifth level of glow.
</member>
<member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Sixth level of glow.
</member>
<member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled">
+ Seventh level of glow (most global).
</member>
<member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength">
+ Glow strength.
</member>
<member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance">
</member>
@@ -1126,48 +1189,69 @@
<member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2">
</member>
<member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure">
+ Default exposure for tonemap.
</member>
<member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper">
+ Tonemapping mode.
</member>
<member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white">
+ White reference value for tonemap.
</member>
</members>
<constants>
<constant name="BG_KEEP" value="5">
+ Keep on screen every pixel drawn in the background.
</constant>
<constant name="BG_CLEAR_COLOR" value="0">
+ Clear the background using the project's clear color.
</constant>
<constant name="BG_COLOR" value="1">
+ Clear the background using a custom clear color.
</constant>
<constant name="BG_SKY" value="2">
+ Display a user-defined sky in the background.
</constant>
<constant name="BG_COLOR_SKY" value="3">
+ Clear the background using a custom clear color and allows defining a sky for shading and reflection.
</constant>
<constant name="BG_CANVAS" value="4">
+ Display a [CanvasLayer] in the background.
</constant>
<constant name="BG_MAX" value="6">
+ Helper constant keeping track of the enum's size, has no direct usage in API calls.
</constant>
<constant name="GLOW_BLEND_MODE_ADDITIVE" value="0">
+ Additive glow blending mode. Mostly used for particles, glows (bloom), lens flare, bright sources.
</constant>
<constant name="GLOW_BLEND_MODE_SCREEN" value="1">
+ Screen glow blending mode. Increases brightness, used frequently with bloom.
</constant>
<constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2">
+ Softlight glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom.
</constant>
<constant name="GLOW_BLEND_MODE_REPLACE" value="3">
+ Replace glow blending mode. Replaces all pixels' color by the glow value.
</constant>
<constant name="TONE_MAPPER_LINEAR" value="0">
+ Linear tonemapper operator. Reads the linear data and performs an exposure adjustment.
</constant>
<constant name="TONE_MAPPER_REINHARDT" value="1">
+ Reinhardt tonemapper operator. Performs a variation on rendered pixels' colors by this formula: color = color / (1 + color).
</constant>
<constant name="TONE_MAPPER_FILMIC" value="2">
+ Filmic tonemapper operator.
</constant>
<constant name="TONE_MAPPER_ACES" value="3">
+ Academy Color Encoding System tonemapper operator.
</constant>
<constant name="DOF_BLUR_QUALITY_LOW" value="0">
+ Low depth-of-field blur quality.
</constant>
<constant name="DOF_BLUR_QUALITY_MEDIUM" value="1">
+ Medium depth-of-field blur quality.
</constant>
<constant name="DOF_BLUR_QUALITY_HIGH" value="2">
+ High depth-of-field blur quality.
</constant>
</constants>
</class>
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index c9771f1ada..f064029a01 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -228,9 +228,11 @@
<constants>
</constants>
<theme_items>
+ <theme_item name="SnapGrid" type="Texture">
+ </theme_item>
<theme_item name="bezier_len_neg" type="int">
</theme_item>
- <theme_item name="bezier_len_position" type="int">
+ <theme_item name="bezier_len_pos" type="int">
</theme_item>
<theme_item name="bg" type="StyleBox">
</theme_item>
@@ -244,7 +246,5 @@
</theme_item>
<theme_item name="reset" type="Texture">
</theme_item>
- <theme_item name="snap" type="Texture">
- </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml
index 9af6abf7b8..cd75c2b658 100644
--- a/doc/classes/Range.xml
+++ b/doc/classes/Range.xml
@@ -138,29 +138,38 @@
<argument index="0" name="with" type="Node">
</argument>
<description>
+ Binds two Ranges together along with any Ranges previously grouped with either of them. When any of Range's member variables change, it will share the new value with all other Ranges in its group.
</description>
</method>
<method name="unshare">
<return type="void">
</return>
<description>
+ Stop Range from sharing its member variables with any other Range.
</description>
</method>
</methods>
<members>
<member name="exp_edit" type="bool" setter="set_exp_ratio" getter="is_ratio_exp">
+ If [code]true[/code] and [code]min_value[/code] is greater than 0, [code]value[/code] will be represented exponentially rather than linearly.
</member>
<member name="max_value" type="float" setter="set_max" getter="get_max">
+ Maximum value. Range is clamped if [code]value[/code] is greater than [code]max_value[/code]. Default value: 100.
</member>
<member name="min_value" type="float" setter="set_min" getter="get_min">
+ Minimum value. Range is clamped if [code]value[/code] is less than [code]min_value[/code]. Default value: 0.
</member>
<member name="page" type="float" setter="set_page" getter="get_page">
+ Page size. Used mainly for [ScrollBar]. ScrollBar's length is its size multiplied by [code]page[/code] over the difference between [code]min_value[/code] and [code]max_value[/code].
</member>
<member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values">
+ If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer.
</member>
<member name="step" type="float" setter="set_step" getter="get_step">
+ If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer.
</member>
<member name="value" type="float" setter="set_value" getter="get_value">
+ Range's current value.
</member>
</members>
<signals>
diff --git a/doc/classes/RayShape.xml b/doc/classes/RayShape.xml
index 7fab9c3949..d5d367a335 100644
--- a/doc/classes/RayShape.xml
+++ b/doc/classes/RayShape.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="RayShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Ray shape for 3D collisions.
</brief_description>
<description>
+ Ray shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. A ray is not really a collision body, instead it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters.
</description>
<tutorials>
</tutorials>
@@ -26,6 +28,7 @@
</methods>
<members>
<member name="length" type="float" setter="set_length" getter="get_length">
+ The ray's length.
</member>
</members>
<constants>
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 90ee76cb98..9f8cdcce6d 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -47,6 +47,12 @@
<description>
</description>
</method>
+ <method name="get_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_percent_visible" qualifiers="const">
<return type="float">
</return>
@@ -84,6 +90,12 @@
<description>
</description>
</method>
+ <method name="get_visible_line_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_meta_underlined" qualifiers="const">
<return type="bool">
</return>
diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml
index 8e6e12a736..4d822a1705 100644
--- a/doc/classes/Shape.xml
+++ b/doc/classes/Shape.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="Shape" inherits="Resource" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Base class for all 3D shape resources.
</brief_description>
<description>
+ Base class for all 3D shape resources. All 3D shapes that inherit from this can be set into a [PhysicsBody] or [Area].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/SpatialMaterial.xml b/doc/classes/SpatialMaterial.xml
index 0f1c57e85b..344a42b7c0 100644
--- a/doc/classes/SpatialMaterial.xml
+++ b/doc/classes/SpatialMaterial.xml
@@ -105,6 +105,18 @@
<description>
</description>
</method>
+ <method name="get_distance_fade_max_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_distance_fade_min_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_emission" qualifiers="const">
<return type="Color">
</return>
@@ -187,6 +199,12 @@
<description>
</description>
</method>
+ <method name="get_proximity_fade_distance" qualifiers="const">
+ <return type="float">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_refraction" qualifiers="const">
<return type="float">
</return>
@@ -297,12 +315,24 @@
<description>
</description>
</method>
+ <method name="is_distance_fade_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="is_grow_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
</description>
</method>
+ <method name="is_proximity_fade_enabled" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="set_albedo">
<return type="void">
</return>
@@ -439,6 +469,30 @@
<description>
</description>
</method>
+ <method name="set_distance_fade">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_distance_fade_max_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_distance_fade_min_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_emission">
<return type="void">
</return>
@@ -555,6 +609,22 @@
<description>
</description>
</method>
+ <method name="set_proximity_fade">
+ <return type="void">
+ </return>
+ <argument index="0" name="enabled" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="set_proximity_fade_distance">
+ <return type="void">
+ </return>
+ <argument index="0" name="distance" type="float">
+ </argument>
+ <description>
+ </description>
+ </method>
<method name="set_refraction">
<return type="void">
</return>
@@ -745,6 +815,12 @@
</member>
<member name="detail_uv_layer" type="int" setter="set_detail_uv" getter="get_detail_uv" enum="SpatialMaterial.DetailUV">
</member>
+ <member name="distance_fade_enable" type="bool" setter="set_distance_fade" getter="is_distance_fade_enabled">
+ </member>
+ <member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance">
+ </member>
+ <member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance">
+ </member>
<member name="emission" type="Color" setter="set_emission" getter="get_emission">
</member>
<member name="emission_enabled" type="bool" setter="set_feature" getter="get_feature">
@@ -811,6 +887,10 @@
</member>
<member name="particles_anim_v_frames" type="int" setter="set_particles_anim_v_frames" getter="get_particles_anim_v_frames">
</member>
+ <member name="proximity_fade_distance" type="float" setter="set_proximity_fade_distance" getter="get_proximity_fade_distance">
+ </member>
+ <member name="proximity_fade_enable" type="bool" setter="set_proximity_fade" getter="is_proximity_fade_enabled">
+ </member>
<member name="refraction_enabled" type="bool" setter="set_feature" getter="get_feature">
</member>
<member name="refraction_scale" type="float" setter="set_refraction" getter="get_refraction">
diff --git a/doc/classes/SphereShape.xml b/doc/classes/SphereShape.xml
index 120c7fcc25..7c6174f4e4 100644
--- a/doc/classes/SphereShape.xml
+++ b/doc/classes/SphereShape.xml
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="SphereShape" inherits="Shape" category="Core" version="3.0.alpha.custom_build">
<brief_description>
+ Sphere shape for 3D collisions.
</brief_description>
<description>
+ Sphere shape for 3D collisions, which can be set into a [PhysicsBody] or [Area]. This shape is useful for modeling sphere-like 3D objects.
</description>
<tutorials>
</tutorials>
@@ -26,6 +28,7 @@
</methods>
<members>
<member name="radius" type="float" setter="set_radius" getter="get_radius">
+ The sphere's radius. The shape's diameter is double the radius.
</member>
</members>
<constants>
diff --git a/doc/classes/Sprite.xml b/doc/classes/Sprite.xml
index 90ebe79666..c0c491140f 100644
--- a/doc/classes/Sprite.xml
+++ b/doc/classes/Sprite.xml
@@ -4,7 +4,7 @@
General purpose Sprite node.
</brief_description>
<description>
- General purpose Sprite node. This Sprite node can show any texture as a sprite. The texture can be used as a spritesheet for animation, or only a region from a bigger texture can referenced, like an atlas.
+ A node that displays a 2D texture. The texture displayed can be a region from a larger atlas texture, or a frame from a sprite sheet animation.
</description>
<tutorials>
</tutorials>
@@ -202,37 +202,49 @@
</methods>
<members>
<member name="centered" type="bool" setter="set_centered" getter="is_centered">
+ If [code]true[/code] texture will be centered. Default value: [code]true[/code].
</member>
<member name="flip_h" type="bool" setter="set_flip_h" getter="is_flipped_h">
+ If [code]true[/code] texture is flipped horizontally. Default value: [code]false[/code].
</member>
<member name="flip_v" type="bool" setter="set_flip_v" getter="is_flipped_v">
+ If [code]true[/code] texture is flipped vertically. Default value: [code]false[/code].
</member>
<member name="frame" type="int" setter="set_frame" getter="get_frame">
+ Current frame to display from sprite sheet. [code]vframes[/code] or [code]hframes[/code] must be greater than 1.
</member>
<member name="hframes" type="int" setter="set_hframes" getter="get_hframes">
+ The number of horizontal frames in the sprite sheet.
</member>
<member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map">
</member>
<member name="offset" type="Vector2" setter="set_offset" getter="get_offset">
+ The texture's drawing offset.
</member>
<member name="region_enabled" type="bool" setter="set_region" getter="is_region">
+ If [code]true[/code] texture will be cut from a larger atlas texture. See [code]region_rect[/code]. Default value: [code]false[/code].
</member>
<member name="region_filter_clip" type="bool" setter="set_region_filter_clip" getter="is_region_filter_clip_enabled">
</member>
<member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect">
+ The region of the atlas texture to display. [code]region_enabled[/code] must be [code]true[/code].
</member>
<member name="texture" type="Texture" setter="set_texture" getter="get_texture">
+ [Texture] object to draw.
</member>
<member name="vframes" type="int" setter="set_vframes" getter="get_vframes">
+ The number of vertical frames in the sprite sheet.
</member>
</members>
<signals>
<signal name="frame_changed">
<description>
+ Emitted when the [code]frame[/code] changes.
</description>
</signal>
<signal name="texture_changed">
<description>
+ Emitted when the [code]texture[/code] changes.
</description>
</signal>
</signals>
diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml
index f4a8eeabe4..e46fdc80e0 100644
--- a/doc/classes/SpriteFrames.xml
+++ b/doc/classes/SpriteFrames.xml
@@ -4,7 +4,7 @@
Sprite frame library for AnimatedSprite.
</brief_description>
<description>
- Sprite frame library for [AnimatedSprite].
+ Sprite frame library for [AnimatedSprite]. Contains frames and animation data for playback.
</description>
<tutorials>
</tutorials>
@@ -17,6 +17,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Adds a new animation to the the library.
</description>
</method>
<method name="add_frame">
@@ -29,6 +30,7 @@
<argument index="2" name="at_position" type="int" default="-1">
</argument>
<description>
+ Adds a frame to the given animation.
</description>
</method>
<method name="clear">
@@ -37,12 +39,14 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Removes all frames from the given animation.
</description>
</method>
<method name="clear_all">
<return type="void">
</return>
<description>
+ Removes all animations. A "default" animation will be created.
</description>
</method>
<method name="get_animation_loop" qualifiers="const">
@@ -51,6 +55,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ If [code]true[/code] the given animation will loop.
</description>
</method>
<method name="get_animation_speed" qualifiers="const">
@@ -59,6 +64,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ The animation's speed in frames per second.
</description>
</method>
<method name="get_frame" qualifiers="const">
@@ -69,6 +75,7 @@
<argument index="1" name="idx" type="int">
</argument>
<description>
+ Returns the animation's selected frame.
</description>
</method>
<method name="get_frame_count" qualifiers="const">
@@ -77,6 +84,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Returns the number of frames in the animation.
</description>
</method>
<method name="has_animation" qualifiers="const">
@@ -85,6 +93,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ If [code]true[/code] the named animation exists.
</description>
</method>
<method name="remove_animation">
@@ -93,6 +102,7 @@
<argument index="0" name="anim" type="String">
</argument>
<description>
+ Removes the given animation.
</description>
</method>
<method name="remove_frame">
@@ -103,6 +113,7 @@
<argument index="1" name="idx" type="int">
</argument>
<description>
+ Removes the animation's selected frame.
</description>
</method>
<method name="rename_animation">
@@ -113,6 +124,7 @@
<argument index="1" name="newname" type="String">
</argument>
<description>
+ Changes the animation's name to [code]newname[/code].
</description>
</method>
<method name="set_animation_loop">
@@ -123,6 +135,7 @@
<argument index="1" name="loop" type="bool">
</argument>
<description>
+ If [code]true[/code] the animation will loop.
</description>
</method>
<method name="set_animation_speed">
@@ -133,6 +146,7 @@
<argument index="1" name="speed" type="float">
</argument>
<description>
+ The animation's speed in frames per second.
</description>
</method>
<method name="set_frame">
@@ -145,11 +159,13 @@
<argument index="2" name="txt" type="Texture">
</argument>
<description>
+ Sets the texture of the given frame.
</description>
</method>
</methods>
<members>
<member name="animations" type="Array" setter="_set_animations" getter="_get_animations">
+ An [Array] containing the [code]name[/code], [code]speed[/code], [code]loop[/code], and [code]frames[/code] of each animation.
</member>
<member name="frames" type="Array" setter="_set_frames" getter="_get_frames">
</member>
diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml
index 2f23ac588b..cff41074b8 100644
--- a/doc/classes/StaticBody2D.xml
+++ b/doc/classes/StaticBody2D.xml
@@ -4,9 +4,8 @@
Static body for 2D Physics.
</brief_description>
<description>
- Static body for 2D Physics. A static body is a simple body that is not intended to move. They don't consume any CPU resources in contrast to a [RigidBody2D] so they are great for scenario collision.
- A static body can also be animated by using simulated motion mode. This is useful for implementing functionalities such as moving platforms. When this mode is active the body can be animated and automatically computes linear and angular velocity to apply in that frame and to influence other bodies.
- Alternatively, a constant linear or angular velocity can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels).
+ Static body for 2D Physics. A StaticBody2D is a body that is not intended to move. It is ideal for implementing objects in the environment, such as walls or platforms.
+ Additionally, a constant linear or angular velocity can be set for the static body, which will affect colliding bodies as if it were moving (for example, a conveyor belt).
</description>
<tutorials>
</tutorials>
@@ -80,12 +79,16 @@
</methods>
<members>
<member name="bounce" type="float" setter="set_bounce" getter="get_bounce">
+ The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness).
</member>
<member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity">
+ Constant angular velocity for the body. This does not rotate the body, but affects colliding bodies, as if it were rotating.
</member>
<member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity">
+ Constant linear velocity for the body. This does not move the body, but affects colliding bodies, as if it were moving.
</member>
<member name="friction" type="float" setter="set_friction" getter="get_friction">
+ The body's friction. Values range from [code]0[/code] (no friction) to [code]1[/code] (full friction).
</member>
</members>
<constants>
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index a90013f922..0e39505ac3 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -36,7 +36,7 @@
<method name="Transform2D">
<return type="Transform2D">
</return>
- <argument index="0" name="rot" type="float">
+ <argument index="0" name="rotation" type="float">
</argument>
<argument index="1" name="position" type="Vector2">
</argument>
diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py
index 696e3c9c78..c4dff588b0 100644
--- a/doc/tools/makerst.py
+++ b/doc/tools/makerst.py
@@ -3,15 +3,19 @@
import codecs
import sys
+import os
import xml.etree.ElementTree as ET
input_list = []
for arg in sys.argv[1:]:
+ if arg.endswith(os.sep):
+ arg = arg[:-1]
input_list.append(arg)
if len(input_list) < 1:
- print 'usage: makerst.py <classes.xml>'
+ print 'usage: makerst.py <path to folders> and/or <path to .xml files> (order of arguments irrelevant)'
+ print 'example: makerst.py "../../modules/" "../classes" path_to/some_class.xml'
sys.exit(0)
@@ -34,7 +38,6 @@ def ul_string(str, ul):
def make_class_list(class_list, columns):
-
f = codecs.open('class_list.rst', 'wb', 'utf-8')
prev = 0
col_max = len(class_list) / columns + 1
@@ -102,7 +105,6 @@ def make_class_list(class_list, columns):
def rstize_text(text, cclass):
-
# Linebreak + tabs in the XML should become two line breaks unless in a "codeblock"
pos = 0
while True:
@@ -250,9 +252,6 @@ def rstize_text(text, cclass):
text = pre_text + tag_text + post_text
pos = len(pre_text) + len(tag_text)
- # tnode = ET.SubElement(parent,"div")
- # tnode.text=text
-
return text
@@ -272,7 +271,6 @@ def make_method(
event=False,
pp=None
):
-
if (declare or pp == None):
t = '- '
else:
@@ -340,7 +338,6 @@ def make_method(
if 'qualifiers' in m.attrib:
s += ' ' + m.attrib['qualifiers']
-# f.write(s)
if (not declare):
if (pp != None):
pp.append((t, s))
@@ -355,24 +352,23 @@ def make_heading(title, underline):
def make_rst_class(node):
-
name = node.attrib['name']
f = codecs.open("class_" + name.lower() + '.rst', 'wb', 'utf-8')
# Warn contributors not to edit this file directly
f.write(".. Generated automatically by doc/tools/makerst.py in Godot's source tree.\n")
- f.write(".. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.\n\n")
+ f.write(".. DO NOT EDIT THIS FILE, but the " + name + ".xml source instead.\n")
+ f.write(".. The source is found in doc/classes or modules/<name>/doc_classes.\n\n")
f.write(".. _class_" + name + ":\n\n")
f.write(make_heading(name, '='))
if 'inherits' in node.attrib:
inh = node.attrib['inherits'].strip()
-# whle inh in classes[cn]
f.write('**Inherits:** ')
first = True
- while(inh in classes):
+ while (inh in classes):
if (not first):
f.write(" **<** ")
else:
@@ -436,10 +432,10 @@ def make_rst_class(node):
f.write(sep)
for s in ml:
rt = s[0]
- while(len(rt) < longest_s):
+ while (len(rt) < longest_s):
rt += " "
st = s[1]
- while(len(st) < longest_t):
+ while (len(st) < longest_t):
st += " "
f.write("| " + rt + " | " + st + " |\n")
f.write(sep)
@@ -494,8 +490,6 @@ def make_rst_class(node):
f.write(make_heading('Member Function Description', '-'))
for m in list(methods):
f.write(".. _class_" + name + "_" + m.attrib['name'] + ":\n\n")
-# f.write(ul_string(m.attrib['name'],"^"))
- #f.write('\n<a name="'+m.attrib['name']+'">' + m.attrib['name'] + '</a>\n------\n')
make_method(f, node.attrib['name'], m, True, name)
f.write('\n')
d = m.find('description')
@@ -506,7 +500,21 @@ def make_rst_class(node):
f.write('\n')
-for file in input_list:
+file_list = []
+
+for path in input_list:
+ if os.path.basename(path) == 'modules':
+ for subdir, dirs, _ in os.walk(path):
+ if 'doc_classes' in dirs:
+ doc_dir = os.path.join(subdir, 'doc_classes')
+ class_file_name = [f for f in os.listdir(doc_dir) if f.endswith('.xml')][0]
+ file_list.append(os.path.join(doc_dir, class_file_name))
+ elif not os.path.isfile(path):
+ file_list += [os.path.join(path, f) for f in os.listdir(path) if f.endswith('.xml')]
+ elif os.path.isfile(path) and path.endswith('.xml'):
+ file_list.append(path)
+
+for file in file_list:
tree = ET.parse(file)
doc = tree.getroot()
@@ -515,17 +523,15 @@ for file in input_list:
sys.exit(255)
version = doc.attrib['version']
-
- for c in list(doc):
- if c.attrib['name'] in class_names:
- continue
- class_names.append(c.attrib['name'])
- classes[c.attrib['name']] = c
+ if doc.attrib['name'] in class_names:
+ continue
+ class_names.append(doc.attrib['name'])
+ classes[doc.attrib['name']] = doc
class_names.sort()
# Don't make class list for Sphinx, :toctree: handles it
-#make_class_list(class_names, 2)
+# make_class_list(class_names, 2)
for cn in class_names:
c = classes[cn]