Commit Graph

322 Commits

Author SHA1 Message Date
Pratik Borhade
6d749db0c2 Fix #134468: Grease Pencil: Primtive tools considering mouse drag threshold
This is due to the click_drag event assigned for primitives. Event types
that are not "PRESS" are forwarded to drag_queue then waits until
`WM_event_drag_test_with_delta/WM_event_drag_test` is true i.e. mouse
threshold value.

Pull Request: https://projects.blender.org/blender/blender/pulls/134480
2025-02-13 11:53:03 +01:00
Campbell Barton
dab47b83a8 Cleanup: de-duplicate numbered key definition with loop 2025-02-11 12:09:19 +11:00
John Kiril Swenson
f79df39171 VSE: Move snap toggle to global SequencerCommon
This allows the keybind to be invoked from either the Sequencer or
Preview view types, now that snapping is also possible in the Preview.
2025-02-03 15:02:41 -06:00
John Kiril Swenson
16c6b227da VSE: Add keymap item for seq_slide with ctrl
Allows the user to select strips at the same time (`linked_time`) while
dragging so that they don't have to re-click to drag the handles.
2025-02-02 23:03:07 -06:00
Campbell Barton
448e3c2009 Cleanup: remove redundant setting & add NUMPAD_1 for direct lookups
Add NUMPAD_1 to match NUMBERS_1 to avoid inline formatting,
also de-duplicate logic that uses both NUMBERS_1 & NUMPAD_1.
2025-01-31 13:08:05 +11:00
Lukas Tönne
3be9f3d599 Fix #133516: Add basic support for radial control in the primitive operator
This adds another operator mode for changing brush radius and opacity while the
modal primitive operator is running. It's based on the `wm.radial_control`
operator but only implements simple mouse control for these two properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/133675
2025-01-30 14:09:42 +01:00
Habib Gahbiche
d19fe522e4 Fix box select ignoring selection mode in node editors
Box select is broken for all node editors. It ignores selection modes and always uses the mode `Set a new selection`.

The operator `NODE_OT_select_box` works fine, but clicking anywhere in the node editor calls `NODE_OT_select` first, so we need to make sure it has no undesired side effects when it is not run.

Pull Request: https://projects.blender.org/blender/blender/pulls/133736
2025-01-30 12:45:50 +01:00
Habib Gahbiche
b51c560f6e Compositor: Implement shortcuts for Viewer nodes
Artists often want to quickly switch back and forth between two or more nodes while compositing.

This patch implements two operators `NODE_OT_viewer_shortcut_set` and `NODE_OT_viewer_shortcut_get` that allow users to map a viewer node to a shortcut. For example, pressing `cltr+1` while a node is selected, assigns that node to the shortcut `1`, creates a viewer node if it has none attached and sets that viewer node to active. Pressing `1` will set the active node with shortcut `1` to active.

Shortcuts are saved in DNA to preserve them after saving/loading blend files.

Limitations:
- Only compositor node tree is supported, because shading editor has no viewer node and geometry nodes viewer works differently.

Pull Request: https://projects.blender.org/blender/blender/pulls/123641
2025-01-29 18:35:26 +01:00
Harley Acheson
05151fcd60 UI: Reduce Light Theme Icon Border Opacity
Reduce the Light Theme Icon Border Intensity from 1.0 to 0.7 to better
match the result in Blender versions prior to SVG icons. The icon
border is now done within the text shader so the result is a bit
stronger than the old method.

Pull Request: https://projects.blender.org/blender/blender/pulls/131396
2025-01-28 19:39:14 +01:00
Dangry98
e95687796d UV Editor: Add shortcut to Copy/Paste UVs
Assign Ctrl+C, Ctrl V to Copy/Paste UVs in UV Editor to the
default keymap and industry compatible keymap.

Similar to Copy/Paste splines in Mask editor.
Ref: https://projects.blender.org/blender/blender/issues/133558

Pull Request: https://projects.blender.org/blender/blender/pulls/133587
2025-01-27 19:57:28 +01:00
Falk David
1eb39a8689 Grease Pencil: Sculpt Mode Auto-Masking option
This implements all the auto masking options in sculpt mode.

* Stroke: Only affects strokes that are initially under the cursor.
* Layer: Only affect strokes in the same layer as the initial strokes under the cursor.
* Material: Only affect strokes with the same material as the initial strokes under the cursor.
* Active Layer: Only affect strokes in the active layer.
* Active Material: Only affect strokes that use the active material.

