Commit Graph

20 Commits

Author SHA1 Message Date
665d987e7b Keymap: use tap/drag for mode switching w/ pref enabled 2019-02-28 01:04:32 +11:00
b42333fba6 Keymap: preference for alternate tap action for some pie menus
This allows secondary keys on tap.
Currently Z-key to toggle wireframe and tilde for navigation.

This is currently experimental, if users like this the preference
can be kept and used where appropriate.
2019-02-14 09:44:13 +11:00
63fcbfc3a7 RNA: naming, user-preferences -> preferences 2018-12-21 12:55:02 +11:00
75b739c969 Keymap: only use MMB workaround whe MMB is enabled
Using double-click with selection breaks selection cycling behavior
(making you have to wait to click again to cycle-select the next item).
2018-12-06 10:05:53 +11:00
edbf15d3c0 Defaults: left click select is now the default.
A few reasons motivating this change:
* It works well for all devices: mouse, trackpad, and tablet pens.
* For beginners or users coming from other software, it's easier to get
  started and avoids an initial stumbling block.
* Many users in 2.7 (about half?) were already using left click select, so
  combined with the above advantages it makes for a practical default.

Note that we continue to support right click select, as many experienced
Blender users (and developers) see efficiency advantages in this approach.

The option to switch is in the first time setup splash screen, and in the
user preferences.
2018-11-28 11:36:13 +01:00
3f33b4573d Keymap: Change default spacebar action to play
This has been a contentious topic: Artists at the Blender-Studio prefer
this behavior, while the user community overwhelmingly prefers 2.7x
operator search. Previously this defaulted to accessing tools
(eg: Space-T activates transform.. Space-R rotate etc) which I still
believe is a better long term default - otherwise we don't have
efficient tool switching for a system we intend to make more use of,
nevertheless as far as I can tell users haven't been keen on adopting
this so far. Show the preference on the setup screen since many users
don't animate and will may want to quickly search or switch tools.
2018-11-28 08:00:04 +11:00
1752d9f3f9 Keymap: add preference for spacebar to run operator search 2018-11-27 13:14:09 +11:00
18103c9ec2 UI: expand tooltips for left/right click select. 2018-11-26 13:29:12 +01:00
31e3b7790a Keymap: preference for extended shading menu
This brings back the option to have x-ray & overlay toggle.
2018-11-24 11:24:34 +11:00
d52c41b040 Keymap: 3D view pref for tab to show pie menu
This behaves like the 2.7x pie menu add-on,
for users who prefer single-key access to all modes.
2018-11-22 08:14:20 +11:00
f8c16b0175 Cleanup: move bpy_extras.keyconfig_utils to own module
bpy_extras were meant to be useful high-level helper functions for
script authors to perform common operations,
to avoid writing to verbose API's.

bpy_extras.keymap_utils contains some specialized API calls
mainly intended for Blender's own internal use.

Move keymap import export to internal API.
2018-11-20 11:06:01 +11:00
5f9de429ac UI: show keyconfig prefs directly under preset
The keyconfig preset and it's preferences were too far apart,
show the preferences under the preset in a collapsible box.
2018-11-20 09:15:53 +11:00
9f4e4d672c Cleanup: naming 2018-11-19 07:06:38 +11:00
3b48620098 Cleanup: naming 2018-11-19 07:04:24 +11:00
074cd53c19 Keymap: move left click select to a preference 2018-11-19 06:27:17 +11:00
0cac506f6e Keymap: preference to swap space/shift-space keys
This option is for animators who may not use the tool-system much
(mostly staying in object/pose-mode with the transform-tool active).
2018-11-18 13:43:44 +11:00
c57951d903 Keymap: add user-prefs to the default keyconfig
Currently the only option is to use select-all as a toggle.
2018-11-18 12:45:14 +11:00
cb79b691cd Cleanup: set variable for preference name 2018-11-16 15:00:27 +11:00
088be7eb2f Keymaps: replace select / action mouse system
For Blender builtin configurations the option to choose the select mouse remains
and is now also in the splash screen. It works by changing the keymap dynamically
in the script, rather than using special events.

The system of automatic switching of events was not flexible enough to deal with
side effects that require further keymap changes, so it is now under more manual
control in the script.

This breaks compatibility for some scripts and exported key configurations.
These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and
EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and
EVT_TWEAK_R events.

Other than that, there should be no functional changes.
2018-11-16 08:31:00 +11:00
3064da1200 Keymap: move builtin keymaps from C to Python
This should be purely an implementation change,
for end users there should be no functional difference.

The entire key configuration is in one file with ~5000 lines of code.
Mostly avoiding code duplication and preserve comments and utility
functions from the C code.
It's a bit long but for searching and editing it's also convenient to
have it all in one file.

Notes:

- Actual keymap is shared by blender / blender_legacy
  and stored in `keymap_data/blender_default.py`

  This only generates JSON-like data to be passed into
  `keyconfig_import_from_data`, allowing other presets to load and
  manipulate the default keymap.

- Each preset defines 'keyconfig_data'
  which can be shared between presets.

- Some of the utility functions for generating keymap items still
  need to be ported over to Python.

- Some keymap items can be made into loops (marked as TODO).

See: D3907
2018-11-09 11:33:06 +11:00