Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion material_maker/doc/user_interface_shortcuts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ Graph Editor
| :kbd:`Ctrl/Cmd-Shift-Z` | Redo |
+-------------------------------------------------------+----------------------------------------------------+
| :kbd:`1` :kbd:`2` :kbd:`3` :kbd:`4` :kbd:`5` | Add node from respective quick bar slot in add |
| :kbd:`6` :kbd:`7` :kbd:`8` :kbd:`9` :kbd:`0` | node popup/menu |
| :kbd:`6` :kbd:`7` :kbd:`8` :kbd:`9` :kbd:`0` | node popup/menu. 2nd row can be activated via |
| | the Ctrl or Command key.
+-------------------------------------------------------+----------------------------------------------------+

Nodes
Expand Down
3 changes: 3 additions & 0 deletions material_maker/panels/graph_edit/graph_edit.gd
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,9 @@ func quick_bar_shortcuts(event : InputEventKey) -> void:
var key_num : int = event.unicode - KEY_0 - 1
key_num = 9 if key_num == -1 else key_num

if Input.is_key_pressed(KEY_META if OS.get_name() == "macOS" else KEY_CTRL):
key_num += 12

var library_manager : Node = get_node("/root/MainWindow/NodeLibraryManager")
var quick_button_key : String = "quick_button_%d" % [key_num]

Expand Down
12 changes: 12 additions & 0 deletions material_maker/windows/add_node_popup/add_node_popup.gd
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,15 @@ func _on_list_item_activated(index: int) -> void:
if not data == null:
add_node(data.item)
todo_renamed_hide()

func _input(event : InputEvent) -> void:
if event is InputEventKey:
if event.pressed:
if event.keycode == (KEY_META if OS.get_name() == "macOS" else KEY_CTRL):
%Buttons.get_children().map(func(n : ColorRect) -> void:
var ind = int(n.name.trim_prefix("Button"))
n.visible = ind > 12 and ind <= 24)
else:
%Buttons.get_children().map(func(n : ColorRect) -> void:
var ind = int(n.name.trim_prefix("Button"))
n.visible = ind >= 1 and ind <= 12)
Loading