Commit Graph

192 Commits

Author SHA1 Message Date
Jacques Lucke
01ee34ebd1 Curves: add operator to set bezier handle types
This adds an operator to set the handle types of bezier curves. It also
adds the same shortcut that is available in the legacy curve edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/120426
2024-04-10 13:08:50 +02:00
Jacques Lucke
d315a6a793 Curves: add toggle cyclic edit mode operator
This operator also exists in legacy edit mode and allows changing
whether the curve is cyclic. If all curves are non-cyclic, the attribute
is removed because it does not contain any useful information.

Pull Request: https://projects.blender.org/blender/blender/pulls/120266
2024-04-04 19:39:14 +02:00
Harley Acheson
6dd0f6627e UI: Removal of Five Operator Confirmations
Removal of confirmation dialogs for the following five operators. For
each of these the UI module felt that they are all either very explicit
actions and/or are easily undone.
* ARMATURE_OT_separate (Move selected bones to a separate armature)
* CURVE_OT_separate - “Move selected points to a new object”
* OBJECT_OT_vertex_parent_set (Parent selected ob to selected vertices)
* OBJECT_OT_parent_no_inverse_set (Make Parent w/o inverse correction)
* FILE_OT_directory_new - (Create New Directory)

Pull Request: https://projects.blender.org/blender/blender/pulls/120036
2024-03-29 01:09:15 +01:00
Sean Kim
6e997cc757 Sculpt: Add Line Hide tool
This PR adds the *Line Hide* tool and the corresponding
`PAINT_OT_hide_show_line_gesture` operator to Sculpt Mode.

*Line Hide* supports common modal functionality including:
* Snapping to angles
* Flipping the selection area
* Moving selection area

Addresses one of the tools in #80390

Pull Request: https://projects.blender.org/blender/blender/pulls/119671
2024-03-29 00:05:25 +01:00
Campbell Barton
f347706ecd Cleanup: add "unreachable" message to "assert False" statements
Clarify that these blocks are unreachable so the intention is clear
if they're ever encountered.
2024-03-15 13:20:11 +11:00
Sean Kim
68afd22501 Sculpt: Add Lasso Hide tool
This commit adds the `SCULPT_OT_hide_show_lasso_gesture` and the
corresponding Lasso Hide tool.

* Exposes the selection type for both the lasso and box hide tools
  as a option in the header
* Adds functionality into `sculpt_gesture.cc` for handling lasso
  selections with the `Outside` selection type

For `SelectionType::Outside`, the current implementation opts to not
do any filtering on the PBVH node level due to cases where the node
is mostly covered by a single gesture.

Addresses one of the tools in #80390

Pull Request: https://projects.blender.org/blender/blender/pulls/119140
2024-03-12 14:19:02 +01:00
Sean Kim
705964d7bb Sculpt: Migrate Box Hide to common gesture code
This PR migrates the existing `PAINT_OT_hide_show` operator to the
previously extracted `gesture` namespace performed in #118881

The current operator has support for choosing whether the hide / show
action is performed on every vertex inside or outside the selection
area. This has been added to the common gesture functionality too,
but no common operator property has been exposed for it for the other
Lasso / Box tools to use.

Other modes of the current "hide_show" operator have been split
into separate operators: `PAINT_OT_hide_show_all` and
`PAINT_OT_hide_show_masked`.

Prerequisite for #80390

Pull Request: https://projects.blender.org/blender/blender/pulls/119040
2024-03-06 05:25:43 +01:00
Pratik Borhade
797b9f65e6 GPv3: Select mode in Edit Mode keymap
Keymap to switch between points and stroke edit mode with 1 and 2 key resp.

Pull Request: https://projects.blender.org/blender/blender/pulls/119049
2024-03-04 12:16:25 +01:00
Sietse Brouwer
ad8180c54c GPv3: Copy and Paste operators for copying strokes and points
This PR implements the Copy and Paste operators for GPv3. The operators
are available in Edit Mode. The Copy operator copies the selected strokes/
points to a clipboard. The Paste operator pastes the  strokes/points from
the clipboard to the active layer.

