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

Rename range_lerp to remap #65361

Merged
merged 1 commit into from Sep 6, 2022
Merged

Conversation

Mickeon
Copy link
Contributor

@Mickeon Mickeon commented Sep 5, 2022

Closes godotengine/godot-proposals#5335 (?).

This PR was renaming it to lerp_range
Should the favour go to remap() this PR can easily be changed to match (or closed outright if rejected).

@Mickeon
Copy link
Contributor Author

Mickeon commented Sep 5, 2022

I don't understand the Linux Error anymore:

WARNING: Property not found: dotnet/project/assembly_name
     at: _get (core/config/project_settings.cpp:3[24](https://github.com/godotengine/godot/runs/8189890271?check_suite_focus=true#step:13:25))
Starting checking if project conversion can be done.
ERROR: Missing gdscript function in pair (range_lerp - ===> lerp_range <===)
   at: test_array_names (editor/project_converter_3_to_4.cpp:[26](https://github.com/godotengine/godot/runs/8189890271?check_suite_focus=true#step:13:27)32)
ERROR: Found function which is used in converter, but cannot be found in Godot 4. Rename this element to new name or remove entire rule about it if is obsolete.
   at: test_array_names (editor/project_converter_3_to_4.cpp:2639)
ERROR: Cannot start converting due to problems with data in arrays.
   at: validate_conversion (editor/project_converter_3_to_4.cpp:2051)

It's no property, it's a global scope function...! And it does exist in this PR!

@kleonc
Copy link
Member

kleonc commented Sep 5, 2022

I don't understand the Linux Error anymore:

WARNING: Property not found: dotnet/project/assembly_name
     at: _get (core/config/project_settings.cpp:3[24](https://github.com/godotengine/godot/runs/8189890271?check_suite_focus=true#step:13:25))
Starting checking if project conversion can be done.
ERROR: Missing gdscript function in pair (range_lerp - ===> lerp_range <===)
   at: test_array_names (editor/project_converter_3_to_4.cpp:[26](https://github.com/godotengine/godot/runs/8189890271?check_suite_focus=true#step:13:27)32)
ERROR: Found function which is used in converter, but cannot be found in Godot 4. Rename this element to new name or remove entire rule about it if is obsolete.
   at: test_array_names (editor/project_converter_3_to_4.cpp:2639)
ERROR: Cannot start converting due to problems with data in arrays.
   at: validate_conversion (editor/project_converter_3_to_4.cpp:2051)

It's no property, it's a global scope function...! And it does exist in this PR!

The errors point directly to the code you should inspect. 😉
Seems like the new global namespace functions need to be listed here:

// List of excluded functions from builtin types and global namespace, because currently it is not possible to get list of functions from them
// This will be available when https://github.com/godotengine/godot/pull/49053 or similar will be included into Godot
static const char *builtin_types_excluded_functions[] = { "dict_to_inst", "inst_to_dict", "bytes_to_var", "bytes_to_var_with_objects", "db_to_linear", "deg_to_rad", "linear_to_db", "rad_to_deg", "randf_range", "snapped", "str_to_var", "var_to_str", "var_to_bytes", "var_to_bytes_with_objects", "move_toward", "uri_encode", "uri_decode", "remove_at", "get_rotation_quaternion", "clamp", "grow_side", "is_absolute_path", "is_valid_int", "lerp", "to_ascii_buffer", "to_utf8_buffer", "to_utf32_buffer", "snapped", nullptr };

(so to get rid of the errors you'd need to add lerp_range to that array).

@Mickeon
Copy link
Contributor Author

Mickeon commented Sep 5, 2022

Thank you!

@Mickeon Mickeon force-pushed the rename-range-lerp branch 3 times, most recently from 424baa3 to 876c58d Compare September 5, 2022 20:21
@Mickeon Mickeon changed the title Rename range_lerp to lerp_range Rename range_lerp to remap Sep 5, 2022
Copy link
Member

@kleonc kleonc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've left LerpRange in C#.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved in PR review meeting.

@akien-mga akien-mga merged commit f407553 into godotengine:master Sep 6, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Approved
Development

Successfully merging this pull request may close these issues.

Rename range_lerp to remap
5 participants