1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Overhaul the Curve Editor

This commit is contained in:
VolTer
2023-03-13 23:03:36 +01:00
parent c80a2b4fe9
commit a3c4a4b039
4 changed files with 889 additions and 579 deletions

View File

@@ -114,6 +114,13 @@ int Curve::add_point(Vector2 p_position, real_t p_left_tangent, real_t p_right_t
return ret;
}
// TODO: Needed to make the curve editor function properly until https://github.com/godotengine/godot/issues/76985 is fixed.
int Curve::add_point_no_update(Vector2 p_position, real_t p_left_tangent, real_t p_right_tangent, TangentMode p_left_mode, TangentMode p_right_mode) {
int ret = _add_point(p_position, p_left_tangent, p_right_tangent, p_left_mode, p_right_mode);
return ret;
}
int Curve::get_index(real_t p_offset) const {
// Lower-bound float binary search