Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customizable keyboard shortcuts for modal tools #49

Open
semagnum opened this issue Dec 11, 2023 · 1 comment
Open

Customizable keyboard shortcuts for modal tools #49

semagnum opened this issue Dec 11, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation feature request New feature or request patch Result in a x.x.1 release

Comments

@semagnum
Copy link
Owner

Due to a reverted commit in Blender's code, add-ons cannot define their own keymaps for modal operators (granted, it seems like it didn't fully work beforehand anyway). For Light Painter, the controls are all in keymap.py for those who need to edit them (and feel free to create PRs if you feel it would benefit others!). But to be more accessible for users, options are limited:

  • manually make properties for each possible tool command, including the key itself and whether each modifier key needs to be held down to use it (ie Alt, Shift, and Ctrl keys). The upside is that this is direct, and all possible key options can be generated from bpy.types.Event.bl_rna.properties["type"].enum_items. The downside is this won't be accessible in the keymap preferences, but in the Light Painter add-on preferences.
  • make "dummy" operator keymaps that don't actually work, but just used to match input to Light Painter. While it's located in keymaps, it's still not ideal.

It might be worth checking with Blender team to see if this feature is planned or someone is already working on it. If so, then it's a matter of setting up the modal keymap once the feature is merged.

@semagnum semagnum added documentation Improvements or additions to documentation feature request New feature or request research Further information on implementation is needed patch Result in a x.x.1 release labels Dec 11, 2023
@semagnum
Copy link
Owner Author

Since it could not be found in Blender's issues or tasks, I made a post on RightClickSelect: blender.community/c/rightclickselect/koWX/. If you would like this feature built into Blender (along with supporting other add-on developers who use modals), please vote here.

@semagnum semagnum removed the research Further information on implementation is needed label Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature request New feature or request patch Result in a x.x.1 release
Projects
Status: Backlog
Development

No branches or pull requests

1 participant