diff options
-rw-r--r-- | scene/2d/node_2d.cpp | 20 | ||||
-rw-r--r-- | scene/2d/node_2d.h | 4 | ||||
-rw-r--r-- | scene/3d/spatial.cpp | 18 | ||||
-rw-r--r-- | scene/3d/spatial.h | 4 | ||||
-rw-r--r-- | scene/gui/control.cpp | 14 | ||||
-rw-r--r-- | scene/gui/control.h | 4 | ||||
-rw-r--r-- | scene/main/canvas_layer.cpp | 18 | ||||
-rw-r--r-- | scene/main/canvas_layer.h | 4 |
8 files changed, 2 insertions, 84 deletions
diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index e62b59dd4d..b6111e9765 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -155,14 +155,6 @@ void Node2D::set_rotation_in_degrees(float p_degrees) { set_rotation(Math::deg2rad(p_degrees)); } -// Kept for compatibility after rename to set_rotd. -// Could be removed after a couple releases. -void Node2D::_set_rotd(float p_degrees) { - - WARN_PRINT("Deprecated method Node2D._set_rotd(): This method was renamed to set_rotd. Please adapt your code accordingly, as the old method will be obsoleted."); - set_rotation_in_degrees(p_degrees); -} - void Node2D::set_scale(const Size2 &p_scale) { if (_xform_dirty) @@ -182,23 +174,19 @@ Point2 Node2D::get_position() const { ((Node2D *)this)->_update_xform_values(); return pos; } + float Node2D::get_rotation() const { if (_xform_dirty) ((Node2D *)this)->_update_xform_values(); return angle; } + float Node2D::get_rotation_in_degrees() const { return Math::rad2deg(get_rotation()); } -// Kept for compatibility after rename to get_rotd. -// Could be removed after a couple releases. -float Node2D::_get_rotd() const { - WARN_PRINT("Deprecated method Node2D._get_rotd(): This method was renamed to get_rotd. Please adapt your code accordingly, as the old method will be obsoleted."); - return get_rotation_in_degrees(); -} Size2 Node2D::get_scale() const { if (_xform_dirty) ((Node2D *)this)->_update_xform_values(); @@ -410,10 +398,6 @@ Point2 Node2D::to_global(Point2 p_local) const { void Node2D::_bind_methods() { - // TODO: Obsolete those two methods (old name) properly (GH-4397) - ClassDB::bind_method(D_METHOD("_get_rotd"), &Node2D::_get_rotd); - ClassDB::bind_method(D_METHOD("_set_rotd", "degrees"), &Node2D::_set_rotd); - ClassDB::bind_method(D_METHOD("set_position", "position"), &Node2D::set_position); ClassDB::bind_method(D_METHOD("set_rotation", "radians"), &Node2D::set_rotation); ClassDB::bind_method(D_METHOD("set_rotation_in_degrees", "degrees"), &Node2D::set_rotation_in_degrees); diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h index 19aafc81ff..8890c829f8 100644 --- a/scene/2d/node_2d.h +++ b/scene/2d/node_2d.h @@ -48,10 +48,6 @@ class Node2D : public CanvasItem { void _update_transform(); - // Deprecated, should be removed in a future version. - void _set_rotd(float p_degrees); - float _get_rotd() const; - void _update_xform_values(); protected: diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 0dfd80ca90..bc306481ce 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -332,12 +332,6 @@ void Spatial::set_rotation_in_degrees(const Vector3 &p_euler_deg) { set_rotation(p_euler_deg * Math_PI / 180.0); } -void Spatial::_set_rotation_deg(const Vector3 &p_euler_deg) { - - WARN_PRINT("Deprecated method Spatial._set_rotation_deg(): This method was renamed to set_rotation_deg. Please adapt your code accordingly, as the old method will be obsoleted."); - set_rotation_in_degrees(p_euler_deg); -} - void Spatial::set_scale(const Vector3 &p_scale) { if (data.dirty & DIRTY_VECTORS) { @@ -375,14 +369,6 @@ Vector3 Spatial::get_rotation_in_degrees() const { return get_rotation() * 180.0 / Math_PI; } -// Kept for compatibility after rename to set_rotd. -// Could be removed after a couple releases. -Vector3 Spatial::_get_rotation_deg() const { - - WARN_PRINT("Deprecated method Spatial._get_rotation_deg(): This method was renamed to get_rotation_deg. Please adapt your code accordingly, as the old method will be obsoleted."); - return get_rotation_in_degrees(); -} - Vector3 Spatial::get_scale() const { if (data.dirty & DIRTY_VECTORS) { @@ -705,10 +691,6 @@ void Spatial::_bind_methods() { ClassDB::bind_method(D_METHOD("is_set_as_toplevel"), &Spatial::is_set_as_toplevel); ClassDB::bind_method(D_METHOD("get_world"), &Spatial::get_world); - // TODO: Obsolete those two methods (old name) properly (GH-4397) - ClassDB::bind_method(D_METHOD("_set_rotation_deg", "rotation_deg"), &Spatial::_set_rotation_deg); - ClassDB::bind_method(D_METHOD("_get_rotation_deg"), &Spatial::_get_rotation_deg); - #ifdef TOOLS_ENABLED ClassDB::bind_method(D_METHOD("_update_gizmo"), &Spatial::_update_gizmo); #endif diff --git a/scene/3d/spatial.h b/scene/3d/spatial.h index b912d1f906..afac855de0 100644 --- a/scene/3d/spatial.h +++ b/scene/3d/spatial.h @@ -106,10 +106,6 @@ class Spatial : public Node { void _notify_dirty(); void _propagate_transform_changed(Spatial *p_origin); - // Deprecated, should be removed in a future version. - void _set_rotation_deg(const Vector3 &p_euler_deg); - Vector3 _get_rotation_deg() const; - void _propagate_visibility_changed(); protected: diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index 54a58159ac..1f230e95c7 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -2424,16 +2424,6 @@ float Control::get_rotation_deg() const { return Math::rad2deg(get_rotation()); } -// Kept for compatibility after rename to {s,g}et_rotation_deg. -// Could be removed after a couple releases. -void Control::_set_rotation_deg(float p_degrees) { - WARN_PRINT("Deprecated method Control._set_rotation_deg(): This method was renamed to set_rotation_deg. Please adapt your code accordingly, as the old method will be obsoleted."); - set_rotation_deg(p_degrees); -} -float Control::_get_rotation_deg() const { - WARN_PRINT("Deprecated method Control._get_rotation_deg(): This method was renamed to get_rotation_deg. Please adapt your code accordingly, as the old method will be obsoleted."); - return get_rotation_deg(); -} //needed to update the control if the font changes.. void Control::_ref_font(Ref<Font> p_sc) { @@ -2607,8 +2597,6 @@ void Control::_bind_methods() { ClassDB::bind_method(D_METHOD("set_global_position", "position"), &Control::set_global_position); ClassDB::bind_method(D_METHOD("set_rotation", "radians"), &Control::set_rotation); ClassDB::bind_method(D_METHOD("set_rotation_deg", "degrees"), &Control::set_rotation_deg); - // TODO: Obsolete this method (old name) properly (GH-4397) - ClassDB::bind_method(D_METHOD("_set_rotation_deg", "degrees"), &Control::_set_rotation_deg); ClassDB::bind_method(D_METHOD("set_scale", "scale"), &Control::set_scale); ClassDB::bind_method(D_METHOD("set_pivot_offset", "pivot_offset"), &Control::set_pivot_offset); ClassDB::bind_method(D_METHOD("get_margin", "margin"), &Control::get_margin); @@ -2618,8 +2606,6 @@ void Control::_bind_methods() { ClassDB::bind_method(D_METHOD("get_size"), &Control::get_size); ClassDB::bind_method(D_METHOD("get_rotation"), &Control::get_rotation); ClassDB::bind_method(D_METHOD("get_rotation_deg"), &Control::get_rotation_deg); - // TODO: Obsolete this method (old name) properly (GH-4397) - ClassDB::bind_method(D_METHOD("_get_rotation_deg"), &Control::_get_rotation_deg); ClassDB::bind_method(D_METHOD("get_scale"), &Control::get_scale); ClassDB::bind_method(D_METHOD("get_pivot_offset"), &Control::get_pivot_offset); ClassDB::bind_method(D_METHOD("get_custom_minimum_size"), &Control::get_custom_minimum_size); diff --git a/scene/gui/control.h b/scene/gui/control.h index 5b146b4454..8c1df6784a 100644 --- a/scene/gui/control.h +++ b/scene/gui/control.h @@ -226,10 +226,6 @@ private: void _size_changed(); String _get_tooltip() const; - // Deprecated, should be removed in a future version. - void _set_rotation_deg(float p_degrees); - float _get_rotation_deg() const; - void _ref_font(Ref<Font> p_sc); void _unref_font(Ref<Font> p_sc); void _font_changed(); diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp index ce8714e574..f626c567a9 100644 --- a/scene/main/canvas_layer.cpp +++ b/scene/main/canvas_layer.cpp @@ -115,20 +115,6 @@ real_t CanvasLayer::get_rotationd() const { return Math::rad2deg(get_rotation()); } -// Kept for compatibility after rename to {s,g}et_rotationd. -// Could be removed after a couple releases. -void CanvasLayer::_set_rotationd(real_t p_degrees) { - - WARN_PRINT("Deprecated method CanvasLayer._set_rotationd(): This method was renamed to set_rotationd. Please adapt your code accordingly, as the old method will be obsoleted."); - set_rotationd(p_degrees); -} - -real_t CanvasLayer::_get_rotationd() const { - - WARN_PRINT("Deprecated method CanvasLayer._get_rotationd(): This method was renamed to get_rotationd. Please adapt your code accordingly, as the old method will be obsoleted."); - return get_rotationd(); -} - void CanvasLayer::set_scale(const Vector2 &p_scale) { if (locrotscale_dirty) @@ -255,10 +241,6 @@ void CanvasLayer::_bind_methods() { ClassDB::bind_method(D_METHOD("set_rotationd", "degrees"), &CanvasLayer::set_rotationd); ClassDB::bind_method(D_METHOD("get_rotationd"), &CanvasLayer::get_rotationd); - // TODO: Obsolete those two methods (old name) properly (GH-4397) - ClassDB::bind_method(D_METHOD("_set_rotationd", "degrees"), &CanvasLayer::_set_rotationd); - ClassDB::bind_method(D_METHOD("_get_rotationd"), &CanvasLayer::_get_rotationd); - ClassDB::bind_method(D_METHOD("set_scale", "scale"), &CanvasLayer::set_scale); ClassDB::bind_method(D_METHOD("get_scale"), &CanvasLayer::get_scale); diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h index fbee87f487..bb7692de0f 100644 --- a/scene/main/canvas_layer.h +++ b/scene/main/canvas_layer.h @@ -54,10 +54,6 @@ class CanvasLayer : public Node { int sort_index; - // Deprecated, should be removed in a future version. - void _set_rotationd(real_t p_degrees); - real_t _get_rotationd() const; - void _update_xform(); void _update_locrotscale(); |