Commit Graph

192 Commits

Author SHA1 Message Date
Aaron Franke
c62009a6ac 3D View: add local up/down movement to walk navigation
Minor usability enhancement for the walk navigation mode. Previously
walk navigation had local movement for forward/back/left/right,
but only global movement for up/down.
This PR adds local up/down movement, bound to the R and F keys.

Ref: !111682
2023-11-05 17:23:59 +11:00
Gilberto Rodrigues
dfd1b63cc7 UI: improve mesh edge highlighting
Changes to edit mode mesh overlays, use hue shift instead of color
fading/darkening for selection mode visual differentiation, and some
theme changes to improve the display of mesh edges and faces with good
selection visibility.

- Removed "edge" toggle from edit mode overlays panel.
- No longer halves the edge and face alpha depending on selection mode.
  Half the face alpha in wire-frame mode. For better visibility on most
  themes.

Ref !111431
2023-11-02 22:09:17 +11:00
casey bianco-davis
c57fe9a6e0 Curves: Add radius transform mode to edit mode
This adds the radius control operator and active tool
to curves edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/114017
2023-10-31 11:33:32 +01:00
Campbell Barton
6cc0d10d5f Merge branch 'blender-v4.0-release' 2023-10-31 16:26:53 +11:00
Julien Kaspar
ef0b7337a6 Fix #113920: Missing IC shortcuts
Add various shortcuts that were missing from the industry compatible
key-map. Various grease pencil shortcuts that were intended to be there
are now present.

These issues are now fixed:
- `Alt A` = Missing from GP sculpt mode.
- `Shift S` = Missing.
- `Shift Alt S` = Insert Blank Keyframe - Not added to Edit mode.
- `Y` = Active Layer Menu - Not added to Edit mode.
- `Shift Y` = Merge Down - Does not exist.
- `Shift Backspace/Delete` = Delete All Active Frames is missing from
  every mode except Draw.
- `Backspace/Delete` = Delete Menu is missing from all modes except
  Edit.
2023-10-31 16:01:04 +11:00
Lukas Stockner
d15013b583 Merge branch 'blender-v4.0-release' 2023-10-31 05:48:58 +01:00
Campbell Barton
4bec9d0d71 Fix #114282: Extrude to Cursor tool no longer tweaks on drag
Regression in [0] which only ran drag events if the press event passed
through.

Resolve using the same logic as select picking
(see: WM_operator_flag_only_pass_through_on_press).

[0]: 4d0f846b936c9101ecb76a6db962aac2d74a460a
2023-10-31 14:55:12 +11:00
Brecht Van Lommel
39107b3133 Revert changes from main commits that were merged into blender-v4.0-release
The last good commit was 8474716abb0db3b06838a57f7217bc945638d8df.

After this commits from main were pushed to blender-v4.0-release. These are
being reverted.

Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
2023-10-30 21:40:35 +01:00
Campbell Barton
e8279ff4ee Cleanup: format 2023-10-27 12:13:46 +11:00
Matias Mendiola
fbb3726f68 GPv3: Menus updates
Adds context menus and updates existing menus with newly added operators

- Updates menu texts and separators
- Add Point Menu
- Add Stroke and Point Context Menu

Pull Request: https://projects.blender.org/blender/blender/pulls/114172
2023-10-26 16:52:31 +02:00
Campbell Barton
9762af060d Cleanup: format 2023-10-23 10:13:33 +11:00
casey bianco-davis
e266b142f6 GPv3: Transform operators
This adds the keybindings, menu, and functionally for the edit mode transform operators to grease pencil v3.

The transform operation include:
 * translate, rotate, scale, change opacity, change radius

Pull Request: https://projects.blender.org/blender/blender/pulls/111836
2023-10-21 15:12:47 +02:00
Dalai Felinto
45fd780dff Cleanup: make format 2023-10-20 19:12:58 +02:00
casey bianco-davis
5a79023409 GPv3: Cyclical set operator
Simply sets the cyclical property selected strokes. Note this does not add extra geometry like the legacy operator.

Note: also adds a key bind 'alt c' to toggle, same as for curves.

Resolves #113671

Pull Request: https://projects.blender.org/blender/blender/pulls/111904
2023-10-20 10:12:24 +02:00
Pratik Borhade
d836aa7931 GPv3: Expose insert keyframe in menu
Create menu similar to legacy GP to expose insert keyframe operation in
user interface. Pressing `I` key will invoke this menu.
(We can further add "key duplicate" and other relevant operation in this menu)

Pull Request: https://projects.blender.org/blender/blender/pulls/113663
2023-10-13 14:07:21 +02:00
Philipp Oeser
ec5287bb39 Merge branch 'blender-v4.0-release' 2023-10-11 09:20:28 +02:00
Philipp Oeser
9783611518 Fix #113287: Industry Compatible Keymap: Node Editor Search missing
Caused by 974edc588547 / 7f9d51853c978ff

You can now type to search directly in the `Add` menu.
Bit unfortunate though that this is not mapped to any shortcut in the
`Industry Compatible` keymap anymore

I think we could just add TAB back (but this time, mapped to
`NODE_MT_add`).

Pull Request: https://projects.blender.org/blender/blender/pulls/113446
2023-10-11 09:19:19 +02:00
Falk David
7e87435cf4 GPv3: Initial drawing tool
This PR implements an initial drawing tool that can already be used for testing.
While this is not fully feature complete (compared to the current grease pencil draw tool) the following is already implemented:

* Pressure support for radius and opacity.
* Material color and vertex color support.
* New active smoothing algorithm based on curve fitting.
* Simplify algorithm as a post-process step.

Some deliberate limitations include:
* The drawing plane is always the front plane. Drawing on surfaces is also not supported.
*

The current approach has not been optimized for performance yet. The goal was to have a straightforward implementation
first and then focus on performance later.

There are numerous parameters in the code that are hard-coded for now. These should be exposed at some point, potentially as user settings.

