Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark InterpolatedCamera as deprecated #42113

Merged
merged 1 commit into from
Sep 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/classes/InterpolatedCamera.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="InterpolatedCamera" inherits="Camera" version="3.2">
<brief_description>
Camera which moves toward another node.
[i]Deprecated.[/i] Camera which moves toward another node.
</brief_description>
<description>
InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
[i]Deprecated (will be removed in Godot 4.0).[/i] InterpolatedCamera is a [Camera] which smoothly moves to match a target node's position and rotation.
If it is not [member enabled] or does not have a valid target set, InterpolatedCamera acts like a normal Camera.
</description>
<tutorials>
Expand Down
7 changes: 7 additions & 0 deletions scene/3d/interpolated_camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ void InterpolatedCamera::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {

WARN_DEPRECATED_MSG("InterpolatedCamera has been deprecated and will be removed in Godot 4.0.");

if (Engine::get_singleton()->is_editor_hint() && enabled)
set_process_internal(false);

Expand Down Expand Up @@ -131,6 +133,11 @@ real_t InterpolatedCamera::get_speed() const {
return speed;
}

String InterpolatedCamera::get_configuration_warning() const {

return TTR("InterpolatedCamera has been deprecated and will be removed in Godot 4.0.");
}

void InterpolatedCamera::_bind_methods() {

ClassDB::bind_method(D_METHOD("set_target_path", "target_path"), &InterpolatedCamera::set_target_path);
Expand Down
2 changes: 2 additions & 0 deletions scene/3d/interpolated_camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class InterpolatedCamera : public Camera {
void set_interpolation_enabled(bool p_enable);
bool is_interpolation_enabled() const;

String get_configuration_warning() const;

InterpolatedCamera();
};

Expand Down