Age | Commit message (Collapse) | Author |
|
Replace 5 arguments with a single struct as the same arguments
are used in many places.
This didn't read well and was confusing with both arguments named
`val` & `value` in the case of WM_modalkeymap_add_item.
|
|
Supporting two kinds of dragging is redundant, remove tweak events as
they only supported 3 mouse buttons and added complexity from using the
'value' to store directions.
Support only click-drag events (KM_CLICK_DRAG) which can be used with
any keyboard or mouse button.
Details:
- A "direction" member has been added to keymap items and events which
can be used when the event value is set to KM_CLICK_DRAG.
- Keymap items are version patched.
- Loading older key-maps are also updated.
- Currently the key-maps stored in ./release/scripts/presets/keyconfig/
still reference tweak events & need updating. For now they are updated
on load.
Note that in general this wont impact add-ons as modal operators don't
receive tweak events.
Reviewed By: brecht
Ref D14214
|
|
|
|
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
|
|
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
|
|
Ref T92709
|
|
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
|
|
|
|
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.
This patch has been generated by P1561 followed by `make format`.
Differential Revision: https://developer.blender.org/D8466
|
|
|
|
Rename:
- WM_modalkeymap_add to WM_modalkeymap_ensure
- WM_modalkeymap_get to WM_modalkeymap_find
|
|
|
|
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.
|
|
This wasn't used and isn't useful since it only checked
if an operator was included in the keymap - ignoring it's properties.
|
|
Check the current events modifiers against the gizmo keymap,
only highlighting when keymap items match.
Needed to resolve T63996
|
|
|
|
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
|
|
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.
|
|
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.
|
|
|
|
Now its possibly to ask for only keyboard/mouse/ndof events
when finding key map items.
|
|
Not sharing caused duplication in the keymap and
required a factory class generator.
Simplify tool & keymap definitions by sharing them.
It's highly unlikely we will ever want these to use different keys
once they're set as the active tool.
|
|
Needed to copy keymap items from other keymaps.
|
|
|
|
Adding shortcuts to tools was always adding to the top-level window map.
|
|
For configuration scripts that want to change keymaps based on this setting.
|
|
This refactors loading of key configurations to clear and refill existing
ones, rather than adding a new one and then removing the old one.
This fixes broken loading of non-default configurations after recent changes,
and prepares for future changes to make it possible to dynamically change
key configurations based on user preferences.
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
Instead use global panel-type list.
|
|
|
|
|
|
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
|
|
Use 2.7x keymap preset for full keymap.
Use define to allow further adjustments.
See T55666.
|
|
|
|
|
|
|
|
|
|
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
|
|
Wrapps keymap poll, no functional changes.
|
|
|
|
Practically all access to enum data is read-only.
|
|
|