Commit Graph

76 Commits

Author SHA1 Message Date
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]: cfffd813c1
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 c14a43acce 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]: d7558a243c
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 d53862351d.

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 80feb13665. 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
Falk David
b29ba95cae GPv3: Add "(De)select All" operator and keymap
This adds the `GREASE_PENCIL_OT_select_all` operator as well as a new keymap for edit mode for the new grease pencil objects.

Pull Request: https://projects.blender.org/blender/blender/pulls/108628
2023-06-06 14:45:54 +02:00
Germano Cavalcante
260125aed0 Transform: Allow navigation for operator when called from macro or menu
Extrude and duplicate operators now support navigation
(if enabled in preferences).
2023-06-05 16:49:44 -03:00
Germano Cavalcante
3010f1233b Transform: new feature to edit the 'Snap Base'
This commit implements a new modifier key (`B`) for the transform
operators.

This new key allows changing the 'Snap Base' of a transform by snapping
it to a defined point in the scene.

Ref #66424

# Implementation Details

- This feature is only available in the 3D View.
- This feature is only available for the transform modes:
  - `Move`,
  - `Rotate`,
  - `Scale`,
  - `Vert Slide` and
  - `Edge Slide`.
- The `Snap Base Edit` is enabled while we are transforming and we
  press the key `B`
- The `Snap Base Edit` is confirmed when we press any of the keys:
 `B`, `LMB`, `Enter`
- During um operation, if no snap target is set for an element in the
  scene (Vertex, Edge...), the snap targets to geometry Vertex, Edge,
  Face, Center of Edge and Perpendicular of Edge are set automatically.
- Constraint or similar modal features are not available during the
  `Snap Base Edit` mode.
- Text input is not available during the `Snap Base Edit` mode.
- A prone snap base point is indicated with an small cursor drawing.

Pull Request: https://projects.blender.org/blender/blender/pulls/104443
2023-06-03 04:18:49 +02:00
Falk David
4f977ad56f Merge branch 'blender-v3.6-release' 2023-06-02 15:07:18 +02:00
Sietse Brouwer
ad28638c97 Fix #108472: weight painted when ctrl-left-click on bone in GP
In Grease Pencil weight paint mode, when ctrl-clicking on a bone
there was also weight painted on vertices. This was caused by a
redundant keymap entry in the Blender keymap. Entry is removed.
Now ctrl-clicking on a bone doesn't affect vertex weights.

Pull Request: https://projects.blender.org/blender/blender/pulls/108521
2023-06-02 15:01:15 +02:00
Campbell Barton
f47aa50d7e Cleanup: format 2023-06-02 10:16:14 +10:00
Harley Acheson
a58e5ccdec UI: File Save Incremental Operator
Operator for the TopBar File Menu that saves the currently open file
with a numerically incremented name.

Pull Request: https://projects.blender.org/blender/blender/pulls/104678
2023-06-01 17:34:57 +02:00
Nate Rupsis
b95cf5ff0f Animation: Update NLA "TAB" tweak mode to be full stack evaluation
This PR updates the key mapping (TAB) for Tweak mode (Lower stack) to Full stack for the NLA editor

[Issue](https://projects.blender.org/blender/blender/issues/108026)

Pull Request: https://projects.blender.org/blender/blender/pulls/108050
2023-06-01 11:03:13 -04:00
Christoph Lendenfeld
98d48c16a3 Paint: Add loop select for faces
Add loop selection identical to the behavior of ALT+Click in Edit Mode.

* ALT click: select loop
* ALT Shift click: add loop while retaining current selection
* ALT Shift Ctrl click: deselect loop

Pull Request: https://projects.blender.org/blender/blender/pulls/107653
2023-06-01 14:58:58 +02:00
Falk David
d21f4efc8e Cleanup: formatting 2023-05-30 11:18:35 +02:00
Falk David
3aaacd6e30 GPencil 3.0: Initial commit
Adds the initial stage for the grease pencil 3.0 project.

This patch includes:
* New ID and new object type.
* New DNA structures.
* New drawing engine for grease pencil (gpencil-next).
* Tests for the new grease pencil data-type.
* A few operators for conversion, switching modes and (simple) drawing.

Exposed to the user:
* An experimental option to switch to the new grease pencil.
   * This will switch the grease pencil render engine to gpencil-next which can only render the new object type.
     Current grease pencil objects will no longer render.
   * Changing this option currently requires a restart of blender (for the keymap to update).
* A conversion setting in the `Object` > `Convert To` operator.
* A drawing operator in `Draw Mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/106848
2023-05-30 11:14:16 +02:00
Christoph Lendenfeld
dfb3e0d262 Merge branch 'blender-v3.6-release' 2023-05-26 09:16:50 +02:00
Christoph Lendenfeld
adef3a4556 Animation: Remove collection hotkeys from pose mode
We have been chatting in the Animation&Rigging module meeting that the collection hotkeys (1, 2, 3 etc.) in Pose Mode are unwanted and could be replaced with something more useful.
This patch only removes the hotkeys, we can later decide what should be in their place.

Pull Request: https://projects.blender.org/blender/blender/pulls/105120
2023-05-26 09:04:00 +02:00
Christoph Lendenfeld
e2a75814ac Animation: change Slider Popup menu hotkeys
Since the change in #106113 the Slider menu which was called with the D hotkey was no longer in any menu.
This made it really hard to discover.

Since there is now more than 1 menu popup, it needs more than 1 hotkey.
The idea is that the ALT key is used in combination with keys that are easy to reach with the left hand.
Right now it is ALT+S and ALT+D but if needed in the future it can be extended to f, w and e

Pull Request: https://projects.blender.org/blender/blender/pulls/107866
2023-05-26 09:03:08 +02:00
Campbell Barton
01595ee807 Merge branch 'blender-v3.6-release' 2023-05-25 20:34:17 +10:00
Campbell Barton
1bd8745fbb Merge branch 'blender-v3.6-release' 2023-05-25 20:34:14 +10:00