The `Active Layer` toggle in the toolbar has been moved to this panel.

Resolves #130022.

Pull Request: https://projects.blender.org/blender/blender/pulls/132986
2025-01-24 10:20:03 +01:00
Lukas Tönne
bca8fc76f9 Fix #130323: Make Grease Pencil interpolate tool retain point distribution
The interpolate tool was using a linear re-sampling of the curves, which changes
non-uniform point distributions can causes unexpected shifts in points along the
curve, even very close to an input stroke (mix factor ~0 or ~1).

This patch adds an alternative interpolation function with explicit segment
indices and fractions, which can then be computed by the interpolation tool.
The point segment factors are chosen such that each point of the input strokes
has an exact matching point in the interpolation. When the factor is close to
0 or 1 the shape of the curve thus matches the respective input exactly.

This approach is more similar to what GPv2 did, except instead of sub-dividing
each segment it simply generates a _local_ uniform sample to fit more points
into the same segment. These extra points are colinear at the extremes of the
mix factor range, so the curve matches the input curves visually.

Pull Request: https://projects.blender.org/blender/blender/pulls/130594
2025-01-21 13:36:37 +01:00
Pratik Borhade
c479e0c2de Fix #132545: Grease Pencil: Change primitive tool radius/strength with hotkey
Move keymap for brush radius/strength out of `km_grease_pencil_brush_stroke`.
Poll function of it skips primitive tools (see:`keymap_grease_pencil_brush_stroke_poll`)

Pull Request: https://projects.blender.org/blender/blender/pulls/132589
2025-01-19 10:00:18 +01:00
Harley Acheson
53fdb68bd0 Fix #79977: Light Theme NumSlider InnerSel
Slight brightening of the Light Theme Value Slider Inner Selected color
so that it can indicate which of multiple items are selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/131338
2025-01-16 17:18:37 +01:00
Casey Bianco-Davis
3f8b95f8c2 Grease Pencil: Option to subdivide last segment when closing stroke
Adds a option to add new points on the last segment to match point density.
This matches the legacy grease pencil operator.

Resolves: #125262

Pull Request: https://projects.blender.org/blender/blender/pulls/133026
2025-01-16 11:06:41 +01:00
Campbell Barton
d18fb4010c Keymap: resolve nurbs edit-mode conflict between "Repeat" & "Select Row"
Use "Ctrl-Shift-R" for select row so the "Repeat" shortcut is available.

Resolves #83123.
2025-01-14 17:56:10 +11:00
Damien Picard
100d7094f1 I18n: Disambiguate "Drag"
- In the context of physics, a force.
- In the context of UI, a mouse action.

Issue reported by Hoang Duy Tran.
2025-01-13 12:40:45 +01:00
Habib Gahbiche
9b484b5251 UI: Add hint for snapping inversion in status bar
Followup to https://projects.blender.org/blender/blender/pulls/130379

Status bar now shows correctly that pressing `ctrl` while snapping will invert snapping.

Pull Request: https://projects.blender.org/blender/blender/pulls/131009
2025-01-10 10:12:27 +01:00
Richard Antalik
8ce5356522 VSE: Text editing in preview
This commit implements most features needed for simple text editing.

Active text strip can be edited in preview by pressing tab key, which
enabled text editing mode. With this mode active, outline matches text
boundary box and cursor is drawn.

Cursor can be moved with usual keys. Pressing shift starts selection.
Selection and navigation works when text is scaled or rotated. Mirrored
text is not supported in this PR. it can be done, but the text is
unreadable that way, so I kept it simple.

Multi line text is supported. Pressing return key starts new line.

Copy/paste operator uses OS copy paste buffer, so text from other apps
can be pasted.

Text is still limited to 512 characters. Text string property still
exists in side panel and is limited to single line. Individual
characters can not be styled in different way like in 3D viewport, but
the code is mostly ready for such feature.

Ref: #126547

Pull Request: https://projects.blender.org/blender/blender/pulls/127239
2024-12-19 15:56:54 +01:00
Sean Kim
0c1ee9eba2 Texture Paint: Add keybind for "merged" option when sampling colors
The removal of the UNDO flag to prevent adding undo steps when using the
`paint.sample_color` operator results in the "Sample Merged" option
being inaccessible to users without them adding a keymap of their own.

