Age | Commit message (Collapse) | Author |
|
Keymap UI and import/export could depend on the current
context for dynamic enum's.
Use STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID for OperatorProperties.
|
|
A block of code ran when `wm_keymap_update_flag` was non-zero,
replace this with explicit flag check since it wasn't
immediately obvious which flag needed to be set.
|
|
While this still isn't done by default on startup,
activating a key-config will load it as expected.
Needed to perform key-map loading tests in background mode.
|
|
|
|
|
|
- Remove ternary operators when both values are the same.
- Remove break after return.
- Remove redundant NULL checks for code which handles
those cases immediately beforehand.
|
|
Also decrease the scope of variables related to the loops.
|
|
Corrects incorrect usages of the word 'loose' when 'lose' was required.
Differential Revision: https://developer.blender.org/D9243
Reviewed by Campbell Barton
|
|
- Declare variables where initialized.
- Use LISTBASE_FOREACH macro.
- Reduce variable scope.
- Return early or reduce indentation in some cases.
|
|
|
|
No functional changes
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenlib` module. Not all warnings are
addressed in this commit.
No functional changes.
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
|
|
|
|
|
|
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
|
|
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
|
|
Rename:
- WM_modalkeymap_add to WM_modalkeymap_ensure
- WM_modalkeymap_get to WM_modalkeymap_find
|
|
Disable functionality reported in T60766 & only partially worked.
This could be used if the key-map was added after Blender started
as a way to customize modal key-maps, however it didn't work with
the add-on enabled on startup.
Add-on key-maps are intended to extend existing key-maps
so they can call the add-on, not as a way to change modal key-maps
for Blender's built-in functionality.
Disable this since it's not needed as add-ons
can't yet define modal key-maps.
|
|
|
|
Both the MS headers and blender headers define the HKEY
which gives all kind of inclusion order issues.
This diff renames all *KEY constants to EVT_*KEY to resolve
this conflict.
Reviewed By: brecht , dfelinto
Differential Revision: http://developer.blender.org/D7164
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Part of https://developer.blender.org/T74429.
There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
|
|
- Keymap items now have 'repeat' boolean which can be set
to make keymap items respond to key repeat events or not.
- Support for X11 & WIN32 (not macOS currently).
This allows for the possibility to perform actions while a key is held
and finish the action upon release.
Thanks to @Severin for review and WIN32 support.
|
|
|
|
WM_modalkeymap_operator_items_to_string() wasnt checking
WM_keymap_active(), so it was possible that e.g. when using the Industry
Compatible keymap, the shortcut from the Blender keymap was shown.
This also fixes the (now exposed) bug that the Industry Compatible keymap
would not have a ADD_CUT_CLOSED kmi defined for the Knife Tool [mandatory
for the status bar].
Maniphest Tasks: T67084
Differential Revision: https://developer.blender.org/D6748
|
|
Improvements to keyboard shortcuts shown in menus, mostly for Macs.
Differential Revision: https://developer.blender.org/D6730
Reviewed by Brecht Van Lommel
|
|
This wasn't used and isn't useful since it only checked
if an operator was included in the keymap - ignoring it's properties.
|
|
T68035 by @luzpaz
|
|
Use term 'glyph' instead of 'icon' since we already have event icons.
|
|
This also makes `IDP_CopyProperty` the "opposite"
of `IDP_FreeProperty`, which is what I'd expect.
Two refactoring steps:
* rename IDP_FreeProperty to IDP_FreePropertyContent
* new IDP_FreeProperty function that actually frees the property
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4872
|
|
|
|
Give WM context to the shortcut, since this is more specific meaning
than usual 'shifting' one...
Part of T43295.
|
|
|
|
|
|
Avoid BLF having to be concerned with decoding the string
(which can fail).
Also remove redundant extra zero byte from strings.
|
|
On Windows "Cmd" is also replaced with "Win".
Differential Revision: https://developer.blender.org/D4689
|
|
|
|
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
|
|
|
|
|
|
Add getter callback support for 'WM_HANDLER_TYPE_KEYMAP' type handlers
this is needed for key-maps which change based on the active tool.
Replaces 'sneaky_handler' hack which temporarily inserted a handler.
|
|
|
|
Illuminate dead code, using wmEventHandler_KeymapFn from gizmo handler
type where it was never set.
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
Needed for clan-format not to wrap onto one line.
|
|
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
|
|
|