Age | Commit message (Collapse) | Author |
|
Allow manually mapping keys for the popup toolbar.
Useful for tools that don't have immediate access,
add transform, annotate & measure.
|
|
|
|
|
|
Assign keys based on tool name when they're free, allows:
Space-T for Transform, Space-A for Annotate.
|
|
|
|
|
|
|
|
|
|
That func can be called a lot, generating a lot of noise in the
console...
|
|
Use 2 space indent for attributes, ~20% smaller files.
|
|
Use the same data format and loader that the default key-maps use.
This supports nested properties (needed for macros)
and fixes modal key-maps which weren't supported.
This format still needs to be documented.
|
|
|
|
The function is getting complicated, any refactoring
would be best done outside of 'space_toolsystem_common'.
|
|
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.
|
|
The keyconfig preset and it's preferences were too far apart,
show the preferences under the preset in a collapsible box.
|
|
|
|
Wraps `importlib.util`, avoids duplicate preset loading calls.
|
|
Pretty stupid mistake...
|
|
Needed so we can get the preferences of a key-config
which are sent to a function that generates the contents.
|
|
Currently the filenames are used when setting keymaps.
This hard coded naming meant the preset and setting function
need to be kept in sync.
Prefer to not have hard coded replacements which need to be duplicated.
|
|
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.
|
|
|
|
This duplicates items in the add menu and uses a lot of vertical space.
This should be used for tools or disabled.
|
|
Key-maps can be very large, avoid parsing on every startup.
|
|
Use new keymap format which defines data to be loaded.
|
|
The data structures for tool keymaps and presets were different,
use the same structure and expose function publicly.
|
|
|
|
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.
|
|
Review wasn't finished yet, but I just commit this for now so that I can make some progress..
Differential Revision: https://developer.blender.org/D3901
|
|
|
|
|
|
Not all Object.select_set() cases had been updated to new API... Tsst. ;)
|
|
expected.
|
|
Caused a crash on exit and isn't needed.
|
|
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
|
|
|
|
RNA's ViewLayer would present 'first level' of layer collection as a
list (collection property), when it is actually now only a single item,
same as the scene's master collection.
Note: did not try to update view_layer python tests, those are already
fully broken for quiet some time I guess (they still assume
view_layer.collections to be mutable e.g.)...
|
|
|
|
Try avoid having too many toplevel modules with generic names.
|
|
|
|
Support the common case of creating batches from python geometry,
a shader and optionally indices.
See D3779
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Added a module bpy.utils.toolsystem which only exposes ToolDef,
to avoid scripts referencing bl_ui internals.
|
|
value.
Ellipsis value is internal ingredient only, to tag hidden _node_normalmap
'real' property as not yet initialized. Public node_normalmap accessor
should never ever have that value, it's either None or a valid node!
|