This commit makes the following changes:
* For Texture Paint using the default blender keymap, the Shift-Ctrl-X
  keybind is assigned to this operator with the merged option set to True
* For Texture Paint, using the industry compatible keymap, the Shift-I
  keybind is assigned to this operator with the merged option set to
  True

This parameter is only relevant for 3D Texture Painting so it is not
added to the other modes.

For all other `paint.sample_color` entries in both the keymap and in
some menus, the `merge` option is explicitly set to False.

Ref: #101144

Pull Request: https://projects.blender.org/blender/blender/pulls/132047
2024-12-18 20:30:10 +01:00
ernst-ellert
c4b8210c55 VSE: Add Duplicate operator for preview region
This is implemented as macro `sequencer.preview_duplicate_move`. New
macro is needed, because different transform operator is called than in
`sequencer.duplicate_move`

Duplicate operator was modified to handle overlap and to delete sound
strips after duplication.

When strip is duplicated in preview, it will be moved to nearest free
channel above original strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/131529
2024-12-17 17:42:54 +01:00
Pratik Borhade
1debbcae1e Fix #130853: Asset shelf popup when Spacebar mapped to different actions
Similar to toolbar, when spacebar is mapped to `play`, use `shift +
spacebar` for asset-shelf popup. When spacebar mapped `toolbar`, invoke
asset shelf in paint modes. When `spacebar=search`, do not map any key
for asset-shelf popup

Co-authored-by: Julian Eisel

Pull Request: https://projects.blender.org/blender/blender/pulls/131351
2024-12-17 11:15:26 +01:00
Falk David
612be514c6 Grease Pencil: Add lasso/box erase operators in draw mode
In Blender 4.2 in Grease Pencil draw mode it was possible to
erase strokes using box and lasso gestures.

Under the hood, these were just using the selection operators
that had special deletion handling if the object was in draw mode.

Rather than hacking this into the selection operations, this adds
two new operators:
* `grease_pencil.erase_lasso`
* `grease_pencil.erase_box`

When using one of the erase operations with auto-key, the previous
keyframe will be duplicated to the current frame (for the drawings
that are affected by the eraser).

They are mapped to the same shortcuts than the selection
operators in Blender 4.2.
* Lasso erase: `Ctrl`+`Alt`+`RMB`.
* Box erase: `B`.

This is part of #130518.

Pull Request: https://projects.blender.org/blender/blender/pulls/131504
2024-12-10 11:50:05 +01:00
Christoph Lendenfeld
839f9ba948 Fix #130053: ALT+H in weight paint not unhiding bones
When in bone selection mode of during weight painting,
pressing ALT+H would unhide faces instead of bones.
Removing the keymap entry fixes that, while still allowing
unhiding of faces in face mask mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/131104
2024-12-05 12:29:36 +01:00
Richard Antalik
cffaa681c5 Fix #130944: VSE box select not working with industry compatible keymap
Commit d5d81c5078 did not update industry compatible keymap data script.

Pull Request: https://projects.blender.org/blender/blender/pulls/131033
2024-11-28 14:56:16 +01:00
Pratik Borhade
d8102b8ef7 Fix #130739: Grease Pencil: MMB to confirm primitives does not work
This is due to conficting keymap. MMB was assigned for both panning and
confirm. As mentioned in a114534295, use
shift+MMB for panning.

Pull Request: https://projects.blender.org/blender/blender/pulls/130777
2024-11-25 12:11:34 +01:00
Habib Gahbiche
35ea495bb6 UI: Nodes: Remove some snapping options
Compositor: UI: remove snapping to nodes.

Snapping nodes to other nodes behaves in a very unpredictable way, which makes most snapping options useless.

The patch removes the following:
- Snapping options `Node X`, `Node Y` and `Node XY`
- Menu `Snap Node Element`
- Menu `Snap Target`

New behavior:
- Activating `Snap` always acts as 'Snap to Grid'

Part of https://projects.blender.org/blender/blender/issues/128612

Pull Request: https://projects.blender.org/blender/blender/pulls/127667
2024-11-24 14:30:22 +01:00
Christoph Lendenfeld
f75ccd9644 Fix #130308: Missing keymap entry for bone eyedropper
Using the `E` hotkey (`I` for industry compatible) was not possible for the bone eyedropper.
This patch just adds that keymap entry for consistency.