Keyboard shortcuts:
- `Ctrl`-`C` for copy
- `Ctrl`-`V` for paste
- `Ctrl`-`Shift`-`V` for paste in the back (behind all existing strokes)

Pull Request: https://projects.blender.org/blender/blender/pulls/114145
2024-03-04 11:02:25 +01:00
Campbell Barton
a972988a20 Merge branch 'blender-v4.1-release' 2024-03-01 09:30:26 +11:00
Campbell Barton
f4cc984038 Fix #116844: Transform -> Move shows mouse button shortcut
The order key-maps are stored changed in [0], causing the mouse button
shortcut to be shown instead of the "G" key.

[0]: d7558a243c6b3b48669d7c084ff0cfbbc5324e6a
2024-03-01 09:22:02 +11:00
Jacques Lucke
8b3af6a68c Cleanup: make format 2024-02-29 14:22:33 +01:00
Pratik Borhade
e67059d504 GPv3: Isolate Layer keymap
Missed in 0228994d6d5492936e8e04bf2368e661e860c37b
Also include this keymap in draw mode, see: #118806

Pull Request: https://projects.blender.org/blender/blender/pulls/118894
2024-02-29 10:49:08 +01:00
Campbell Barton
239f307eb4 Fix missing keymaps for UV editor tools
Regression in fa77e9142d3465d397ff3a93d0747b4332687a42
2024-02-09 17:40:26 +11:00
Campbell Barton
4e93355187 Fix missing keymaps for UV editor tools
Regression in fa77e9142d3465d397ff3a93d0747b4332687a42
2024-02-09 17:38:44 +11:00
Pablo Vazquez
c02fd6c6d8 Revert "Outliner: Add shortcut to Add Object and Duplicate"
This reverts commit 537d1752899a37155dfaf4577412298630efc6ce.

It doesn't work well with Sync Selection and other Outliner view modes.
2024-02-08 17:15:33 +01:00
Pablo Vazquez
537d175289 Outliner: Add shortcut to Add Object and Duplicate
Add shortcuts to the Outliner for consistency and convenience:
* Add Object (Shift+A)
* Duplicate (Shift+D)
* Duplicate Linked (Alt+D)

More info and images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/117922
2024-02-07 12:00:09 +01:00
Matias Mendiola
d589251905 GPv3: Separate operator
This PR adds the "Separate" operator from GPv2.

Changes:
In GPv2 there were three modes: Selected Point, Selected Strokes and Active Layer. For better consistency with meshes Separate Operator, there are now three modes:

- Selected (point or strokes is determined by mode selection)
- By Layers (not only the active one)
- By Materials (new)

Also Multiframe selection is now supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/116715
2024-02-06 12:06:48 +01:00
Damien Picard
fa77e9142d UI: fix and improve a few messages
- "can not" -> "cannot" in many places (ambiguous, also see
  Writing Style guide).
- "Bezier" -> "Bézier": proper spelling of the eponym.
- Tool keymaps: make "Uv" all caps.
- "FFMPEG" -> "FFmpeg" (official spelling)
- Use MULTIPLICATION SIGN U+00D7 instead of MULTIPLICATION X U+2715.
- "LClick" -> "LMB", "RClick" -> "RMB": this convention is used
  everywhere else.
- "Save rendered the image..." -> "Save the rendered image...": typo.
- "Preserve Current retiming": title case for property.
- Bend status message: punctuation.
- "... class used to define the panel" -> "header": copy-paste error.
- "... class used to define the menu" -> "asset": copy-paste error.
- "Lights user to display objects..." -> "Lights used...": typo.
- "-setaudio require one argument" -> "requires": typo.

Some issues reported by Joan Pujolar and Tamar Mebonia.

Pull Request: https://projects.blender.org/blender/blender/pulls/117856
2024-02-05 17:08:17 +01:00
Matias Mendiola
dcc5725741 GPv3: Move to Layer
This PR adds the Move to Layer operator from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117244
2024-02-05 12:02:51 +01:00
casey bianco-davis
1b6e3d46a9 GPv3: Add stroke_reorder operator
This implements the `stroke_arrange` operator for grease pencil v3.
This behaves the same as `GPENCIL_OT_stroke_arrange` but renamed to `stroke_reorder`.
It should be more clear what the operator does.

Note: This also adds new key binds.

Co-authored-by: Falk David <filedescriptor@noreply.localhost>
Pull Request: https://projects.blender.org/blender/blender/pulls/116682
2024-02-01 13:15:23 +01:00
Falk David
cb9fef3841 Cleanup: GPv3: Default keymap definitions 2024-01-26 15:24:00 +01:00
Christoph Lendenfeld
87fc8e8ddd Anim: Add hotkey for keying set operators
This is in response to feedback to the changes from #113504
While it does simplify inserting keyframes,
sometimes artists want to insert keys only to e.g. Location.
This takes longer to do now, since the option is in a menu.

This PR changes the following:

* new `K` hotkey to bring up the "Keying Set" menu.
This will always show the menu, even if a keying set is active.

* `Shift + K` will open a menu to set the active keying set

* with "Pie Menu on Drag" enabled in the user preferences,
hitting `I` and moving the mouse will bring up a pie menu
to insert only specific transform channels

Conceptually this separates the keying set behavior from the
insert keyframe behavior.
`I` will always add keyframes.
While `K` always shows keying set options.

Pull Request: https://projects.blender.org/blender/blender/pulls/115798
2024-01-25 14:46:04 +01:00
grady
796577d76e Outliner: Double-click on item icon to select contents/hierarchy
Allow double-clicking on Outliner items to select all child items.

Pull Request: https://projects.blender.org/blender/blender/pulls/110151
2024-01-17 00:45:43 +01:00
Campbell Barton
0efb5a39e2 UI: show shortcut for "View Selected" in the pie menu
Remove redundant use_all_regions property in the key-map,
while this isn't wrong it causes the properties not to match
the pie menu item, the shortcut then fails to display.
2024-01-15 14:35:23 +11:00
Casey Bianco-Davis
33b4964c0c GPv3: Sample color
This adds the ability to use the `sample color` operator in GPv3

Pull Request: https://projects.blender.org/blender/blender/pulls/116235
2024-01-12 11:11:55 +01:00
laurynas
0d964f91a2 Curves: Add extrude operator
Adds extrude operator to new curves. Press key E in edit mode to invoke.
It works correctly on Bezier curves also, but result is weird as there is no
way to control Bezier handles interactively. Currently operator works the
same way as in old curves.

Algorithm idea is same as in https://archive.blender.org/developer/D15524

Pull Request: https://projects.blender.org/blender/blender/pulls/116354
2024-01-10 17:26:54 +01:00
129fb2eab8 Anim: make bone collections hierarchical
Make it possible to nest bone collections. The data structure on the
armature is still a flat array. It is organised as follows:

- Sibling collections (i.e. ones with the same parent) are stored
  sequentially in the array.
- Each bone collection keep track of the number of children, and the
  index of the first child.
- Root collections (i.e. ones without parent) are stored as the first
  elements in the array.
- The number of root collections is stored on the Armature.

This commit also contains the following:

- Replaced the flat UIList of bone collections with a tree view.
- Updated the M/Shift+M operators (move/assign to collection) to work
  with hierarchical bone collections.
- Updated RNA interface to expose only root collections at
  `armature.collections`. All collections are available on
  `armature.collections.all`, and children at `bonecollection.children`.
- Library override support. Only new roots + their subtrees can be added
  via overrides.

See https://projects.blender.org/blender/blender/issues/115934

Co-authored with @nathanvegdahl and @nrupsis.

Pull Request: https://projects.blender.org/blender/blender/pulls/115945
2023-12-28 18:14:55 +01:00
Jeroen Bakker
2bb7d767c4 EEVEE-Next: Add Raytracing Presets
This PR adds raytracing presets. It contains a preset with default settings and
users are able to add their own.

