From 255c40ff605b1959589b069fc374b68e8a421775 Mon Sep 17 00:00:00 2001 From: LMW Date: Fri, 3 Apr 2026 22:28:50 +0800 Subject: [PATCH] Avoid conflicting connection knife with portal pair creation --- addons/gut/gui/EditorRadioButton.tres | 2 +- material_maker/doc/user_interface_shortcuts.rst | 6 ++++-- material_maker/panels/graph_edit/graph_edit.gd | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/addons/gut/gui/EditorRadioButton.tres b/addons/gut/gui/EditorRadioButton.tres index ea2dae209..fa040281b 100644 --- a/addons/gut/gui/EditorRadioButton.tres +++ b/addons/gut/gui/EditorRadioButton.tres @@ -1,4 +1,4 @@ -[gd_resource type="Theme" load_steps=3 format=3 uid="uid://dssgvu257o1si"] +[gd_resource type="Theme" format=3 uid="uid://dssgvu257o1si"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u716c"] bg_color = Color(0.43137255, 0.8784314, 0.6156863, 0.5254902) diff --git a/material_maker/doc/user_interface_shortcuts.rst b/material_maker/doc/user_interface_shortcuts.rst index b0ea0d3ec..4e84d6940 100644 --- a/material_maker/doc/user_interface_shortcuts.rst +++ b/material_maker/doc/user_interface_shortcuts.rst @@ -66,14 +66,16 @@ Graph Editor +-------------------------------------------------------+----------------------------------------------------+ | :kbd:`Ctrl-RMB` | Connection knife tool | +-------------------------------------------------------+----------------------------------------------------+ +| :kbd:`Ctrl/Cmd-Shift-RMB` | Insert aperture pair on connection line | ++-------------------------------------------------------+----------------------------------------------------+ +| :kbd:`Shift-RMB` | Insert reroute on connection line | ++-------------------------------------------------------+----------------------------------------------------+ | :kbd:`X` | :kbd:`Del` | :kbd:`Backspace` | Delete selected nodes | +-------------------------------------------------------+----------------------------------------------------+ | :kbd:`Ctrl/Cmd-D` | Duplicate selected nodes | +-------------------------------------------------------+----------------------------------------------------+ | :kbd:`Ctrl/Cmd-Shift-D` | Duplicate selected nodes with inuputs | +-------------------------------------------------------+----------------------------------------------------+ -| :kbd:`Shift-RMB` | Insert reroute on connection line | -+-------------------------------------------------------+----------------------------------------------------+ | :kbd:`F2` | :kbd:`Enter` | :kbd:`LMB` Double-click | Edit selected aperture node | +-------------------------------------------------------+----------------------------------------------------+ | :kbd:`Ctrl/Cmd-G` | Create group from selected nodes | diff --git a/material_maker/panels/graph_edit/graph_edit.gd b/material_maker/panels/graph_edit/graph_edit.gd index 4ee270890..84f22f4a5 100644 --- a/material_maker/panels/graph_edit/graph_edit.gd +++ b/material_maker/panels/graph_edit/graph_edit.gd @@ -225,10 +225,10 @@ func _gui_input(event) -> void: do_zoom(1.0/1.1) elif event.button_index == MOUSE_BUTTON_RIGHT and event.is_pressed(): valid_drag_cut_entry = true - if event.shift_pressed: - add_reroute_under_mouse() - elif event.ctrl_pressed: + if event.is_command_or_control_pressed() and event.shift_pressed: create_portals() + elif event.shift_pressed: + add_reroute_under_mouse() for c in get_children(): if ! c is GraphNode: