Commit: e0f3c23ac0c85cb01e34707601464f31e2a81992
Author: Campbell Barton
Date: Wed Jun 1 22:34:47 2022 +1000
Branches: blender-v3.2-release
https://developer.blender.org/rBe0f3c23ac0c85cb01e34707601464f31e2a81992
Fix T98370: Shift+RMB Select nodes doesn't work with the tweak tool
The tweak tool was toggling node selection twice, as the selection
key-map is already accounted for in the node key-map there is no need
to duplicate the actions in the tweak tool.
===================================================================
M release/scripts/presets/keyconfig/keymap_data/blender_default.py
M source/blender/windowmanager/intern/wm_keymap.c
===================================================================
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 2c93c881b07..f2eba9108ba 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -6551,7 +6551,10 @@ def km_node_editor_tool_select(params, *, fallback):
_fallback_id("Node Tool: Tweak", fallback),
{"space_type": 'NODE_EDITOR', "region_type": 'WINDOW'},
{"items": [
- *([] if (fallback and (params.select_mouse == 'RIGHTMOUSE')) else
+ # The node key-map already selects, leave this empty.
+ # NOTE: intentionally don't check `fallback` here (unlike other
tweak tool checks).
+ # as this should only be used on LMB select which would otherwise
activate on click, not press.
+ *([] if (params.select_mouse == 'RIGHTMOUSE') else
_template_node_select(type=params.select_mouse, value='PRESS',
select_passthrough=True)),
]},
)
diff --git a/source/blender/windowmanager/intern/wm_keymap.c
b/source/blender/windowmanager/intern/wm_keymap.c
index 1fa5e64093f..acacbd77f9e 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -445,7 +445,10 @@ bool WM_keymap_poll(bContext *C, wmKeyMap *keymap)
* When developing a customized Blender though you may want empty keymaps.
*/
if (!U.app_template[0] &&
/* Fallback key-maps may be intentionally empty, don't flood the
output. */
- !BLI_str_endswith(keymap->idname, " (fallback)")) {
+ !BLI_str_endswith(keymap->idname, " (fallback)") &&
+ /* This is an exception which may be empty.
+ * Longer term we might want a flag to indicate an empty key-map is
intended. */
+ !STREQ(keymap->idname, "Node Tool: Tweak")) {
CLOG_WARN(WM_LOG_KEYMAPS, "empty keymap '%s'", keymap->idname);
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs