From 989acbbe810920e303ae248432a735b1a7e9f7d5 Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Wed, 11 Aug 2021 16:01:38 -0700 Subject: Uniformize layer names, script methods and documentation - Back to 1-based layer names to make it clearer in editor UI - Layer bit accessors are renamed to layer value and 1-based too - Uniform errors and documentation in render and physics - Fix a few remaining collision_layer used in place of collision_mask --- doc/classes/Camera3D.xml | 14 +++++------ doc/classes/ClippedCamera3D.xml | 14 +++++------ doc/classes/CollisionObject2D.xml | 26 +++++++++---------- doc/classes/CollisionObject3D.xml | 26 +++++++++---------- doc/classes/NavigationMesh.xml | 13 +++++----- doc/classes/OccluderInstance3D.xml | 12 +++++---- doc/classes/PhysicsDirectSpaceState2D.xml | 10 ++++---- doc/classes/PhysicsDirectSpaceState3D.xml | 2 +- doc/classes/PhysicsShapeQueryParameters2D.xml | 4 +-- doc/classes/PhysicsShapeQueryParameters3D.xml | 2 +- doc/classes/ProjectSettings.xml | 36 +++++++++++++-------------- doc/classes/RayCast2D.xml | 12 ++++----- doc/classes/RayCast3D.xml | 14 +++++------ doc/classes/SoftBody3D.xml | 24 +++++++++--------- doc/classes/VisualInstance3D.xml | 14 +++++------ 15 files changed, 108 insertions(+), 115 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 2ada0c556d..8a91a91b22 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -29,11 +29,11 @@ Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform. - + - + - Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise. + Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. @@ -92,12 +92,12 @@ Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. - + - - + + - Enables or disables the given [code]layer[/code] in the [member cull_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member cull_mask], given a [code]layer_number[/code] between 1 and 20. diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml index 1a76412826..1a0d3499cd 100644 --- a/doc/classes/ClippedCamera3D.xml +++ b/doc/classes/ClippedCamera3D.xml @@ -35,12 +35,11 @@ Returns the distance the camera has been offset due to a collision. - + - + - Returns [code]true[/code] if the specified bit index is on. - [b]Note:[/b] Bit indices range from 0-19. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. @@ -57,13 +56,12 @@ Removes a collision exception with the specified [RID]. - + - + - Sets the specified bit index to the [code]value[/code]. - [b]Note:[/b] Bit indices range from 0-19. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 6bb756ea2c..7129c72e7c 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -25,18 +25,18 @@ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. - + - + - Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. - + - + - Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. @@ -79,22 +79,20 @@ Removes the given shape owner. - + - + - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. - + - + - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index 0210f6297f..f9151a2c2f 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -27,18 +27,18 @@ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. - + - + - Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. - + - + - Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. @@ -67,22 +67,20 @@ Removes the given shape owner. - + - + - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. - + - + - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 89a394ef6c..e476949360 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -30,11 +30,11 @@ Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. - + - + - Returns whether the specified [code]bit[/code] of the [member geometry/collision_mask] is set. + Returns whether or not the specified layer of the [member geometry/collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. @@ -56,13 +56,12 @@ Returns a [PackedVector3Array] containing all the vertices being used to create the polygons. - + - + - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the [member geometry/collision_mask]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the [member geometry/collision_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member geometry/collision_mask], given a [code]layer_number[/code] between 1 and 32. diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index 150bfd9257..cc4bddc229 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -7,17 +7,19 @@ - + - + + Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. - + - - + + + Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 20. diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index 2a32bc1cb9..e84b3e0e49 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -47,7 +47,7 @@ - + @@ -57,7 +57,7 @@ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected. @@ -67,7 +67,7 @@ - + @@ -78,7 +78,7 @@ - + @@ -91,7 +91,7 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index a6bfc8754d..13db50a2c7 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -59,7 +59,7 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 229a40638a..8b006c68e7 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -17,8 +17,8 @@ If [code]true[/code], the query will take [PhysicsBody2D]s into account. - - The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + + The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 9ca892acb3..de9b623591 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -18,7 +18,7 @@ If [code]true[/code], the query will take [PhysicsBody3D]s into account. - The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index f53c854fa9..363c18839a 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -777,9 +777,6 @@ Specifies the [TextServer] to use. If left empty, the default will be used. - - Optional name for the 2D navigation layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". @@ -855,6 +852,9 @@ Optional name for the 2D navigation layer 31. If left empty, the layer will display as "Layer 31". + + Optional name for the 2D navigation layer 32. If left empty, the layer will display as "Layer 32". + Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". @@ -873,9 +873,6 @@ Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". - - Optional name for the 2D physics layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". @@ -951,6 +948,9 @@ Optional name for the 2D physics layer 31. If left empty, the layer will display as "Layer 31". + + Optional name for the 2D physics layer 32. If left empty, the layer will display as "Layer 32". + Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". @@ -969,9 +969,6 @@ Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". - - Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". @@ -1008,6 +1005,9 @@ Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". + + Optional name for the 2D render layer 20. If left empty, the layer will display as "Layer 20". + Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". @@ -1029,9 +1029,6 @@ Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". - - Optional name for the 3D navigation layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". @@ -1107,6 +1104,9 @@ Optional name for the 3D navigation layer 31. If left empty, the layer will display as "Layer 31". + + Optional name for the 3D navigation layer 32. If left empty, the layer will display as "Layer 32". + Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". @@ -1125,9 +1125,6 @@ Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". - - Optional name for the 3D physics layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". @@ -1203,6 +1200,9 @@ Optional name for the 3D physics layer 31. If left empty, the layer will display as "Layer 31". + + Optional name for the 3D physics layer 32. If left empty, the layer will display as "Layer 32". + Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". @@ -1221,9 +1221,6 @@ Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". - - Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". @@ -1260,6 +1257,9 @@ Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". + + Optional name for the 3D render layer 20. If left empty, the layer will display as "Layer 20". + Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index d8a5fc8508..1d32db8078 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -53,11 +53,11 @@ Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). - + - + - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. @@ -93,12 +93,12 @@ Removes a collision exception so the ray does report collisions with the specified [RID]. - + - + - Sets or clears individual bits on the collision mask. This makes selecting the areas scanned easier. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 4e8eb960db..8628ab7dac 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -55,12 +55,11 @@ Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). - + - + - Returns [code]true[/code] if the bit index passed is turned on. - [b]Note:[/b] Bit indices range from 0-19. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. @@ -96,13 +95,12 @@ Removes a collision exception so the ray does report collisions with the specified [RID]. - + - + - Sets the bit index passed to the [code]value[/code] passed. - [b]Note:[/b] Bit indexes range from 0-19. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index 53bd7e67bf..ddfc14ceac 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -23,18 +23,18 @@ Returns an array of nodes that were added as collision exceptions for this body. - + - + - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. - + - + - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. @@ -49,20 +49,20 @@ Removes a body from the list of bodies that this body can't collide with. - + - + - Sets individual bits on the layer mask. Use this if you only need to change one layer's value. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. - + - + - Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 2d9c266f3c..f949fbe7c0 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -27,11 +27,11 @@ Returns the RID of this instance. This RID is the same as the RID returned by [method RenderingServer.instance_create]. This RID is needed if you want to call [RenderingServer] functions directly on this [VisualInstance3D]. - + - + - Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. + Returns whether or not the specified layer of the [member layers] is enabled, given a [code]layer_number[/code] between 1 and 20. @@ -48,12 +48,12 @@ Sets the resource that is instantiated by this [VisualInstance3D], which changes how the engine handles the [VisualInstance3D] under the hood. Equivalent to [method RenderingServer.instance_set_base]. - + - - + + - Enables a particular layer in [member layers]. + Based on [code]value[/code], enables or disables the specified layer in the [member layers], given a [code]layer_number[/code] between 1 and 20. -- cgit v1.2.3