WIP: Keymap Click-Drag Direction #105488

Closed
Lukas Sneyd wants to merge 3 commits from lcas:keymap-click-drag-direction into blender-v3.5-release

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
First-time contributor

For 3.5. Will make one for main later.

Keymap click-drag direction has some issues, mostly has to do with having more directions than people want or need. From what I've seen people just want to drag left and right, not northeast etc. This means a lot of extra setup in the keymap and dedicating north and south click-drags to always be assigned as either east or west. Not ideal. Also, if user does not assign all 8 directions, any drags that veer into those unassigned directions will result in an unintentional tweak event.

So to deal with that, this offers 2 additional click-drag flavors (Left vs Right and Up vs Down) without affecting the current 8-way one. You go into Userpref->Input->Click-Drag Direction, and choose a style. The keymap will change for anything that is set to click-drag. Instead of a direction dropdown / popover, you get 3 operators that will set the direction. Then just drag left and right, or up and down if you'd rather, and you get an expected result that is relatively easy to setup.

I tried making 2 more enums for each of these new direction options. Idea was to have a direct replacement, an enum that shows up as a dropdown / popover in the keymap like the current direction does. I do not know of a way to dynamically reduce the options in the current direction enum, so I tried to make 2 redundant but shorter versions with just 'Any' 'East' and 'West' and 'Any' 'North' and 'South'. They worked, but they wouldn't set in the keymap without creating a new keymap item first.

So I detoured around that problem by making some operators show up in the keymap in place of the direction enum. These operators set the direction to whatever their name is. They light up to show you which one is selected. There is the possibility of non-applicable directions being assigned in the keymap. They wouldn't be detected anymore depending on mode. For example, you have something set to 'North' but the click-drag direction is in 'Left Right'. In this case I put a warning to let you know that there is "no direction". Not much good unless the user is looking for every possible occurrence of this, though. That's probably the big issue preventing this from being completely finished.

I personally don't intend to use directional click-drag, but it was interesting and easy enough for me to figure out the functionality part. The keymap part was not so easy for me, but finally close enough with that. Want to change names, things like that? Go for it.

Thanks for your time.

For 3.5. Will make one for main later. Keymap click-drag direction has some issues, mostly has to do with having more directions than people want or need. From what I've seen people just want to drag left and right, not northeast etc. This means a lot of extra setup in the keymap and dedicating north and south click-drags to always be assigned as either east or west. Not ideal. Also, if user does not assign all 8 directions, any drags that veer into those unassigned directions will result in an unintentional tweak event. So to deal with that, this offers 2 additional click-drag flavors (Left vs Right and Up vs Down) without affecting the current 8-way one. You go into Userpref->Input->Click-Drag Direction, and choose a style. The keymap will change for anything that is set to click-drag. Instead of a direction dropdown / popover, you get 3 operators that will set the direction. Then just drag left and right, or up and down if you'd rather, and you get an expected result that is relatively easy to setup. I tried making 2 more enums for each of these new direction options. Idea was to have a direct replacement, an enum that shows up as a dropdown / popover in the keymap like the current direction does. I do not know of a way to dynamically reduce the options in the current direction enum, so I tried to make 2 redundant but shorter versions with just 'Any' 'East' and 'West' and 'Any' 'North' and 'South'. They worked, but they wouldn't set in the keymap without creating a new keymap item first. So I detoured around that problem by making some operators show up in the keymap in place of the direction enum. These operators set the direction to whatever their name is. They light up to show you which one is selected. There is the possibility of non-applicable directions being assigned in the keymap. They wouldn't be detected anymore depending on mode. For example, you have something set to 'North' but the click-drag direction is in 'Left Right'. In this case I put a warning to let you know that there is "no direction". Not much good unless the user is looking for every possible occurrence of this, though. That's probably the big issue preventing this from being completely finished. I personally don't intend to use directional click-drag, but it was interesting and easy enough for me to figure out the functionality part. The keymap part was not so easy for me, but finally close enough with that. Want to change names, things like that? Go for it. Thanks for your time.
Lukas Sneyd added 1 commit 2023-03-06 13:41:43 +01:00
6fae66b7b0 Blender 3.5
Keymap click-drag direction has some issues, mostly has to do with more directions than people want or need. This gives 2 additional flavors (left v right and up v down) without affecting the current 8-way one. I tried making 2 more enums for direction, for the purpose of reducing the available options, but it wouldn't set in the keymap without creating a new keymap item first. So I detoured around that by making some operators show up in the keymap in place of the direction enum.

There is the possibility of a user having non-applicable directions assigned to in their keymap> In this case I put a warning to let them know that there is "no direction". Not much good unless they are going to go looking at every possible occurrence of this, though.
Lukas Sneyd added 1 commit 2023-03-06 14:57:11 +01:00
Lukas Sneyd added 1 commit 2023-03-15 13:00:30 +01:00
Lukas Sneyd closed this pull request 2023-07-05 10:15:56 +02:00
Author
First-time contributor

Can now be found here:
#109726

Can now be found here: #109726

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105488
No description provided.