Pull Request: https://projects.blender.org/blender/blender/pulls/110093
2023-10-06 10:49:54 +02:00
d6b86f278b Anim: keymap, replace 'show all layers' with 'show all collections'
Make the Ctrl+ACCENT_GRAVE hotkey call the 'show all bone collections'
operator (`armature.collection_show_all`), instead of 'show all armature
layers' (`armature.layers_show_all`).

This was the last reference to `armature.layers_show_all`, and the operator
has been removed.
2023-09-29 11:52:44 +02:00
Campbell Barton
790fea431f Cleanup: use since quotes for enum values, wrap multi-line brackets 2023-09-29 14:41:48 +10:00
6d0e6f0f3e Anim: remove pose.bone_layers operator
Remove the obsolete `pose.bone_layers` operator, it's been replaced by
bone collections.
2023-09-28 14:20:24 +02:00
Campbell Barton
afeb3e7784 Fix #112761: Sequencer tweak tool does not box-select
Clicking and dragging over and empty space wasn't box selecting.
2023-09-28 16:42:50 +10:00
Julien Kaspar
fa27e6561e Keymap: restore most used brush shortcuts
Based on feedback from users this PR brings back the most commonly used
brush shortcuts in sculpt mode. Essentially reverting some of the
changes from #108712

There are multiple reasons behind this decision:

- Anyone coming from a previous version will instinctively reassign the
  brush shortcuts to the same keys as before, introducing shortcut
  conflicts as a result. Having the shortcuts there by default makes this
  case less likely as it makes available brush shortcuts more obvious.
- The default `paint.brush_select` operator is hard to set up manually
  and is offering behavior that isn't available with the
  `wm.tool_set_by_id` which is far easier to create from the UI
- There are too many brushes available to know which ones are the most
  common ones.

There are some additional changes:
- `S` is now used for the Smooth brush.
- Draw brush is now assigned to `V` to avoid conflicts on `X`.
- `Shift T` is using the Scrape instead of Flatten brush.
- `C` is using the Clay Strip instead of Clay brush.

Removing the brush shortcuts can be revisited later once the brush
management is overhauled.

Ref !112898.
2023-09-28 12:52:49 +10:00
Julien Kaspar
a3d0006ac1 Keymap: IC, minor adjustments based on user requests
Some small adjustments based on user requests from the community.

- The shortcut on 4 for Object Mode was much preferred.
  As a compromise the mode pie menu moved to 5.
- The region selection shortcut from the default keymap was not added.
  It's now available on Ctrl Shift Alt LMB.

Ref !112628.
2023-09-28 12:52:47 +10:00
Julien Kaspar
a0e5b03126 Keymap: IC, regions shortcuts and fixed inconsistencies
This is a followup fixes related to #105298

This PR adds shortcuts to toggle the sidebar, toolbar, channels and
other regions across various editors with the Ctrl-LeftBracket &
Ctrl-RightBracket shortcuts.

An additional shortcut to toggle the Asset Shelf in the 3D Viewport via
Shift Spacebar was also added. This shortcut will be important for
various workflows in the future.

To avoid shortcut conflicts and improve consistency, Ctrl-L is now
consistently being used for select_linked operations.

Ref !112042.
2023-09-28 12:52:46 +10:00
Damien Picard
1dfbc1ef83 UI: fix and improve a few messages
- "Tapping Alt...": remove newline in tooltip.
- Add descriptions for the From Left and From Right of the Shear
  Keyframes operator's direction items, instead of just "foo":
  - "Shear the keys using the left key as reference", and
  - "Shear the keys using the right key as reference".
- "Affects the value" -> "Affect", use the imperative.
- "Increase or decrease the value of selected keys \n
  in relationship to their average"
  -> "Scale selected key values by their combined average":
  remove the newline and rephrase the unclear description. New
  description by Harley Acheson.
- "Redefine equalizer graphs": this is an operator name, it should be
  title case.
- "USD Skeleton Import" warning: inconsistent whitespace.
- "%s: Joint weights and joint indices size mismatch size mismatch for
  prim %s": remove duplicated "size mismatch".
- "USD export:  couldn't copy texture tile from %s to %s": remove
  duplicate whitespace, change "couldn't" to "could not" to respect
  the style guide.
- "Temp. Diff." -> expand the abbreviation to "Temperature Difference"
- "Registering node tree class:" do not use formatting just to reduce
  redundancy in a few messages, but write it explicitly each time.
  This is more legible, and much better for translations.
- "Absolute time alignment while translating" -> "Absolute time
  alignment when transforming keyframes" because this applies to all
  transforms, not translation only.
- "# characters defines the [...] length of frame numbers" ->
  "define" (typo), "padding" is more specific than length.

Pull Request: https://projects.blender.org/blender/blender/pulls/112975
2023-09-27 21:29:02 +02:00
Richard Antalik
86a0d0015a VSE: Improve retiming UI
Currently retiming is quite awkward, when you need to retime multiple
strips strips in sync. It is possible to use meta strips, but this is
still not great. This is resolved by implementing selection.

General changes:
Gizmos are removed, since they are designed to operate only on active
strip and don't support selection.
Transform operator code is implemented for retiming data, which allows
more sophisticated manipulation.
Instead of drawing marker-like symbols, keyframes are drawn to
represent retiming data. Retiming handles are now called keys. To have
consistent names, DNA structures have been renamed.
Retiming data is drawn on strip as overlay.

UI changes:
Retiming tool is removed. To edit retiming data, press Ctrl + R, select
a key and move it. When retiming is edited, retiming menu and
context menu shows more relevant features, like making transitions.
Strip and retiming key selection can not be combined. It is possible to
use box select operator to select keys, if any key is selected.
Otherwise strips are selected.
Adding retiming keys is possible with I shortcut or from menu.
Retiming keys are always drawn at strip left and right boundary. These
keys do not really exist until they are selected. This is to simplify
retiming of strips that are resized. These keys are called "fake keys"
in code.

