Added option to 2D and 3D curve editor to mirror curve tangent handles both in angle and/or length

This commit is contained in:
Ben Hickling 2018-05-01 11:13:29 +01:00
parent 0f930f8314
commit 31b6776f11
4 changed files with 148 additions and 3 deletions

View file

@ -69,6 +69,15 @@ class Path2DEditor : public HBoxContainer {
ToolButton *curve_edit_curve;
ToolButton *curve_del;
ToolButton *curve_close;
MenuButton *handle_menu;
bool mirror_handle_angle;
bool mirror_handle_length;
enum HandleOption {
HANDLE_OPTION_ANGLE,
HANDLE_OPTION_LENGTH
};
enum Action {
@ -82,8 +91,11 @@ class Path2DEditor : public HBoxContainer {
int action_point;
Point2 moving_from;
Point2 moving_screen_from;
float orig_in_length;
float orig_out_length;
void _mode_selected(int p_mode);
void _handle_option_pressed(int p_option);
void _node_visibility_changed();
friend class Path2DEditorPlugin;