Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-12-14Cleanup: correct unbalanced doxygen groupsCampbell Barton
Also add groups in some files.
2021-12-08Cleanup: move public doc-strings into headers for 'windowmanager'Campbell Barton
Ref T92709
2021-11-05Cleanup (UI): Add/use type for operator context enumJulian Eisel
Adds a `wmOperatorCallContext` typedef for the existing `WM_OP_XXX` operator context enum. This adds type safety, allows the compiler to produce better warnings and helps understanding what a variable is for. Differential Revision: https://developer.blender.org/D13113 Reviewed by: Campbell Barton
2021-10-15Fix crash handling tool-keymap eventsCampbell Barton
There was a rare crash in WM_event_get_keymap_from_toolsystem_fallback when wm->winactive was NULL. This could happen when the event was handled immediately after closing a window.
2021-09-21Keymap: preference for fallback-tool with RMB selectCampbell Barton
Expose a key-map preference "Fallback Tool (RMB)", disabled by default. The right mouse button uses the fallback tool (currently visible selection tool in the toolbar), instead of always tweaking. When any selection tool is active, right mouse always tweaks. To enable fallback selection on RMB, set the "Right Mouse Select Action" to "Selection Tool". Internal changes: - Add fall-back key-maps, separate key-maps needed for when the tool is run as a fall-back. This is needed so RMB-select can support fall-back tools, so left-mouse can be used when it's the active tool and RMB can be used as a fall-back action when another tool is active. - Add options field to tools so tools without gizmos can enable the full-back tool keymap. - Support multiple key-maps for keymap handlers. - Fall-back keymaps now co-exist with the tool-keymaps. So both keymaps may be active at once - using different mouse buttons. When gizmos are in use, a highlighted gizmo prioritizes the tool-keymap over the fall-back keymap. Resolves T83690. Reviewed By: JulienKaspar Ref D12493
2021-09-17WM: expose the "any" state of KeyMapItem modifiersCampbell Barton
Change KeyMapItem.alt/ctrl/shift/oskey to integer types, where -1 is used to ignore the modifier when matching key-map items. It was only possible to set all modifiers to -1 at once from RNA using the 'any' property. Afterwards individual modifiers could be set back to true/false. Although these key-map items could not be exported/imported. Exposing the values directly avoids the need for cumbersome workarounds.
2021-09-17Cleanup: remove KM_MOD_SECOND & KM_SHIFT2, KM_CTRL2.. etcCampbell Barton
These were added in a1c8543f2acd7086d412cb794b32f96794b00659 (2007) but never used. Nor did they have any meaning in practice. Note that versioning keymap items isn't needed as these values were never set. The code-paths that set these values also set KM_MOD_FIRST causing `keymap_event_set` to only ever assign values of 0 or 1. These flags complicate further exposing KM_ANY (-1) which is also a valid value for modifiers.
2021-09-16Hide empty keymap warnings when running a templateDalai Felinto
2021-07-15Cleanup: replace BLI_assert(!"text") with BLI_assert_msg(0, "text")Campbell Barton
This shows the text as part of the assertion message.
2021-07-03Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXXCampbell Barton
Also use doxy style function reference `#` prefix chars when referencing identifiers.
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-04-16Fix T65064: Keymaps items controlling dynamic enums fail to exportCampbell Barton
Keymap UI and import/export could depend on the current context for dynamic enum's. Use STRUCT_NO_CONTEXT_WITHOUT_OWNER_ID for OperatorProperties.
2021-03-14Cleanup: use explicit check for WM_KEYMAP_UPDATE_RECONFIGURECampbell Barton
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.
2021-03-14WM: support loading keymaps in background modeCampbell Barton
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.
2021-02-14Cleanup: spellingCampbell Barton
2021-02-04Cleanup: pass keymap items as const where possibleCampbell Barton
2021-01-04Cleanup: redundant code, minor inconsistenciesCampbell Barton
- 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.
2020-12-04Cleanup: Use LISTBASE_FOREACH macro in windowmanager internHans Goudey
Also decrease the scope of variables related to the loops.
2020-10-19Spelling: Loose Versus LoseHarley Acheson
Corrects incorrect usages of the word 'loose' when 'lose' was required. Differential Revision: https://developer.blender.org/D9243 Reviewed by Campbell Barton
2020-10-18Cleanup: More miscellaneous code quality changes in wm directoryHans Goudey
- Declare variables where initialized. - Use LISTBASE_FOREACH macro. - Reduce variable scope. - Return early or reduce indentation in some cases.
2020-09-19Cleanup: use parenthesis for if statements in macrosCampbell Barton
2020-09-04Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fixSebastian Parborg
No functional changes
2020-08-07Cleanup: Blenlib, Clang-Tidy else-after-return fixes (incomplete)Sybren A. Stüvel
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.
2020-08-01Cleanup: use term init instead of initialize/initialiseCampbell Barton
The abbreviation 'init' is brief, unambiguous and already used in thousands of places, also initialize is often accidentally written with British spelling.
2020-05-31Remove leftover debugging codeGermano Cavalcante
2020-05-30Cleanup: Initialize gizmo snap keymap before usingGermano Cavalcante
2020-05-27Cleanup: pass const wm for WM_keymap_activeCampbell Barton
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
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
2020-04-03Cleanup: Rename ScrArea variables from sa to areaJulian Eisel
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.
2020-03-27Cleanup: rename WM_modalkeymap API names, matching WM_keymapCampbell Barton
Rename: - WM_modalkeymap_add to WM_modalkeymap_ensure - WM_modalkeymap_get to WM_modalkeymap_find
2020-03-26Keymap: disallow modal key-maps in add-ons keyconfigCampbell Barton
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.
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Cleanup: Resolve HKEY conflictRay Molenkamp
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
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
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.
2020-03-06Cleanup: Reduce context usage in UI functionsJulian Eisel
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.
2020-03-06GHOST/Keymap: support for detecting repeat eventsCampbell Barton
- 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.
2020-02-04Merge branch 'blender-v2.82-release'Philipp Oeser
2020-02-04Fix T67084: Modal keymaps could show the wrong shortcutPhilipp Oeser
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
2020-02-01UI: Shortcut String ChangesHarley Acheson
Improvements to keyboard shortcuts shown in menus, mostly for Macs. Differential Revision: https://developer.blender.org/D6730 Reviewed by Brecht Van Lommel
2020-01-30Cleanup: remove WM_keymap_verify_itemCampbell Barton
This wasn't used and isn't useful since it only checked if an operator was included in the keymap - ignoring it's properties.
2019-08-01Cleanup: misc spelling fixesCampbell Barton
T68035 by @luzpaz
2019-05-29Cleanup: correct private function namingCampbell Barton
Use term 'glyph' instead of 'icon' since we already have event icons.
2019-05-16Refactor: Simplify ID Property freeingJacques Lucke
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
2019-05-15Fix T64604: Changing keymap doesn't tag preferences as dirtyCampbell Barton
2019-05-13I18n Disambiguation: "Shift".Bastien Montagne
Give WM context to the shortcut, since this is more specific meaning than usual 'shifting' one... Part of T43295.
2019-05-02Cleanup: use WM_keymap_item_* prefixCampbell Barton
2019-05-02Cleanup: use doxy sections in wm_keymap.cCampbell Barton
2019-05-02BLF: pass code-point to BLF_has_glyphCampbell Barton
Avoid BLF having to be concerned with decoding the string (which can fail). Also remove redundant extra zero byte from strings.
2019-05-01UI: use Mac key symbols in menus on macOS, instead of text like "Cmd"Harley Acheson
On Windows "Cmd" is also replaced with "Win". Differential Revision: https://developer.blender.org/D4689
2019-04-20Cleanup: comment line length (windowmanager)Campbell Barton