API changes:
Functions, properties and types related to retiming handles are renamed
to retiming keys:
retiming_handle_add() -> retiming_key_add()
retiming_handle_move() -> retiming_key_move()
retiming_handle_remove() -> retiming_key_remove()
retiming_handles -> retiming_keys
RetimingHandle -> RetimingKey

Retiming editing "mode" is activated by setting `Sequence.show_retiming_keys`.

Pull Request: https://projects.blender.org/blender/blender/pulls/109044
2023-09-27 01:45:59 +02:00
Jeroen Bakker
7b379eb657 Cleanup: Make format 2023-09-22 08:32:03 +02:00
Harley Acheson
18e07098ef UI: Support additional console text operations
Adds the ability to set text cursor position in the Console editor
by clicking with the mouse and many other expected operations such as
cut, select all & deselect on text entry.

Ref !108626
2023-09-22 13:36:29 +10:00
Campbell Barton
fb624720eb Cleanup: remove 'apple' variable for key-map parameters
The OSKEY-Comma key-map item will be kept on macOS by the
bl_keymap_utils.platform_helpers utility function.
2023-09-22 10:37:23 +10:00
Brecht Van Lommel
208323c087 Fix duplicate preference key shortcut on macOS, causing test failure
After recent changes in 86f659a.
2023-09-21 18:46:30 +02:00
Pablo Vazquez
86f659ad96 Keymap: Add shortcut to open Preferences
Use Ctrl + Comma. It is an expected shortcut since many
other applications use it.
Agreed during module meeting.
2023-09-21 11:48:07 +02:00
b48031df8e Anim: armature edit mode, make Shift+M consistent with pose mode
Replace the 'armature layers' operator (which would toggle visibility of
armature layers) with the 'bone collections' menu (which allows assigning
to and unassigning from bone collections). The functionality of these
operators is quite different, but it unifies the behaviour between
armature pose and edit modes.

Selecting which bone collections are visible in the 3D Viewport may be
reintroduced after nestable bone collections are implemented. Otherwise
the list of bone collections will likely become unwieldy.
2023-09-19 17:43:26 +02:00
62639080bc Anim: armature edit mode, replace 'bone layers' operator with collections
In armature edit mode, replace the 'bone layers' operator with the 'move
to bone collection' operator. This operator now works in both pose mode
and edit mode, and is available with the 'M' hotkey in either mode.
2023-09-19 11:45:40 +02:00
02659c0d01 Anim: merge bone collection assignment menus
Remove the Ctrl+G shortcut (remnant of the bone group assignment operator),
and change the 'Pose / Bone Collections' menu so that it handles linked
and overridden data properly. Shift+M now shows that menu too.
2023-09-18 14:48:34 +02:00
Pablo Vazquez
2f31077463 Fix #112032: Theme: Wrong colors editing list items
Fixed by using a slightly transparent white color that blends
correctly with the background of text inputs and list items.

Also use the same colors in the Text Editor for consistency in both
Dark and Light themes.
2023-09-15 13:00:05 +02:00
Campbell Barton
b7f3e0d84e Cleanup: spelling & punctuation in comments
Also remove some unhelpful/redundant comments.
2023-09-14 13:25:24 +10:00
Campbell Barton
636000ed39 Cleanup: group navigation argument with other preferences
Was incorrectly grouped with convenience assignments.
2023-09-14 13:25:22 +10:00
Campbell Barton
f56af0aa65 Cleanup: resolve bl_keymap_validate.py warning (when not --relaxed)
This would have also fixed the `script_validate_keymap` but these
issues from a strict check are better handled as warnings, not errors.
2023-09-14 12:38:35 +10:00
Philipp Oeser
ff6b25a200 Keymap: Add Numpad Return to create newline in Text object edit mode
Since this is what text editors usually do (blenders text editor as
well), we can also add it for Text object edit mode.

Resolves #112170.

Pull Request: https://projects.blender.org/blender/blender/pulls/112277
2023-09-12 15:42:54 +02:00
Christoph Lendenfeld
e656e850a6 Animation: Rename ACTION_OT_sample
After Renaming "Bake Curve" to "Samples to Keys" in #111049,
the name of the `ACTION_OT_sample` operator needed renaming.
That is because the word "sample" is now used to describe FCurve
data in an uneditable state.

Rename to `ACTION_OT_bake_keys` since baking is the
term used in animation to describe the action of creating dense key data.

Pull Request: https://projects.blender.org/blender/blender/pulls/112151
2023-09-12 09:42:01 +02:00
Christoph Lendenfeld
9e5e04e915 Animation: Rename Graph_OT_sample
After Renaming "Bake Curve" to "Samples to Keys" in #111049,
the name of the `GRAPH_OT_sample` operator needed renaming.
That is because the word "sample" is now used to describe FCurve
data in an uneditable state.

Rename to `GRAPH_OT_bake_keys` since baking is the term
used in animation to describe the action of creating dense key data.

Pull Request: https://projects.blender.org/blender/blender/pulls/112148
2023-09-12 09:32:18 +02:00
Hans Goudey
974edc5885 Cleanup: Remove unnecessary "add node search"
Now that specific menus can be searched directly (see 7f9d51853c978ff),
there is no need to maintain separate search functionality for adding
nodes. This PR removes the add node search. In a way this brings us
closer to the `NodeItem` situation before, but the setup is more
flexible since the menus are more standard and easier to customize.

In the few ways we customized the node search items before, this gives
us the same results as before. Overall the searching is less flexible,
but I think that is just a tradeoff we have to accept for the simplicity
of searching menus. In the future menus could be made more dynamic,
with each builtin node's menu path stored on the node type, similar to
assets. That might be a nice compromise. In the meantime this code
is just dead weight.

Pull Request: https://projects.blender.org/blender/blender/pulls/112056
2023-09-11 18:36:09 +02:00
casey bianco-davis
5870ffa570 GPv3: Frame delete operator
This operator is a combination of the previous delete operator `frame` mode
and the `active_frames_delete_all` operator.

