Browse Source

Sync classref with current source

Rémi Verschelde 6 years ago
parent
commit
189220bc56

+ 35 - 21
classes/class_bakedlightmap.rst

@@ -19,27 +19,29 @@ Prerendered indirect light map for a scene.
 Properties
 ----------
 
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`float<class_float>`                          | :ref:`bake_cell_size<class_BakedLightmap_property_bake_cell_size>`       | 0.25                  |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`float<class_float>`                          | :ref:`bake_energy<class_BakedLightmap_property_bake_energy>`             | 1.0                   |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`Vector3<class_Vector3>`                      | :ref:`bake_extents<class_BakedLightmap_property_bake_extents>`           | Vector3( 10, 10, 10 ) |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`bool<class_bool>`                            | :ref:`bake_hdr<class_BakedLightmap_property_bake_hdr>`                   | false                 |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`BakeMode<enum_BakedLightmap_BakeMode>`       | :ref:`bake_mode<class_BakedLightmap_property_bake_mode>`                 | 0                     |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`float<class_float>`                          | :ref:`bake_propagation<class_BakedLightmap_property_bake_propagation>`   | 1.0                   |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` | :ref:`bake_quality<class_BakedLightmap_property_bake_quality>`           | 1                     |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`float<class_float>`                          | :ref:`capture_cell_size<class_BakedLightmap_property_capture_cell_size>` | 0.5                   |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`String<class_String>`                        | :ref:`image_path<class_BakedLightmap_property_image_path>`               | "."                   |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
-| :ref:`BakedLightmapData<class_BakedLightmapData>`  | :ref:`light_data<class_BakedLightmap_property_light_data>`               | null                  |
-+----------------------------------------------------+--------------------------------------------------------------------------+-----------------------+
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`float<class_float>`                          | :ref:`bake_cell_size<class_BakedLightmap_property_bake_cell_size>`                             | 0.25                  |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`float<class_float>`                          | :ref:`bake_default_texels_per_unit<class_BakedLightmap_property_bake_default_texels_per_unit>` | 20.0                  |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`float<class_float>`                          | :ref:`bake_energy<class_BakedLightmap_property_bake_energy>`                                   | 1.0                   |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`Vector3<class_Vector3>`                      | :ref:`bake_extents<class_BakedLightmap_property_bake_extents>`                                 | Vector3( 10, 10, 10 ) |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`bool<class_bool>`                            | :ref:`bake_hdr<class_BakedLightmap_property_bake_hdr>`                                         | false                 |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`BakeMode<enum_BakedLightmap_BakeMode>`       | :ref:`bake_mode<class_BakedLightmap_property_bake_mode>`                                       | 0                     |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`float<class_float>`                          | :ref:`bake_propagation<class_BakedLightmap_property_bake_propagation>`                         | 1.0                   |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`BakeQuality<enum_BakedLightmap_BakeQuality>` | :ref:`bake_quality<class_BakedLightmap_property_bake_quality>`                                 | 1                     |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`float<class_float>`                          | :ref:`capture_cell_size<class_BakedLightmap_property_capture_cell_size>`                       | 0.5                   |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`String<class_String>`                        | :ref:`image_path<class_BakedLightmap_property_image_path>`                                     | "."                   |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
+| :ref:`BakedLightmapData<class_BakedLightmapData>`  | :ref:`light_data<class_BakedLightmap_property_light_data>`                                     | null                  |
++----------------------------------------------------+------------------------------------------------------------------------------------------------+-----------------------+
 
 Methods
 -------
@@ -132,6 +134,18 @@ Property Descriptions
 
 Grid subdivision size for lightmapper calculation. The default value will work for most cases. Increase for better lighting on small details or if your scene is very large.
 
+.. _class_BakedLightmap_property_bake_default_texels_per_unit:
+
+- :ref:`float<class_float>` **bake_default_texels_per_unit**
+
++-----------+-----------------------------------------+
+| *Default* | 20.0                                    |
++-----------+-----------------------------------------+
+| *Setter*  | set_bake_default_texels_per_unit(value) |
++-----------+-----------------------------------------+
+| *Getter*  | get_bake_default_texels_per_unit()      |
++-----------+-----------------------------------------+
+
 .. _class_BakedLightmap_property_bake_energy:
 
 - :ref:`float<class_float>` **bake_energy**

+ 9 - 0
classes/class_editorsettings.rst

@@ -60,6 +60,15 @@ Signals
 
 - **settings_changed** **(** **)**
 
+Emitted when editor settings change.
+
+Constants
+---------
+
+.. _class_EditorSettings_constant_NOTIFICATION_EDITOR_SETTINGS_CHANGED:
+
+- **NOTIFICATION_EDITOR_SETTINGS_CHANGED** = **10000** --- Emitted when editor settings change. It used by various editor plugins to update their visuals on theme changes or logic on configuration changes.
+
 Description
 -----------
 

+ 2 - 0
classes/class_spatial.rst

@@ -448,6 +448,8 @@ Transforms ``global_point`` from world space to this node's local space.
 
 Changes the node's position by given offset :ref:`Vector3<class_Vector3>`.
 
+Note that the translation ``offset`` is affected by the node's scale, so if scaled by e.g. ``(10, 1, 1)``, a translation by an offset of ``(2, 0, 0)`` would actually add 20 (``2 * 10``) to the X coordinate.
+
 .. _class_Spatial_method_translate_object_local:
 
 - void **translate_object_local** **(** :ref:`Vector3<class_Vector3>` offset **)**

+ 16 - 0
classes/class_string.rst

@@ -178,6 +178,10 @@ Methods
 +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`String<class_String>`                   | :ref:`rstrip<class_String_method_rstrip>` **(** :ref:`String<class_String>` chars **)**                                                                                 |
 +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| :ref:`PoolByteArray<class_PoolByteArray>`     | :ref:`sha1_buffer<class_String_method_sha1_buffer>` **(** **)**                                                                                                         |
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| :ref:`String<class_String>`                   | :ref:`sha1_text<class_String_method_sha1_text>` **(** **)**                                                                                                             |
++-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`PoolByteArray<class_PoolByteArray>`     | :ref:`sha256_buffer<class_String_method_sha256_buffer>` **(** **)**                                                                                                     |
 +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`String<class_String>`                   | :ref:`sha256_text<class_String_method_sha256_text>` **(** **)**                                                                                                         |
@@ -666,6 +670,18 @@ For example, ``"One,Two,Three,Four"`` will return ``["Three","Four"]`` if split
 
 Returns a copy of the string with characters removed from the right.
 
+.. _class_String_method_sha1_buffer:
+
+- :ref:`PoolByteArray<class_PoolByteArray>` **sha1_buffer** **(** **)**
+
+Returns the SHA-1 hash of the string as an array of bytes.
+
+.. _class_String_method_sha1_text:
+
+- :ref:`String<class_String>` **sha1_text** **(** **)**
+
+Returns the SHA-1 hash of the string as a string.
+
 .. _class_String_method_sha256_buffer:
 
 - :ref:`PoolByteArray<class_PoolByteArray>` **sha256_buffer** **(** **)**

+ 8 - 0
classes/class_tcp_server.rst

@@ -22,6 +22,8 @@ Methods
 +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`bool<class_bool>`                   | :ref:`is_connection_available<class_TCP_Server_method_is_connection_available>` **(** **)** const                                  |
 +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
+| :ref:`bool<class_bool>`                   | :ref:`is_listening<class_TCP_Server_method_is_listening>` **(** **)** const                                                        |
++-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
 | :ref:`Error<enum_@GlobalScope_Error>`     | :ref:`listen<class_TCP_Server_method_listen>` **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*" **)** |
 +-------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+
 | void                                      | :ref:`stop<class_TCP_Server_method_stop>` **(** **)**                                                                              |
@@ -43,6 +45,12 @@ Method Descriptions
 
 Returns ``true`` if a connection is available for taking.
 
+.. _class_TCP_Server_method_is_listening:
+
+- :ref:`bool<class_bool>` **is_listening** **(** **)** const
+
+Returns ``true`` if the server is currently listening for connections.
+
 .. _class_TCP_Server_method_listen:
 
 - :ref:`Error<enum_@GlobalScope_Error>` **listen** **(** :ref:`int<class_int>` port, :ref:`String<class_String>` bind_address="*" **)**

+ 38 - 0
classes/class_tilemap.rst

@@ -34,6 +34,8 @@ Properties
 +--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
 | :ref:`bool<class_bool>`                    | :ref:`cell_y_sort<class_TileMap_property_cell_y_sort>`                         | false                           |
 +--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
+| :ref:`bool<class_bool>`                    | :ref:`centered_textures<class_TileMap_property_centered_textures>`             | false                           |
++--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
 | :ref:`float<class_float>`                  | :ref:`collision_bounce<class_TileMap_property_collision_bounce>`               | 0.0                             |
 +--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
 | :ref:`float<class_float>`                  | :ref:`collision_friction<class_TileMap_property_collision_friction>`           | 1.0                             |
@@ -46,6 +48,8 @@ Properties
 +--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
 | :ref:`bool<class_bool>`                    | :ref:`collision_use_parent<class_TileMap_property_collision_use_parent>`       | false                           |
 +--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
+| :ref:`bool<class_bool>`                    | :ref:`compatibility_mode<class_TileMap_property_compatibility_mode>`           | false                           |
++--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
 | :ref:`Mode<enum_TileMap_Mode>`             | :ref:`mode<class_TileMap_property_mode>`                                       | 0                               |
 +--------------------------------------------+--------------------------------------------------------------------------------+---------------------------------+
 | :ref:`int<class_int>`                      | :ref:`occluder_light_mask<class_TileMap_property_occluder_light_mask>`         | 1                               |
@@ -286,6 +290,22 @@ Position for tile origin. See :ref:`TileOrigin<enum_TileMap_TileOrigin>` for pos
 
 If ``true``, the TileMap's children will be drawn in order of their Y coordinate.
 
+.. _class_TileMap_property_centered_textures:
+
+- :ref:`bool<class_bool>` **centered_textures**
+
++-----------+--------------------------------+
+| *Default* | false                          |
++-----------+--------------------------------+
+| *Setter*  | set_centered_textures(value)   |
++-----------+--------------------------------+
+| *Getter*  | is_centered_textures_enabled() |
++-----------+--------------------------------+
+
+If ``true``, the textures will be centered in the middle of each tile. This is useful for certain isometric or top-down modes when textures are made larger or smaller than the tiles (e.g. to avoid flickering on tile edges). The offset is still applied, but from the center of the tile. If used, :ref:`compatibility_mode<class_TileMap_property_compatibility_mode>` is ignored.
+
+If ``false``, the texture position start in the top-left corner unless :ref:`compatibility_mode<class_TileMap_property_compatibility_mode>` is enabled.
+
 .. _class_TileMap_property_collision_bounce:
 
 - :ref:`float<class_float>` **collision_bounce**
@@ -368,6 +388,24 @@ If ``true``, TileMap collisions will be handled as a kinematic body. If ``false`
 | *Getter*  | get_collision_use_parent()      |
 +-----------+---------------------------------+
 
