@@ -165,7 +165,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
165165 }
166166 }
167167
168- if (mb.is_valid () && mb->is_pressed () && tool_select->is_pressed () && mb->get_button_index () == MouseButton::LEFT) {
168+ if (mb.is_valid () && mb->is_pressed () && tool_select->is_pressed () && !mb-> is_shift_pressed () && !mb-> is_command_or_control_pressed () && mb->get_button_index () == MouseButton::LEFT) {
169169 blend_space_draw->queue_redraw (); // update anyway
170170 // try to see if a point can be selected
171171 selected_point = -1 ;
@@ -269,7 +269,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
269269 blend_space_draw->queue_redraw ();
270270 }
271271
272- if (mb.is_valid () && mb->is_pressed () && tool_blend->is_pressed () && mb->get_button_index () == MouseButton::LEFT) {
272+ if (mb.is_valid () && mb->is_pressed () && !dragging_selected_attempt && ((tool_select-> is_pressed () && mb-> is_shift_pressed ()) || tool_blend->is_pressed () ) && mb->get_button_index () == MouseButton::LEFT) {
273273 Vector2 blend_pos = (mb->get_position () / blend_space_draw->get_size ());
274274 blend_pos.y = 1.0 - blend_pos.y ;
275275 blend_pos *= (blend_space->get_max_space () - blend_space->get_min_space ());
@@ -300,7 +300,7 @@ void AnimationNodeBlendSpace2DEditor::_blend_space_gui_input(const Ref<InputEven
300300 blend_space_draw->queue_redraw ();
301301 }
302302
303- if (mm.is_valid () && tool_blend->is_pressed () && (mm->get_button_mask ().has_flag (MouseButtonMask::LEFT))) {
303+ if (mm.is_valid () && !dragging_selected_attempt && ((tool_select-> is_pressed () && mm-> is_shift_pressed ()) || tool_blend->is_pressed () ) && (mm->get_button_mask ().has_flag (MouseButtonMask::LEFT))) {
304304 Vector2 blend_pos = (mm->get_position () / blend_space_draw->get_size ());
305305 blend_pos.y = 1.0 - blend_pos.y ;
306306 blend_pos *= (blend_space->get_max_space () - blend_space->get_min_space ());
@@ -871,21 +871,13 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
871871 Ref<ButtonGroup> bg;
872872 bg.instantiate ();
873873
874- tool_blend = memnew (Button);
875- tool_blend->set_theme_type_variation (SceneStringName (FlatButton));
876- tool_blend->set_toggle_mode (true );
877- tool_blend->set_button_group (bg);
878- top_hb->add_child (tool_blend);
879- tool_blend->set_pressed (true );
880- tool_blend->set_tooltip_text (TTR (" Set the blending position within the space" ));
881- tool_blend->connect (SceneStringName (pressed), callable_mp (this , &AnimationNodeBlendSpace2DEditor::_tool_switch).bind (3 ));
882-
883874 tool_select = memnew (Button);
884875 tool_select->set_theme_type_variation (SceneStringName (FlatButton));
885876 tool_select->set_toggle_mode (true );
886877 tool_select->set_button_group (bg);
887878 top_hb->add_child (tool_select);
888- tool_select->set_tooltip_text (TTR (" Select and move points, create points with RMB." ));
879+ tool_select->set_pressed (true );
880+ tool_select->set_tooltip_text (TTR (" Select and move points.\n RMB: Create point at position clicked.\n Shift+LMB+Drag: Set the blending position within the space." ));
889881 tool_select->connect (SceneStringName (pressed), callable_mp (this , &AnimationNodeBlendSpace2DEditor::_tool_switch).bind (0 ));
890882
891883 tool_create = memnew (Button);
@@ -896,13 +888,21 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
896888 tool_create->set_tooltip_text (TTR (" Create points." ));
897889 tool_create->connect (SceneStringName (pressed), callable_mp (this , &AnimationNodeBlendSpace2DEditor::_tool_switch).bind (1 ));
898890
891+ tool_blend = memnew (Button);
892+ tool_blend->set_theme_type_variation (SceneStringName (FlatButton));
893+ tool_blend->set_toggle_mode (true );
894+ tool_blend->set_button_group (bg);
895+ top_hb->add_child (tool_blend);
896+ tool_blend->set_tooltip_text (TTR (" Set the blending position within the space." ));
897+ tool_blend->connect (SceneStringName (pressed), callable_mp (this , &AnimationNodeBlendSpace2DEditor::_tool_switch).bind (2 ));
898+
899899 tool_triangle = memnew (Button);
900900 tool_triangle->set_theme_type_variation (SceneStringName (FlatButton));
901901 tool_triangle->set_toggle_mode (true );
902902 tool_triangle->set_button_group (bg);
903903 top_hb->add_child (tool_triangle);
904904 tool_triangle->set_tooltip_text (TTR (" Create triangles by connecting points." ));
905- tool_triangle->connect (SceneStringName (pressed), callable_mp (this , &AnimationNodeBlendSpace2DEditor::_tool_switch).bind (2 ));
905+ tool_triangle->connect (SceneStringName (pressed), callable_mp (this , &AnimationNodeBlendSpace2DEditor::_tool_switch).bind (3 ));
906906
907907 tool_erase_sep = memnew (VSeparator);
908908 top_hb->add_child (tool_erase_sep);
0 commit comments