This also add the delete menu and key binds.
2023-09-11 11:37:16 +02:00
Christoph Lendenfeld
d3d19e8be9 Animation: Rename "Bake Curve" to "Keys to Samples"
Breaking change since the operator name changes.

Users have been confused about this for a long time.
The term "bake" in the context of animation usually means
to add keys at a given interval without changing the shape of the curve.

The fact that the curve isn't editable after baking was the main issue.

In order to stop the confusion the operator is renamed to "Keys to Samples"
to indicate that there is a conversion happening and that there are no keys afterwards.

The Un-Bake operator has also been changed to "Samples to Keys"

The operator description has been updated to mention that after the conversion
the data is no longer editable.

The "Bake Sound to F-Curves" has been renamed to "Create Samples from Sound"

Pull Request: https://projects.blender.org/blender/blender/pulls/111049
2023-09-08 14:01:47 +02:00
Campbell Barton
e60aa8ab01 Cleanup: key-map indentation 2023-09-08 16:53:28 +10:00
Campbell Barton
45305a5ad1 Keymap: remove internal vert_without_handles option
This was needed while testing #96544, now all curve picking selects
bezier knots without handles - the option can be removed.

This is a functional change for the 2.7x keymap, however selecting
bezier points with handles isn't a useful difference to keep.
2023-09-08 16:40:59 +10:00
Pratik Borhade
9f4f50ef70 Fix #111432: Shortcut for cycling fallback tool not working
Add missing Keymap for cycling fallback tool in node editor
to maintain consistency.

Pull Request: https://projects.blender.org/blender/blender/pulls/112006
2023-09-07 13:01:33 +02:00
Hans Goudey
ef03121e52 UI: Add shortcut for "Add Modifier" menu in property editor
In the property editor "Modifier" tab, open the new modifier
from 6da4b87661f0fbbe7fc5 menu with the Shift-A shortcut.

A new operator is added that opens the menu because there
doesn't seem to be a way to make the shortcut dependent
on the property editor tab otherwise.

Pull Request: https://projects.blender.org/blender/blender/pulls/111982
2023-09-05 16:44:08 +02:00
Pablo Vazquez
dabc35724e Fix #111942: wrong colors editing list items in light theme
Also updates a bunch of missing entries recently added (uses default
colors from the dark theme).
2023-09-05 12:55:32 +02:00
Campbell Barton
0c26c84704 Cleanup: spelling in comments 2023-09-05 11:04:27 +10:00
Campbell Barton
e8c812a307 Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
Rawalanche
0e090369d6 Fix #109439: Use List Item widget colors for View Item widgets
As concluded in discussion under #109439, the View Item widgets are
supposed to use List Item widget theme colors. This patch does that.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111584
2023-09-01 20:02:20 +02:00
Campbell Barton
523700030f Fix enabling experimental gpencil-v3 failing to refresh the keymap
Add an update function that ensures the key-configuration is reloaded.

Also prefer passing individual options instead of passing in
PreferencesExperimental to the key-map since it's no longer clear
which options impact shortcuts.
2023-09-01 14:31:06 +10:00
Campbell Barton
618f39fca2 Keymap: improve tweak tool consistency & behavior
Remove experimental options & make them default:
- Tweak Select: Mouse Select & Move
- Tweak Tool: Left Mouse Select & Move

Changes:

- LMB press selects the element
  (unless it's already selected - in that case no selection takes place).
- LMB drag moves the selection.
- LMB click selects the element
  (deselecting all others).

Implications:

- This makes it possible to tweak more than one item at a time.
- It is no longer possible to set the 3D cursor with LMB when the tweak
  tool is active.

Details:

- Shift-LMB remains unchanged.
- RMB selection remains unchanged.
- Blender 2.7 key-map remains unchanged.

Addresses design task #96544.
2023-09-01 12:58:05 +10:00
Jeroen Bakker
f0385d7a9e Cleanup: Make format 2023-08-29 15:30:13 +02:00
998136f7a7 Anim: replace Bone Groups & Armature Layers with Bone Collections
Armature layers (the 32 little dots) and bone groups are replaced with
Bone Collections:

- Bone collections are stored on the armature, and have a name that is
  unique within that armature.
- An armature can have an arbitrary number of bone collections (instead
  of the fixed 32 layers).
- Bones can be assigned to zero or more bone collections.
- Bone collections have a visibility setting, just like objects in scene
  collections.
- When a bone is in at least one collection, and all its collections in
  are hidden, the bone is hidden. In other cases (in any visible
  collection, or in no collection at all), the bone visibility is
  determined by its own 'hidden' flag.
- For now, bone collections cannot be nested; they are a flat list just
  like bone groups were. Nestability of bone collections is intended to
  be implemented in a later 4.x release.
- Since bone collections are defined on the armature, they can be used
  from both pose mode and edit mode.

Versioning converts bone groups and armature layers to new bone
collections. Layers that do not contain any bones are skipped. The old
data structures remain in DNA and are unaltered, for limited forward
compatibility. That way at least a save with Blender 4.0 will not
immediately erase the bone group and armature layers and their bone
assignments.

Shortcuts:

- M/Shift+M in pose/edit mode: move to collection (M) and add to
  collection (shift+M). This works similar to the M/Shift+M menus for
  objects & scene collections.
- Ctrl+G in pose mode shows a port of the old 'bone groups' menu. This
  is likely to be removed in the near future, as the functionality
  overlaps with the M/Shift+M menus.

This is the first commit of a series; the bone collections feature will
be improved before the Blender 4.0 release. See #108941 for more info.

Pull request: https://projects.blender.org/blender/blender/pulls/109976
2023-08-29 14:31:18 +02:00
Julien Kaspar
44750edb31 Fix #111533: Sequencer selection broken with IC keymap
Clears Tweak Tool keymap entries and prevents inheritance from the
default keymap.

Ref !111625
2023-08-29 17:29:21 +10:00
Campbell Barton
7074c210cc Cleanup: format 2023-08-25 09:40:42 +10:00
Philipp Oeser
44ba616614 Fix #108782: Fcurve Modifer shortcut does not work in channels region
Since the 5e1470d1b3eb / 0f51b5b599bb the `fmodifier_add` operator has
moved to the Channel menu in the Graph Editor and also the channels
context menu in the channels region. The shortcut was not working in the
channels region though since the operator was only in the keymap for the
main region (not the channels region).

Now move the keymap entry to the generic keymap of the Graph Editor so
it works in both regions.

Pull Request: https://projects.blender.org/blender/blender/pulls/111378
2023-08-24 15:10:57 +02:00
casey bianco-davis
5bed3ef827 GPv3: Dissolve Operator
Adds the Dissolve operator.

note that this pull request contains some of the same menu code also included in #110938

Pull Request: https://projects.blender.org/blender/blender/pulls/111079
2023-08-24 11:06:18 +02:00
Julien Kaspar
920271da42 Keymap: Left and Right Click consistency improvements
Fix some remaining consistency issues for selection shortcuts for both
left and right click select.

Based on design of #105298

Grease Pencil:

Instead of using `Alt Select` shortcuts for selecting whole strokes,
these are now following existing standards with `L` and `Shift L` from
select linked pick operations.

`Alt Select` keys are instead used for selecting individual components
in modes that use brushes just like [0].

Regular selection like `Select` and `Shift Select` are now always mapped
to ensure that all keymap configurations are able to select individual
components in every mode.
This does not cause conflicting behavior with brushes.

Lasso Select shortcuts on `Ctrl Alt` and `Shift Ctrl Alt` have been
removed. These were duplicates and are not needed.

Mesh Sculpt Mode:

Mesh sculpt mode uses correct lasso masking shortcuts in both right and
left click select. These are now the same as lasso selection shortcuts
in other modes.

Ref !110960.

[0]: fb54d3f865928ebe4042eb1a3a12eb02709332b8
2023-08-22 15:47:07 +10:00
Pablo Vazquez
26dcc961f5 Markers: Use double-click to rename
For speed and consistency with other areas in Blender like Outliner,
UILists, animation channels, etc.

This is additionally to F2 (Enter in Industry Compatible keymap),
that shortcut is still valid.

Pull Request: https://projects.blender.org/blender/blender/pulls/111264
2023-08-18 15:23:20 +02:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Julien Kaspar
8814101a20 Keymap: Compatible Keymap - Consistency and Updates
The changes in this keymap are much more involved.
If any shortcut isn't mentioned, that means it is unchanged.

General:

- All brush shortcuts have been removed for free custom mapping
- `S` & `U` are now consistently mapped for Brush size & strength
- Redundant shortcuts have been removed such as
  - Line Session drawing (In GP Draw Tool)
  - Select Alternate in GP
  - Quadriflow Remesh (In Mesh Sculpt Mode)
  - Box Hide (In Mesh Sculpt Mode)
  - Dynamic Topology Toggle (In Mesh Sculpt Mode)
  - Mask Overlay (In Mesh Sculpt Mode)
- Removed Lasso Mask/Select shortcuts (This keymap is mainly using the Tools instead. Easy to add back if needed.)

Mode Switching (Global change):

Easier mode switching access for any workflow.

- `123` = switch selection/mask modes for the **current mode**. If in object mode, it will first switch to edit mode (Previously this would always switch to edit mode)
- `4` = Mode switching pie menu (previously `4-7` for individual modes)
- `Tilde` = Transfer Mode (Previously not mapped. Useful for instant object switching while keeping the current mode)
- `5-0` = Unassigned

Brush vs Selection:

Multiple Modes were missing these shortcuts.

- `Shift` `LMB` = Smooth Brush
- `Ctrl` `LMB` = Inverted Brush
- `Shift` `Alt` `LMB` = Set Selection
- `Shift` `Alt` `Ctrl` `LMB` = Toggle-Extend Selection

Brush Size vs Select Linked:

These were previously in direct conflict. Now they are both distinct and based on other DCC software.

- `[` = Decrease Brush Size
- `]` = Increase Brush Size
- `Alt` `dbl LMB` = Select Linked Pick
- `Ctrl` `Alt` `dbl LMB` = Deselect Linked Pick
- `Ctrl` `L` = Select Linked

Select & Mask:

- `Q` = Cycle Masking/Selection Tools
- `Ctrl` `A` = Mask/Select Pie Menu (Draw, Paint, Sculpt Modes)
- `Alt` `A` = Auto-Masking Pie Menu (Mesh & GP Sculpt Mode)
- `Shift A` = Expand Mask (Mesh Sculpt Mode) / Grow Selection (Curve Sculpt Mode)
- `Shift` `Alt` `A` = Expand Mask by Normals (Mesh Sculpt Mode)

Face Sets & Visibility:

Previously missing shortcuts.

- `Shift` `W` = Face Set Expand
- `Shift` `Alt` `W` = Active Face Set Expand
- `Ctrl` `W` = Face Set Edit Pie Menu
- `Page Up` = Grow Active Face Set
- `Page Down` = Shrink Active Face Set
- `H` = Hide Active Face Set
- `Shift` `H` = Hide Inactive Face Sets / Show everything
- `Ctrl` `H` = Hide Masked Geometry

Transforming:

For Sculpt and Weight Painting modes. Previously missing

- `C` = Cursor Tool
- `W` = Move Tool
- `E` = Rotate Tool
- `R` = Scale Tool
- `T` = Transform Tool
- `Shift` `RMB` = Set Cursor / Set Transform Pivot in Sculpt Mode

Sculpting:

Consistent and easier to access shortcuts for remeshing and subdiv level .

- `Shift` `D` = Subdivision level Down (Previously on `Pg Down`)
- `D` = Subdivision level Up (Previously on `Pg Up`)
- `Shift` `Ctrl` `D` = Voxel Size / Dyntopo Size
- `Ctrl` `D` = Voxel Remesh / Dyntopo Flood Fill

Adding missing shortcuts

Painting:

Fixing various missing or inconsistent shortcuts.

- `Backspace` = Set Color/Weight
- `I` = Sample Color/Weight
- `Alt` `I` = Sample Vertex Group
- `Alt` `Ctrl` `I` = Vertex Group Lock Pie
- `X` = Swap Colors (Previously missing in Sculpt Mode)

Grease Pencil:

Adding many missing shortcuts.

- `Shift S` = Animation Menu (Previously on `I` and missing outside of Draw Mode)
- `Shift` `Alt` `S` = Insert Blank Keyframe
- `Alt` `H` = Unhide Layers
- `Ctrl` `H` = Hide Active Layer
- `Shift` H = Hide Inactive Layers
- `Y` = Active Layer Menu
- `Shift` `Y` = Merge Layer Down
- `Alt` `Y` = Material Menu
- `Alt` `Backspace`/`Delete` = Delete Active Keyframe (Previously on `D` `Backspace`/`Delete`)

Other:

Adding missing shortcuts.

- `MMB` for panning in the User Interface (Highly requested)
- `Shift F` = Center View to Mouse (Replacing Frame Selected(All Regions) shortcut)
- `D` = Annotate
- `L` = Toggle Stabilize Stroke (Previously on `Shift` `S`)
- `Ctrl F` = Weight radial control in weight painting modes

Ref !109750.
2023-08-12 23:44:07 +10:00
ok_what
5f0a8759b0 VSE: Improve drawing of strip title and preview
This patch includes set of smaller changes to address visual
inconsistencies and bugs:

- Strip previews are drawn under title bar
- All strip previews now disappear when there isn't enough space for
  drawing
- Like the sound strip, the color strip expands to fill the whole strip
  when there is little vertical space, "taking over" the strip title
  Color is more important visual indicator than the name of the strip
- Disabling strip title no longer disables strip handle frame previews
- All strip previews are now be affected by the "Show overlays" toggle
- Turning off strip text overlay no longer makes the color strip
  preview disappear
2023-08-07 21:35:45 +02:00
Damien Picard
eca984e79d UI: make external text editor presets upper case
The presets for external text editors introduced in e16ec95a16 are
stored in Python files. The names of these files are used to generate
the UI name, and are case-sensitive.

They are currently lower case, but should be title case like other
presets. This commit renames the files so they are title case.

Pull Request: https://projects.blender.org/blender/blender/pulls/110642
2023-08-01 15:53:32 +02:00
Damien Picard
d922233363 Cleanup: remove unused SSS presets
These SSS presets were used for the Blender Internal engine, pre-2.80.

Pull Request: https://projects.blender.org/blender/blender/pulls/110643
2023-08-01 15:52:05 +02:00
Campbell Barton
69e290d2fe Cleanup: code comments
Note that the previous commit [0] added a workaround for MMB-Emulation,
which should have been a separate commit.
(Ctrl-Shift-LMB for weight paint selection).
Extended the code comment for this.

[0]: cfffd813c1d6733c5efe57b29578b50241c727e2
2023-07-29 16:20:03 +10:00
Campbell Barton
cfffd813c1 Cleanup: use typed enum for UI_ITEM_* flags
Using an int lead to confusion with other flags often used with buttons.
For e.g. these flags could be easily confused with uiItem::flag.
2023-07-29 15:32:45 +10:00
Andras-Borsanyi
f418e4f648 Walk Navigation: Controls to adjust jump height interactively
In Walk Navigation mode with gravity enabled, the jump height is
often inappropriate for the scene that you are viewing. This is a small
feature that lets you change the jump height in modal walk navigation
as you go, i.e. if there are varying elevation changes across the scene.

Pressing '.' increases and ',' decreases the jump height (because these keys
are the same for most layouts).

Pull Request: https://projects.blender.org/blender/blender/pulls/109827
2023-07-28 13:43:35 +02:00
Campbell Barton
fb54d3f865 Keymap: Use Alt-LMB for selection in vertex/weight paint modes
Use Alt-LMB for selecting in vertex/weight paint modes for vertex, face
& pose bone selection - replacing Ctrl which was previously used for
selecting. This is needed so Ctrl & Shift can be consistent between all
paint modes.

Loop selection is available With Alt-LMB but only when selection tools
are active (with the LMB select key-map). They're always available with
the RMB select key-map.

This also resolves a conflict where box & lasso select tools couldn't
be used to de-select (via Ctrl) because the Ctrl-LMB was also clearing
the selection.

Part of #105298 design task.
2023-07-28 20:54:53 +10:00
Julien Kaspar
827918c925 Keymap: add/update selection mode shortcuts
Selection modes are typically assigned to the number keys.
These are some updates for more consistency among painting and grease
pencil modes:

- Paint Mask = `M` changed to `1`.
- Vertex Selection = `V` changed to `2`.
- GP: Point Selection = `1`.
- GP: Stroke Selection = `2`.
- GP: Segment Selection = `3`.

Design task: #105298

Ref !108714.
2023-07-28 18:26:57 +10:00
Julien Kaspar
6de6d7267f Keymap: improve consistency for paint modes
Various changes to common keymap entries to:

- Sync up very common shortcuts between all Draw, Paint & Sculpt modes
- Avoid shortcut conflicts and remap blocking shortcuts
- Add missing common shortcuts
- Make some important shortcuts more accessible

Some standards this is setting across these modes are:

- Holding `Ctrl` & `Shift` for inverted/smoothing brush strokes
- `X` (+ modifier keys) for Color operations
  (for example flip, sample & fill).
- `Ctrl R` for remeshing
- `I` and `Alt I` for creating and removing keyframes.

- Sample Color = `S` -> `Shift X`
- Set Vertex Color = `Shift K` -> `Ctrl X`
- Stroke Method Menu = `E` -> `Alt E`

New
- Paint Smooth = `Shift Left Mouse`

- Sample Weight = `Ctrl Left Mouse` -> `Shift X`
- Sample Group = `Shift Left Mouse` -> `Shift Ctrl X`
- Set Weight = `Shift K` -> `Ctrl X`
- Linear Gradient = `Alt Left Mouse` -> `Shift A`
- Radial Gradient = `Ctrl Alt Left Mouse` -> `Shift Alt A`
- Stroke Method Menu = `E` -> `Alt E`

New
- Invert Paint = `Ctrl Left Mouse`
- Smooth Paint = `Shift Left Mouse`

- Sample Color = `S` -> `Shift X`

New
- Smooth Paint = `Shift Left Mouse`

- Face Sets Visibility = `H` -> `Shift H`
- Face Sets Visibility = `Shift H` -> `H`
- Face Set Edit Pie = `W` -> `Alt W`
- Sample Color = `S` -> `Shift X`
- Context Enum Menu = `E` -> `Alt E`
- Subdivision Set (Level -1 relative) = `Pg Down` -> `Alt 1`
- Subdivision Set (Level 1 relative) = `Pg Up` -> `Alt 2`

New
- `paint.brush_colors_flip` = `X`
- `sculpt.detail_flood_fill` = `Ctrl R`
- `sculpt.set_pivot_position` (Mode=Surface) = `Shift Right Mouse`

New
- `brush.scale_size` (scalar=0.9) = `[`.
- `brush.scale_size` (scalar=1.1) = `]`.

Removed
- Delete All Active Frames = `Shift X`

New
- `wm.call_menu (GPENCIL_MT_gpencil_draw_delete)` = `Alt I`

- Delete = `X` -> `Alt I`

New
- `wm.call_menu (GPENCIL_MT_gpencil_draw_delete)` = `Alt I`

- Sample Weight = `Ctrl Left Mouse` -> `Shift X`

New
- `wm.call_menu (GPENCIL_MT_gpencil_draw_delete)` = `Alt I`

New
- `gpencil.tint_flip` = `X`
- `wm.call_menu (GPENCIL_MT_gpencil_draw_delete)` = `Alt I`

Ref !108791.
2023-07-28 12:31:52 +10:00
Campbell Barton
93ac697091 Cleanup: remove redundant transform entries in the "Weight Paint" keymap
The pose keymap already handles these actions.
2023-07-28 12:18:48 +10:00
Nate Rupsis
8183f21258 Animation: Default NLA duplucation hot keys to duplicate linked
## Overview

Much like node groups, or a VSE clip, when we duplicate we actually want a _linked_ duplicate. This PR updates the NLA key board for Duplicate linked to `Shift + D`, and Duplicate to `Alt + D`.

Additionally, update Tool tips to reflect duplicate vs linked duplicate.

Pull Request: https://projects.blender.org/blender/blender/pulls/110316
2023-07-27 18:14:05 +02:00
Germano Cavalcante
d9c3cffd91 UI: Rename 'Proportional Influence' to 'Proportional Editing' in tooltip
"Proportional Editing" is the term officially used by the Blender
community to describe this specific feature.

Also, "Proportional Editing" seems to be more descriptive than
"Proportional Influence", as it emphasizes the ability to
proportionally edit the areas around the selection.
2023-07-27 09:09:22 -03:00
Campbell Barton
1339400845 Cleanup: quite pylint keymap warnings 2023-07-27 16:54:09 +10:00
Julien Kaspar
a7dd864dcf Keymap: simplify default keymap for paint modes
Part of design task #105298 to improve overall consistency.

This removes various shortcuts unused or blocking shortcuts:

- Brush tool shortcuts
  - Mesh sculpt mode shortcuts
     - `X` = Draw
     - `Shift S` = Smooth
     - `P` = Pinch
     - `I` = Inflate
     - `G` = Grab
     - `L` - Layer
     - `Shift T` = Flatten
     - `C` = Clay
     - `Shift C` = Crease
     - `K` = Snake Hook
     - `M` = Mask
  - `D` = Gpencil Vertex Paint - Draw brush

- Duplicate dyntopo shortcut for editing detail size

- Grease Pencil: Undocumented draw tool specific guide shortcuts:
  - `O`, `J`, `Alt J`, `K`, `Alt K`, `Shift K`, `L`, `Alt L`, `Ctrl L`,
    `V`, `M`, `C` & `Alt C`

- `L` = Gpencil: "Alternate" operator shortcut

Also moved erasing box and lasso gesture shortcuts out of specific tools
and into the Draw mode overall.

Ref !108712.
2023-07-27 16:42:17 +10:00
Campbell Barton
3857668756 Remove duplicate keymap item in c14a43acce5d028ee24c412ac0ecad361b07dd15 2023-07-27 16:00:53 +10:00
Campbell Barton
c14a43acce Fix paint stroke "mode" property being reused when weight painting
Binding a key to weight-paint with mode set (invert/smooth for e.g.)
caused regular weight painting to reuse this setting.

Don't reuse paint "mode" between strokes.
This also allows the default to be removed from the key-map.
2023-07-27 15:58:50 +10:00
Campbell Barton
bdd09a16ef Cleanup: internal keymap function names
- Use km_edit_ prefix for edit-modes.
- Rename "curve" to "curve_legacy".
- Consistent naming for naming for vertex/face selection mask.
- Group object/grease-pencil/paint/edit mode key-map functions together.
2023-07-27 15:17:12 +10:00
Campbell Barton
7548059886 Keymap: restore mirror transform shortcut in weight paint mode
Unintentionally removed in [0]. Weight paint transform should always
follow pose-mode transform.

[0]: d7558a243c6b3b48669d7c084ff0cfbbc5324e6a
2023-07-27 12:30:44 +10:00
Campbell Barton
88dd1d4408 Keymap: rename "Toolbar Toggle" to "Region Toggle"
The toolbar is only one kind of region that can be toggled.
2023-07-26 21:52:37 +10:00
Campbell Barton
ab7161e41a Keymap: add experimental "Toolbar Toggle Pie" preference
When pressing N-key a pie menu is shown which can toggle regions,
typically the toolbar, sidebar and the header.

This supports toggling regions without having to add a separate shortcut
for each one.

The pie menu locations selected based on the region alignment.

See #107785.
2023-07-26 15:24:30 +10:00
Campbell Barton
d7558a243c Keymap: avoid 3D View transform inheritance
Move shared transform operations out of the 3D viewport key-map into a
template function which each modes key-map uses.

This allows sculpt mode to key-bindings which where bound to transform
actions that don't make sense in sculpt mode.

Note that this enables `alt_navigation` for some 2D viewport actions
where it's not yet used.

Based on design task: #105298.

PR !110019.

Co-authored-by: Julien Kaspar <JulienKaspar>
2023-07-25 21:22:09 +10:00
Campbell Barton
5f764b361c Fix 'bl_keymap_validate' test
Exporting & importing the key-map changed results,
resolve by using float literals.
2023-07-25 20:51:33 +10:00
Germano Cavalcante
017d4912b2 Transform: Use alternative hotkeys for Transform Navigation
In order to avoid navigation hotkey conflicts during transform
operations, this commit implements the "Transform Navigation with Alt"
option.

This option is enabled by default and makes navigation hotkeys require
the `Alt` key during a transforming in the 3D View.

Pull Request: https://projects.blender.org/blender/blender/pulls/109754
2023-07-24 15:51:58 +02:00
Germano Cavalcante
c0d230e0b8 Revert "Transform: Allow navigation by default"
This reverts commit d53862351d042c4c36c7ebb49feb230725e43a0b.

After conducting tests with artists at the studio, it was observed that
altering the Transform Modal Maps caused significant disruption due to
the heavy reliance on the "Proportional Editing" and "Automatic
Constraint" features.

Considering this, it is now deemed more beneficial to provide users
with the choice of adapting their muscle memory to the new changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/109660
2023-07-04 14:53:39 +02:00
Falk David
3d99d05f00 GPv3: Add separate paint mode
This patch adds a separate paint mode for Grease Pencil 3.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/109453
2023-07-03 16:34:30 +02:00
Germano Cavalcante
d53862351d Transform: Allow navigation by default
As suggested in #108669, the "Navigate during Transform" option has
been removed and this feature works by default.

Now if you press `G`, `R` or `S` to move, rotate or scale an object you
can also navigate in the viewport.

Note that this update modifies the default keymap.
Now pressing `Alt` is required for the following modals:
- `PROPORTIONAL_SIZE_UP`,
- `PROPORTIONAL_SIZE_DOWN`,
- `PROPORTIONAL_SIZE`,
- `AUTOIK_CHAIN_LEN_UP`,
- `AUTOIK_CHAIN_LEN_DOWN`,
- `AUTOCONSTRAIN`,
- `AUTOCONSTRAINPLANE`.

Pull Request: https://projects.blender.org/blender/blender/pulls/109388
2023-06-27 20:29:05 +02:00
Pratik Borhade
57e4eea7b9 Merge branch 'blender-v3.6-release' 2023-06-21 11:47:08 +05:30
Pratik Borhade
3d3569852f Animation: Change channel selection key preferences in IC keymap
Missed in 80feb136653195551ae0b5bd49567d57e0ed6810. Include changes in key
preferences of `extend` and `extend_range` in Industry Compatible keymap.

Pull Request: https://projects.blender.org/blender/blender/pulls/108790
2023-06-21 08:14:56 +02:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Julian Eisel
acb4f89a40 UI: Add filtering support to UI views
No user visible changes expected.

Needed for the asset shelf (#102879).

Adds a UI operator triggered on Ctrl+F that will attempt to start
filtering for the hovered UI view, typically enabling a filter text
button.

View items can implement their own filter method, there's no default
one. Maybe we should add default or re-usable string filtering method
though.
Filtering is applied after constructing the view and filtered out (as
in, invisible) items are kept in storage, so that their state
(selection, active, etc.) is preserved. The filtered state is cached in
the item, so this is only done once per redraw.
2023-06-12 12:31:11 +02:00
Chao Li
126bff3099 GPv3: "Select Linked" operator
This adds `GREASE_PENCIL_OT_select_linked` operator for the new grease pencil data.

Resolves #108750.

Pull Request: https://projects.blender.org/blender/blender/pulls/108829
2023-06-11 17:35:49 +02:00
Casey Bianco-Davis
825d2d301b GPv3: "Select More" and "Select Less" operators
Adds `GREASE_PENCIL_OT_select_more` and `GREASE_PENCIL_OT_select_less` operators for the new grease pencil system.

Resolves #108752.

Pull Request: https://projects.blender.org/blender/blender/pulls/108847
2023-06-11 16:09:11 +02:00
Christoph Lendenfeld
cfcf2cc3fa Merge branch 'blender-v3.6-release' 2023-06-08 11:08:47 +02:00
Christoph Lendenfeld
2387290e4f Fix #102737: Keyframe jump operator includes hidden curves in Graph Editor
The graph editor has the function to hide the display of FCurves and to only draw keyframes on selected curves.

Both options were not respected when executing the frame jump operator,
meaning it would jump to potentially hidden keyframes.

This patch adds a new operator that is specific to the Graph Editor and that respects those features.

The only possible issue that could arise from this is a slight confusion for the user
why they behave differently between editors.
Especially with only the Graph Editor and the 3D view open.
In general I think it's an improvement and follows the "you can only modify what you see" mantra in blender

Also
Resolves #97701

Pull Request: https://projects.blender.org/blender/blender/pulls/108549
2023-06-08 11:02:19 +02:00
guishe
e16ec95a16 UI: Add a custom text editor preference
Add a user preference to set up a custom text editor for editing text
files with the "Edit Source" action in the UI context menu.

- An operator TEXT_OT_jump_to_file_at_point has been added.
- A custom editor can be set in the user preferences.
- A preset has been included for "Visual Studio Code".
- When the editor is not set, use Blender's internal editor.

Ref !108299.
2023-06-07 14:09:19 +10:00