Pull Request: https://projects.blender.org/blender/blender/pulls/116223
2023-12-24 22:17:31 +01:00
Hans Goudey
0e8c874166 Curves: Add edit mode tilt control
Adds support for the tilt transform operator and a "Clear Tilt"
operator to mirror the functionality from the legacy curve type.
2023-12-16 12:08:28 -05:00
Hans Goudey
c02784bd4f Cleanup: Make format 2023-12-11 15:47:11 -05:00
Hans Goudey
dcf9d74cba Cleanup: Remove unused curves keymap items 2023-12-11 15:47:11 -05:00
Hans Goudey
9af176bfe6 Curves: Add edit mode duplicate operator
Reuse the grease pencil implementation added in:
- fb275bc040c1d6e8e23d57e6f818b854a067276d
- 5799a26568819ce27e8c12df96b7ffba84cc00f9
2023-12-11 15:47:11 -05:00
laurynas
feae0b4173 Curves: Support for edit mode draw tool
Adds new curves support to "Draw Curve" operator. This is a direct copy
and replace of the old code to the new editors directly, with a change to
create the new data structure instead of the old one. There is no attempt
at code deduplication, since that would complicate removing the old
curve type when it comes time.

To replace the "2D curve" option a new operator property is added
for projecting to the Z=0 plane.

Pull Request: https://projects.blender.org/blender/blender/pulls/115864
2023-12-11 19:44:19 +01:00
Campbell Barton
9ddd5126fe Fix #115887: Fallback tool only tweaks single elements
Use the same pass-through option when the select tool is used as a
fallback.
2023-12-08 18:09:51 +11:00
Falk David
35b9e37295 Fix #115716: Empty Grease Pencil Keymap Warning
This fixes the keymap warning by removing (commentting) the empty
keymap. Once we have something to assign, we can uncomment it.

Pull Request: https://projects.blender.org/blender/blender/pulls/115796
2023-12-05 14:45:52 +01:00
Campbell Barton
32c5ea6262 Cleanup: format 2023-12-02 14:56:12 +11:00
Hans Goudey
0978f9486e Sculpt: Remove redundant "reveal all" operator
This operator (`SCULPT_OT_reveal_all`) is redundant with
the "Hide Show" operator (`PAINT_OT_hide_show`). Since
the latter was recently changed to be much faster, remove the
former and update keymaps and menus. The industry compatible
keymap actually already contains the hide/show operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/115629
2023-12-01 17:32:09 +01:00
Christoph Lendenfeld
24ae0e3666 Fix: script_validate_keymap test failed
The issue was that `("value", True)` was passed in
when this is not supported. It didn't break while running
but it did break the test.
2023-12-01 15:32:32 +01:00
Daiki Hashimoto
edcac1f48b Fix #44834: Add bone selection icon next to face and vertex selection in weight paint mode
Currently, in weight paint mode, there is an icon for
face and vertex selection mode, but there isn't one
for the default mode where the user can select a bone
in any tool by alt clicking.
This lack of indication might lead to confusion for the users
when they are not able to select a bone by
alt clicking during weight painting.

By adding a bone selection icon when there is a pose
mode armature, we can communicate to the user that:
1. they can select a bone while the bone selection icon is active.
(when they are not in face or vertex selection mode)
2. they have forgot to select an armature when entering
weight paint mode by not showing the bone selection
icon at all when there is no pose mode armature.