+.. _class_TileMap_property_compatibility_mode:
+
+- :ref:`bool<class_bool>` **compatibility_mode**
+
++-----------+---------------------------------+
+| *Default* | false                           |
++-----------+---------------------------------+
+| *Setter*  | set_compatibility_mode(value)   |
++-----------+---------------------------------+
+| *Getter*  | is_compatibility_mode_enabled() |
++-----------+---------------------------------+
+
+If ``true``, the compatibility with the tilemaps made in Godot 3.1 or earlier is maintained (textures move when the tile origin changes and rotate if the texture size is not homogeneous). This mode presents problems when doing ``flip_h``, ``flip_v`` and ``transpose`` tile operations on non-homogeneous isometric tiles (e.g. 2:1), in which the texture could not coincide with the collision, thus it is not recommended for isometric or non-square tiles.
+
+If ``false``, the textures do not move when doing ``flip_h``, ``flip_v`` operations if no offset is used, nor when changing the tile origin.
+
+The compatibility mode doesn't work with the :ref:`centered_textures<class_TileMap_property_centered_textures>` option, because displacing textures with the :ref:`cell_tile_origin<class_TileMap_property_cell_tile_origin>` option or in irregular tiles is not relevant when centering those textures.
+
 .. _class_TileMap_property_mode:
 
 - :ref:`Mode<enum_TileMap_Mode>` **mode**