Pull Request: https://projects.blender.org/blender/blender/pulls/130658
2024-11-21 16:48:09 +01:00
Jun Mizutani
dcec1d5f68 Fix #130365 : Hard to read brush names in Blender Light theme
Pull Request: https://projects.blender.org/blender/blender/pulls/130366
2024-11-17 17:41:01 +01:00
Campbell Barton
4306e746a5 Fix #129630: Inconsistent marker selection
- Modifications for marker selection to use the same behavior as
  key selection in the dopesheet.
- Animation editors now mask out events for the timeline (when there are markers).
- Resolve logical conflicts with the Dope sheet keymap.
- Add Shift Drag & Ctrl Drag for box select & de-select.

Pull Request: https://projects.blender.org/blender/blender/pulls/129841
2024-11-12 10:37:51 +01:00
Pratik Borhade
56beccb563 Fix: GPv3: Hide sculpt automasking properties in UI
Automasking is not functional. Better to not expose it through the UI.
See: #130022.

Pull Request: https://projects.blender.org/blender/blender/pulls/130064
2024-11-11 18:42:53 +01:00
John Kiril Swenson
65018a1557 Merge branch 'blender-v4.3-release' 2024-11-08 14:31:49 -06:00
John Kiril Swenson
8bbe0bc838 Fix #129947: VSE: B to box-select on strips
d2a802d3c6 got overzealous by removing the "tweak" property which was
actually necessary to differentiate box select on click-drag vs. box
select on B. Fix by restoring the tweak property for everything but
preview keymap items (where it doesn't actually do anything).

Main reason this happened is because the original description was a bit
too cryptic, so update it to be clearer.

Pull Request: https://projects.blender.org/blender/blender/pulls/130015
2024-11-08 21:29:53 +01:00
casey bianco-davis
a114534295 Fix #121233: GPv3: Primitives: Add missing confirm action and ability to pan viewport.
This adds `MMB+shift`/`MMB+Alt` for panning, while keeping `MMB` to confirm.

Pull Request: https://projects.blender.org/blender/blender/pulls/122813
2024-11-07 12:00:29 +01:00
casey bianco-davis
817f7c0747 Fix #121233: GPv3: Primitives: Add missing confirm action and ability to pan viewport.
This adds `MMB+shift`/`MMB+Alt` for panning, while keeping `MMB` to confirm.

Pull Request: https://projects.blender.org/blender/blender/pulls/122813
2024-11-07 11:57:56 +01:00
Hans Goudey
c7cebf5f6d Curves: Select linked pick operator
This implements the "Select Linked Pick" operator, by default exposed
in the keymap with `L` and `Shift-L`. This mirrors the existing operator
in legacy-curve edit mode and mesh edit mode.

The implementation is pretty simple, we just find the curve closest to
the mouse and change the selection of the points in that curve.

Pull Request: https://projects.blender.org/blender/blender/pulls/129885
2024-11-06 21:25:43 +01:00
YimingWu
334e9be8f4 Fix #129819: GPv3: Context menu for all paint tools
Previously the `W` menu was only available for brush tools (brush and
eraser), it should be available to all tools, thus putting the key map
registering function into `km_grease_pencil_paint_mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/129837
2024-11-05 10:36:21 +01:00
Casey Bianco-Davis
e163cc1fe0 Fix: GPv3: Do not open menu with Ctrl J
This makes it so that the `Ctrl J` keybind will run the join operator.

As there are only 2 modes and the other one already has a keybind it does not make sense to open the menu.

This matches Blender 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/129352
2024-10-30 09:00:59 +01:00
Julian Eisel
8b0206fa26 Fix: Grease Pencil: Brush selector shortcut missing in vertex paint mode
All sculpt and paint modes should bring up the brush selector asset
shelf popup on Shift+Spacebar. For grease pencil vertex paint mode the
shortcut was missing. I think it was added earlier, but only for the
grease pencil v2 keymap, the v3 one got merged later only.
2024-10-28 18:19:10 +01:00
Campbell Barton
005d439264 Fix industry compatible keymap keys for spreadsheet region toggle
Ctrl bracket keys weren't used for toolbar/UI region toggling.
2024-10-27 22:45:43 +11:00
John Kiril Swenson
d5d81c5078 VSE: Switch to box select default for timeline
PR #128051 made some improvements to code by cleaning up properties and
simplifying logic.

However, the default tool in most spaces is box select. By switching to
box select default, there should be more front-facing consistency across
spaces while still retaining near-identical behavior.

This patch would fix the small bug listed in #128671 while keeping the
simplified code benefits from #128051.

Also:
- Move selection keymap items up in the Sequencer (Global) keymap so it
  is more visible (similar to Node Editor ordering).
- Split `side_of_frame` property for ctrl press keymap item into a
  separate keymap item on ctrl click for both LCS and RCS to avoid
  clashing with ctrl+drag for box selects in RCS.

Pull Request: https://projects.blender.org/blender/blender/pulls/129028
2024-10-18 05:50:09 +02:00
Lukas Tönne
d2210df6af Fix: GPv3: Interpolate tool uses selection in paint mode
Follow-up fix for #128769.

Selection is now taken into account for interpolation tool, but should
be ignored in paint mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/129150
2024-10-17 14:09:48 +02:00
Campbell Barton
3290e33d34 Cleanup: spelling in comments 2024-10-17 11:53:47 +11:00
Campbell Barton
346bea93cc Cleanup: wrap long lines 2024-10-16 15:00:11 +11:00
Falk David
016008e097 Formatting 2024-10-15 13:04:50 +02:00
Nika Kutsniashvili
f909bf2b13 Fix: GPv3: Add missing keymaps
Adds missing keymaps in Grease Pencil modes. Two menus are also added which are needed to be called by keymaps to match GPv2.

**Paint Mode**
| Keymap | Operator |
| -------- | -------- |
| Shift I     | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Delete | Delete Active Keyframes (all layers) |
| Shift Ctrl M | Merge Layers |

**Edit Mode**
| Keymap | Operator |
| -------- | -------- |
| Shift I | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Ctrl M | Merge Layers |
| Shift Q | Edit Lines (overlay toggle) |
| Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) |
| Shift G | Vertex Groups |

**Sculpt Mode**
| Keymap | Operator |
| -------- | -------- |
| I | Animation (menu) |
| Shift I | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Delete | Delete Active Keyframes (all layers) |
| Shift Ctrl M | Merge Layers |
| Shift Q | Edit Lines (overlay toggle) |
| Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) |
| Y | Active Layer |
| U | Active Material |
| Ctrl C | Copy Strokes |
| Ctrl V | Paste Strokes |
| Shift Ctrl V | Paste Strokes (back) |
| Shift Alt A | Automasking (menu) |

**Weight Paint and Vertex Paint Modes**
| Keymap | Operator |
| -------- | -------- |
| I | Animation (menu) |
| Shift I | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Delete | Delete Active Keyframes (all layers) |
| Shift Ctrl M | Merge Layers |
| Shift Q | Edit Lines (overlay toggle) |
| Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) |
| Y | Active Layer |

Pull Request: https://projects.blender.org/blender/blender/pulls/128705
2024-10-15 11:35:57 +02:00
Philipp Oeser
58eff16cad Fix #128758: Error Message when using old Shortcut for Crease Brush
In essential brush assets, the "Crease" brush was replaced with two
crease brushes ("Crease Polish" and "Crease Sharp"), but the keymap
wasnt respecting that.

So to resolve now point Shift+C to "Crease Polish" (seems closer to what
the former "Crease" brush was.

Pull Request: https://projects.blender.org/blender/blender/pulls/128765
2024-10-10 13:54:26 +02:00
Pratik Borhade
b5c3bc5caa Fix #128759: Asset-shelf popup missing in Curves sculpt mode
`VIEW3D_AST_brush_sculpt_curves` added in wrong keymap list.

Pull Request: https://projects.blender.org/blender/blender/pulls/128779
2024-10-09 13:23:06 +02:00
Pratik Borhade
337f364f1a UI: scrolling treeview with trackpad
Invoke tree-view scroll operation for trackpad event.

Pull Request: https://projects.blender.org/blender/blender/pulls/128747
2024-10-09 13:22:23 +02:00
Campbell Barton
ea2d27cf84 Fix #128567: file selector automatically creates paths & warns
Regression in [0] which didn't account for entering paths in the
file selector which would create paths without confirming,
warning that the "confirm" property was missing.

Entering `*.*` would create `_._` for e.g in the users CWD for example.

Ref !128568

[0]: 6dd0f6627e.
2024-10-05 16:58:21 +10:00