When the bone selection icon is inactive,
the user can't select a bone.
(alt clicking selects face and vertex mode's respective element)

When no armature is selected when entering weight paint mode,
the bone selection icon doesn't show up indicating that the user
has forgot to select an armature.
(The user is also unable to select a bone by alt clicking.)

## Selection tool for bone selection mode
Currently, while selection tools exist for face and vertex
selection mode, one doesn't exist for the default mode
(bone selection mode). As the default mode will be getting
a clear indicator that it will function as a bone selection mode,
I added a selection tool entry for the bone selection mode.

Face and vertex selection modes has the shortcut 1 and 2,
so it seemed natural to give bone selection mode the shortcut of 3.

Pull Request: https://projects.blender.org/blender/blender/pulls/115409
2023-12-01 13:38:58 +01:00
Antonio Vazquez
11f606f88f GPv3: Menu to Select Material using U key
This PR includes the popup menu used to select a material pressing `U` key.

The menu is used in Draw, Sculpt and Vertex paint mode in GPv2 but this patch only includes Draw mode because other modes are not avaliable in GPv3 yet.

Related to #114203

Pull Request: https://projects.blender.org/blender/blender/pulls/114694
2023-12-01 13:12:10 +01:00
Matias Mendiola
b8a785b65b GPv3: Show and hide layers operators
- New Operator: GREASE_PENCIL_OT_layer_hide
- New Operator: GREASE_PENCIL_OT_layer_reveal
- Added menus to Edit and Draw Modes
- Added Keymap via _template_items_hide_reveal_actions()

Note: Operator names were changed for consistency with other layers operators that use _layer_ on their names

Pull Request: https://projects.blender.org/blender/blender/pulls/114348
2023-12-01 12:55:30 +01:00
casey bianco-davis
fb275bc040 GPv3: Duplicate Points operator
Adds the duplicate points operator fallowing the legacy system.

Resolves #113640
Pull Request: https://projects.blender.org/blender/blender/pulls/115389
2023-12-01 10:14:14 +01:00
Clément Busschaert
671f428ead GPv3: "Set Active Layer" operator and menu
Resolves #113915 .

Ports the `layer_active` operator to set the active layer from an index.
Adds the menu to set the active layer from a list.

Pull Request: https://projects.blender.org/blender/blender/pulls/115606
2023-11-30 16:10:06 +01:00
Christoph Lendenfeld
a99e419b6e Anim: Insert keyframes without keying sets
When animators want to key something in the viewport,
the code needs to know *which properties* should be keyed of that selected thing.
So far that was done with keying sets, and a pop-up that let's
you choose the keying set to use. You can get rid of the popup by
choosing a keying set ahead of time. But that is also not always desirable.

That pop-up is quite confusing and gives way too many options.
To simplify this process this PR adds a User Preference option to choose one or more of:
* Location
* Rotation
* Scale
* Rotation Mode
* Custom Properties

Now whenever the `I` key is pressed in the viewport,
and no keying set is enabled, it reads the preferences for which channels to insert.

# User Facing changes
* The popup will not be shown when pressing the hotkey,
 but you can still explicitly use keying sets by going to the menu
* Which channels are keyed is defined by a User Preference setting under animation
* when a keying set is used explicitly, the User Preference settings are ignored

Part of #113278

Pull Request: https://projects.blender.org/blender/blender/pulls/113504
2023-11-21 15:38:01 +01:00
Germano Cavalcante
0f2988fd2c Revert preset changes in c6db3f98bb
This partialy reverts commit c6db3f98bbc152a9c839010f25fffbbdff576660.

The presets are case-sensitive, as explained in issue #110642.
2023-11-20 19:41:25 -03:00
Pratik Borhade
bf7d4ef054 Fix #115025: Transform operations not working in particle edit mode
Earlier 3d-view keymap was used by particle edit mode for transform
operation. After d7558a243c, this global transform keymap is removed.
So add `_template_items_transform_actions` in particle-edit mode to
allow transforming from shortcuts.

Pull Request: https://projects.blender.org/blender/blender/pulls/115031
2023-11-18 07:37:03 +01:00
Nate Rupsis
661e7e451a Anim: Rename NLA "Channels" to "Tracks"
Updating "NLA Channel"  to "NLA Tracks" across board, since the terminology "Tracks" is the most prevalent in operators, code, etc.
2023-11-16 17:59:18 +01:00
Germano Cavalcante
c6db3f98bb Fix modal key assignment for "Rotate Normals" in keymap versioning
Error in 78943edc5d

The key was not included in the appropriate condition block, leading to
an error.
2023-11-13 09:47:10 -03:00
Germano Cavalcante
78943edc5d Transform: Custom modifier to navigate while transforming
Discussed in #114646.

This commit transforms the "alt_navigation" option of the transform
operators into a new modal key item. "PASSTHROUGH_NAVIGATE"

In addition to cleaning up a lot of the code, it allows you to
customize the key chosen to navigate while transforming.
2023-11-09 21:33:34 -03:00