From b433020aa6142fe4319deb15ca9a5e8b50752a18 Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Tue, 6 Jun 2023 11:27:29 +0300 Subject: [PATCH] Documentation: Unify deprecations --- doc/classes/AStarGrid2D.xml | 4 ++-- doc/classes/AnimatedTexture.xml | 3 ++- doc/classes/HTTPClient.xml | 8 ++++---- doc/classes/Node.xml | 2 +- doc/classes/PhysicsServer2D.xml | 2 +- doc/classes/RenderingServer.xml | 10 +++++----- doc/classes/Skeleton3D.xml | 1 + doc/classes/SkeletonIK3D.xml | 1 + doc/classes/SurfaceTool.xml | 2 +- doc/classes/Viewport.xml | 2 +- scene/main/viewport.cpp | 4 ++-- scene/resources/surface_tool.cpp | 2 ++ 12 files changed, 23 insertions(+), 18 deletions(-) diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml index 0cf06765218..418a57dfa4b 100644 --- a/doc/classes/AStarGrid2D.xml +++ b/doc/classes/AStarGrid2D.xml @@ -161,9 +161,9 @@ The region of grid cells available for pathfinding. If changed, [method update] needs to be called before finding the next path. - + The size of the grid (number of cells of size [member cell_size] on each axis). If changed, [method update] needs to be called before finding the next path. - [b]Note:[/b] This property is deprecated, use [member region] instead. + [i]Deprecated.[/i] Use [member region] instead. diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index e16c9353bdb..63c62e1beb0 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -8,7 +8,8 @@ The playback of the animation is controlled by the [member speed_scale] property, as well as each frame's duration (see [method set_frame_duration]). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. [AnimatedTexture] currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. [b]Note:[/b] AnimatedTexture doesn't support using [AtlasTexture]s. Each frame needs to be a separate [Texture2D]. - [b]Warning:[/b] AnimatedTexture is deprecated, and might be removed in a future release. Its current implementation is not efficient for the modern renderers. + [b]Warning:[/b] The current implementation is not efficient for the modern renderers. + [i]Deprecated.[/i] This class is deprecated, and might be removed in a future release. diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index e1644f1b218..39cebf773b2 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -321,11 +321,11 @@ HTTP status code [code]304 Not Modified[/code]. A conditional GET or HEAD request has been received and would have resulted in a 200 OK response if it were not for the fact that the condition evaluated to [code]false[/code]. - - HTTP status code [code]305 Use Proxy[/code]. [i]Deprecated. Do not use.[/i] + + [i]Deprecated.[/i] HTTP status code [code]305 Use Proxy[/code]. - - HTTP status code [code]306 Switch Proxy[/code]. [i]Deprecated. Do not use.[/i] + + [i]Deprecated.[/i] HTTP status code [code]306 Switch Proxy[/code]. HTTP status code [code]307 Temporary Redirect[/code]. The target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index c6a3217e0ec..e9437e0be7c 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -946,7 +946,7 @@ This notification is emitted [i]after[/i] the related [signal tree_exiting]. - This notification is deprecated and is no longer emitted. Use [constant NOTIFICATION_CHILD_ORDER_CHANGED] instead. + [i]Deprecated.[/i] This notification is no longer emitted. Use [constant NOTIFICATION_CHILD_ORDER_CHANGED] instead. Notification received when the node is ready. See [method _ready]. diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index e7b5e4132b8..3e2bb9b53ad 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -909,7 +909,7 @@ - [constant SHAPE_CAPSULE]: an array of length two (or a [Vector2]) containing a [code]float[/code] [code]height[/code] and a [code]float[/code] [code]radius[/code], - [constant SHAPE_CONVEX_POLYGON]: either a [PackedVector2Array] of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a [PackedFloat32Array] of length divisible by four so that every 4-tuple of [code]float[/code]s contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point, - [constant SHAPE_CONCAVE_POLYGON]: a [PackedVector2Array] of length divisible by two (each pair of points forms one segment). - [b]Warning[/b]: In the case of [constant SHAPE_CONVEX_POLYGON], this method does not check if the points supplied actually form a convex polygon (unlike the [member CollisionPolygon2D.polygon] property). + [b]Warning:[/b] In the case of [constant SHAPE_CONVEX_POLYGON], this method does not check if the points supplied actually form a convex polygon (unlike the [member CollisionPolygon2D.polygon] property). diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 4b0bdc53293..840a594ec4e 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -3304,14 +3304,14 @@ Returns a texture [RID] that can be used with [RenderingDevice]. - + - [i]Deprecated.[/i] As ProxyTexture was removed in Godot 4, this method does nothing when called and always returns a null [RID]. + [i]Deprecated.[/i] ProxyTexture was removed in Godot 4, so this method does nothing when called and always returns a null [RID]. - + @@ -3960,8 +3960,8 @@ The maximum number of glow levels that can be used with the glow post-processing effect. - - [i]Deprecated.[/i] This constant is unused. + + [i]Deprecated.[/i] This constant is unused internally. The maximum number of directional lights that can be rendered at a given time in 2D. diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index d410c5840c9..a3f0a6c734a 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -49,6 +49,7 @@ Force updates the bone transforms/poses for all bones in the skeleton. + [i]Deprecated.[/i] Do not use. diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml index 6de86c3b103..9973c1818b8 100644 --- a/doc/classes/SkeletonIK3D.xml +++ b/doc/classes/SkeletonIK3D.xml @@ -24,6 +24,7 @@ # Apply zero IK effect (a value at or below 0.01 also removes bones_global_pose_override on Skeleton) skeleton_ik_node.set_interpolation(0.0) [/codeblock] + [i]Deprecated.[/i] This class is deprecated, and might be removed in a future release. https://godotengine.org/asset-library/asset/523 diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index ddea69e56e9..aa486a1843e 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -124,7 +124,7 @@ Generates a LOD for a given [param nd_threshold] in linear units (square root of quadric error metric), using at most [param target_index_count] indices. - Deprecated. Unused internally and neglects to preserve normals or UVs. Consider using [method ImporterMesh.generate_lods] instead. + [i]Deprecated.[/i] Unused internally and neglects to preserve normals or UVs. Consider using [method ImporterMesh.generate_lods] instead. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 66df40c18fa..e7840425079 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -188,7 +188,7 @@ If an earlier method marks the input as handled via [method set_input_as_handled], any later method in this list will not be called. If none of the methods handle the event and [member physics_object_picking] is [code]true[/code], the event is used for physics object picking. [b]Note:[/b] This method doesn't propagate input events to embedded [Window]s or [SubViewport]s. - [b]Note:[/b] This method is deprecated, use [method push_input] instead. + [i]Deprecated.[/i] Use [method push_input] instead. diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index 8fcf9e84c48..e4e4cf3b10f 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -3008,9 +3008,9 @@ void Viewport::push_input(const Ref &p_event, bool p_local_coords) { #ifndef DISABLE_DEPRECATED void Viewport::push_unhandled_input(const Ref &p_event, bool p_local_coords) { ERR_MAIN_THREAD_GUARD; - ERR_FAIL_COND(p_event.is_null()); + WARN_DEPRECATED_MSG(R"*(The "push_unhandled_input()" method is deprecated, use "push_input()" instead.)*"); ERR_FAIL_COND(!is_inside_tree()); - WARN_DEPRECATED_MSG(R"(The "push_unhandled_input" method is deprecated, use "push_input" instead.)"); + ERR_FAIL_COND(p_event.is_null()); local_input_handled = false; diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index c296523475d..f2c1c60612b 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -1304,6 +1304,8 @@ AABB SurfaceTool::get_aabb() const { return aabb; } Vector SurfaceTool::generate_lod(float p_threshold, int p_target_index_count) { + WARN_DEPRECATED_MSG(R"*(The "SurfaceTool.generate_lod()" method is deprecated. Consider using "ImporterMesh.generate_lods()" instead.)*"); + Vector lod; ERR_FAIL_COND_V(simplify_func == nullptr, lod);