+ 4 - 4
classes/class_transform.rst

@@ -69,13 +69,13 @@ Constants
 
 .. _class_Transform_constant_FLIP_Z:
 
-- **IDENTITY** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )**
+- **IDENTITY** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )** --- ``Transform`` with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY<class_Transform_constant_IDENTITY>` performs no transformation.
 
-- **FLIP_X** = **Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )**
+- **FLIP_X** = **Transform( -1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )** --- ``Transform`` with mirroring applied perpendicular to the YZ plane.
 
-- **FLIP_Y** = **Transform( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )**
+- **FLIP_Y** = **Transform( 1, 0, 0, 0, -1, 0, 0, 0, 1, 0, 0, 0 )** --- ``Transform`` with mirroring applied perpendicular to the XZ plane.
 
-- **FLIP_Z** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )**
+- **FLIP_Z** = **Transform( 1, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0 )** --- ``Transform`` with mirroring applied perpendicular to the XY plane.
 
 Description
 -----------

+ 3 - 3
classes/class_transform2d.rst

@@ -73,11 +73,11 @@ Constants
 
 .. _class_Transform2D_constant_FLIP_Y:
 
-- **IDENTITY** = **Transform2D( 1, 0, 0, 1, 0, 0 )**
+- **IDENTITY** = **Transform2D( 1, 0, 0, 1, 0, 0 )** --- ``Transform2D`` with no translation, rotation or scaling applied. When applied to other data structures, :ref:`IDENTITY<class_Transform2D_constant_IDENTITY>` performs no transformation.
 
-- **FLIP_X** = **Transform2D( -1, 0, 0, 1, 0, 0 )**
+- **FLIP_X** = **Transform2D( -1, 0, 0, 1, 0, 0 )** --- ``Transform2D`` with mirroring applied parallel to the X axis.
 
-- **FLIP_Y** = **Transform2D( 1, 0, 0, -1, 0, 0 )**
+- **FLIP_Y** = **Transform2D( 1, 0, 0, -1, 0, 0 )** --- ``Transform2D`` with mirroring applied parallel to the Y axis.
 
 Description
 -----------

+ 1 - 1
classes/class_websocketclient.rst

@@ -102,7 +102,7 @@ Method Descriptions
 
 - :ref:`Error<enum_@GlobalScope_Error>` **connect_to_url** **(** :ref:`String<class_String>` url, :ref:`PoolStringArray<class_PoolStringArray>` protocols=PoolStringArray(  ), :ref:`bool<class_bool>` gd_mp_api=false **)**
 
-Connects to the given URL requesting one of the given ``protocols`` as sub-protocol.
+Connects to the given URL requesting one of the given ``protocols`` as sub-protocol. If the list empty (default), no sub-protocol will be requested.
 
 If ``true`` is passed as ``gd_mp_api``, the client will behave like a network peer for the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, connections to non-Godot servers will not work, and :ref:`data_received<class_WebSocketClient_signal_data_received>` will not be emitted.
 

+ 1 - 1
classes/class_websocketserver.rst

@@ -112,7 +112,7 @@ Returns ``true`` if the server is actively listening on a port.
 
 Starts listening on the given port.
 
-You can specify the desired subprotocols via the "protocols" array. If the list empty (default), "binary" will be used.
+You can specify the desired subprotocols via the "protocols" array. If the list empty (default), no sub-protocol will be requested.
 
 If ``true`` is passed as ``gd_mp_api``, the server will behave like a network peer for the :ref:`MultiplayerAPI<class_MultiplayerAPI>`, connections from non-Godot clients will not work, and :ref:`data_received<class_WebSocketServer_signal_data_received>` will not be emitted.