Commit graph

619 commits

Author SHA1 Message Date
Sean Kim
93d2971f53 Cleanup: make format 2026-09-22 18:41:55 +02:00
Casey Bianco-Davis
44c411cd5d Grease Pencil: Use Unified Paint Settings in Draw Mode
This makes it so that all the draw mode tools can use
the `Unified Paint Settings`.
Similar to other modes, the toggle for using unified settings is exposed
in the side panel and in the context menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/160195
2026-09-22 16:54:02 +02:00
Pablo Vazquez
d07c0815da Fix: UI: Remove extra separator in View panel
Found during UI Module workshop at BCON26.
2026-09-22 13:01:37 +02:00
Sybren A. Stüvel
90ed330a82 Anim: improve UI of Replace Action operator
Three small changes that improve the Replace Action UI:

- Add "..." to the label in the menus, to indicate there will be a
  popup.
- If the old or new Action cannot be found, show the Action names
  without the `AC` ID type prefix.
- If the old and new Action are the same, show "Cannot replace Action
  with itself" instead of the more cryptic "Invalid old/new Action
  pair".

Pull Request: https://projects.blender.org/blender/blender/pulls/163959
2026-09-15 16:22:28 +02:00
Casey Bianco-Davis
349fc27092 Grease Pencil: Basic Draw Mode edit operators
This adds support for some of the basic edit mode operators
in Draw Mode:
- Circle, Box, and Pick selection tools.
- Copy and Paste operators.
- Delete operator.
- Transform operators.
- Draw mode `Stroke` menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/162890

Note: The `x` and `b` keybind for delete and box select has not be added
because `x` is already used for swapping the brush colors and `b` is
used for box delete.

Co-authored-by: Falk David <falk@blender.org>
2026-09-14 09:58:33 +02:00
Casey Bianco-Davis
c79e6b58ab Viewport: add ability to flip the camera view
Support flipping the camera view.
A new operator `Flip View` is added in `View` > `Navigation`.

Currently, it's mainly designed for Grease Pencil where camera
view is the "canvas".

When the view is flipped it will be displayed in the `General
Info` text.

Also updates Passepartout and Render borders to properly
account for the flip.

Ref !161274
2026-09-11 10:38:45 +10:00
Guillermo Venegas
bad8871dc5 UI: Add UILayout::property_split_factor static value
This adds the `UILayout::property_split_factor` property which contains
the split factor used in the layout system, and avoids to use the this
as raw value all over the place.

Pull Request: https://projects.blender.org/blender/blender/pulls/163393
2026-09-09 00:27:44 +02:00
Sean Kim
1a6eeebb9a Fix: UI: Show correct size value in texture paint context menu
Pull Request: https://projects.blender.org/blender/blender/pulls/163551
2026-09-05 03:22:41 +02:00
Sean Kim
a7a53fd5a5 Fix: UI: Incorrect experimental texture paint brush options show
We need to check against the current brush instead of only the
experimental flag.
2026-09-05 03:22:40 +02:00
Sean Kim
1feb1674bc Texture Paint: Migrate 3D draw brush out of Sculpt Mode
This commit moves the experimental 3D Texture Paint brush implementation
out of Sculpt Mode and into Texture Paint mode.

Instead of overriding the "Paint" brush in Sculpt Mode, it now
corresponds to the "Draw" brush in Texture Paint.

This is achieved by extending the existing `PAINT_OT_image_paint`
operator to use a different `PaintStroke` implementation if a supported
brush is being used with the experimental flag toggled.

Part of #162290

Pull Request: https://projects.blender.org/blender/blender/pulls/163220
2026-09-04 22:07:08 +02:00
Falk David
0135a6b6ac Grease Pencil: Basic selection support in Draw Mode
Implements basic selection support in Draw Mode. For now, there's not
much users can do with the selection. Following PR's will add operator
support.

* Add selection overlay support. Only show selected edit lines.
* Only support stroke selection.
* Expose lasso selection tool and some operators. E.g. select all/none.

Ref: #161558.

Pull Request: https://projects.blender.org/blender/blender/pulls/161685
2026-09-03 11:22:45 +02:00
bravo09
ef062185d5 Modeling: add quad-sphere primitive
The Quad-Sphere is commonly used in sculpting and subdivision modeling.

There are two formulas exposed:
- Even Area: For the best area distribution.
- Even Angle: Useful as the profile forms an exact circle,
  useful for joining with other circular shapes (cylinders).

Ref !161684

Co-authored-by: Campbell Barton <campbell@blender.org>
2026-09-03 10:27:23 +10:00
quackarooni
a43e2c113d UI: Rigid Body: Use search popup for Calculate Mass operator
When called, the `Calculate Mass` operator invokes a very long menu
that doesn't fit on screen and is cumbersome to navigate.

This patch replaces that with a search popup, as it's more compact and
allows the user to find the option they want more quickly.

Pull Request: https://projects.blender.org/blender/blender/pulls/163316
2026-09-01 21:19:40 +02:00
Sean Kim
1a7349a638 Fix #160613: Python error when right clicking with filter tool
The `UnifiedPaintPanel` helper can behave poorly when dealing with
non-brush tools, like the Filter tools reported in the original issue.
To fix the python error, pass in the `UnifiedPaintSettings` explicitly.

Pull Request: https://projects.blender.org/blender/blender/pulls/163117
2026-08-26 00:29:33 +02:00
Jerry Wei
6ecfe4e810 Paint: Migrate unified paint flag from scene / mode level to brush level
This PR moves the controls of "Use Unified xxx" (such as Use Unified
Size) from the scene / mode level to the brush level, meaning each brush
can have this option toggled on and off separately. It used to be that
every brush shares the same toggle state.

I moved the `UNIFIED_xxx` flags from `UnifiedPaintSettings` to `Brush`.
Ialso added relevant RNA properties and hooked them up to Python
scripts.

Resolves #138469

Pull Request: https://projects.blender.org/blender/blender/pulls/159382
2026-08-18 00:21:23 +02:00
Jerry Wei
74143fb470 UI: Add "Shape" panel to brush settings
This PR merges Hardness, Tip Roundness, Tip Scale X into the Falloff
panel and renames it to the Shape panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/160135
2026-08-14 23:57:57 +02:00
Campbell Barton
598299ba49 UI: Add View Roll Reset operator
Resets the camera roll, outside of camera view the global Z-up is used.

Exposed in the view navigation menu.

Ref !162225

Co-authored-by: Campbell Barton <campbell@blender.org>
2026-08-14 09:07:56 +10:00
Brecht Van Lommel
8d4c692591 Render: Make pause/resume a native RenderEngine feature
Instead of Cycles implementing it. This fixes various corner cases that
were not handled correctly by the new auto pause during render feature.

When a RenderEngine implements view_pause and view_resume methods, the
pause button will be drawn in the 3D viewport header, and notify the
engine on changes (in addition to auto pause).

The old Cycles pause property is preserved to avoid breaking scripts,
but it no longer does anything. The only add-on that I could find using
this was auto pausing during baking. That is now implemented as well.

Ref #156536

Pull Request: https://projects.blender.org/blender/blender/pulls/162437
2026-08-11 14:47:14 +02:00
Nika Kutsniashvili
6a5afc1480 UI: Remove "Add Primitive" menu from Sculpt
This menu should not have been added. It does not initialize operators
(which is what should be happening in menu layouts), it switches the
active tool.

This is (a) not needed at all, since this is the slowest method of
switching to a tool, and there are other ways, and (b) not supported
by layout. Text isn't aligned, and tooltips don't render correctly for
example. Tool operators are meant to be rendered in Toolbar and they do
not account for this case.

Ideally we would replace them with just operators that start drawing
shapes immediatelly, but this is not possible now, because operators
themselves are made specifically to be used with gizmos and are not
supported otherwise without some changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/161903
2026-08-05 19:59:09 +02:00
Christoph Lendenfeld
db9fd84d4e Anim: Convert animation between rotation modes
This adds code to convert animation from one rotation mode to another.
There are multiple ways to do the conversion:
* Using Ctrl+R in pose mode
* In the 3D viewport, open the "Object" or "Pose" menu, under
"Animation" there is a new entry "Convert Rotation Mode"
* Using the python API `convert_rotation_mode()` either on bones or
objects

**Important Behavior**
* The result of the operation is always a fully keyed rotation, even
if previously only a single channel was keyed. This is the only way
to ensure that the rotations line up.
* Interpolation may not match. In fact it is expected not to.
This is desired for animators for when they are running into gimbal
lock and they just want to try if a different rotation mode works better.
* In case interpolation *has to* match, there is an option to insert
keys on every frame before the conversion.
* key types are somewhat preserved. We assume that for any given
frame, all rotation keys are the same type.
* keys on all related actions are converted, that includes the NLA

Even though the animation data conversion could be triggered
automatically by changes to the rotation_mode RNA property, I chose not
to do that for a reason.
This may be set directly via python in an addon and we shouldn't
include the costly (and maybe unexpected) side effect of converting
animation.

This adds a new operator `anim.rotation_mode_convert` instead of
modifying the existing `pose.rotation_mode_set`.
Since the operator now works with objects as well, it's probably better
to move it out of the `pose` category.
`pose.rotation_mode_set` and `pose.convert_rotation` from rigify are
deprecated with a warning that pops up every time you execute them.

**Implementation**
The core of the changes are in `anim_convert.cc`.

* `convert_to_rotation_mode` is a high level function that converts
the rotation for a single transformable.
* `build_rotation_fcurve_map` and `convert_rotation_keys` are two
functions that work in concert. The first builds the data structure
to quickly find FCurves by their RNA path and the second consumes
that data to do the conversion.
* `bake_rotation_fcurves` utility function to bake FCurves before
converting their rotation.

This uses the `AnimTransformable` class to make this functionality
available to objects and bones at the same time.
When dealing with multiple transformables, we would need to iterate
the action for each to find the FCurves for it.
To avoid that I added `ChannelbagFCurveMap` which is created by
`build_rotation_fcurve_map`.
With that we can easily iterate iterate the FCurves of each Channelbag
sorted by RNA path.

`KeyframeIterator`
Is a new helper class to iterate all frames with keys of N FCurves.

**Deprecates** the existing `POSE_OT_convert_rotation` operator and
removes it from the pose menu.

Resolves #149607
Resolves #159131

Design: #137281

UI improvements will be handled in a separate PR: !159981

Pull Request: https://projects.blender.org/blender/blender/pulls/154309
2026-07-20 15:31:01 +02:00
RedMser
8ebfcce398 Curves: new sculpt Cut brush
New Cut brush for Curves sculpt mode.

- Supports spherical and projected falloff shape
- Respects selection of points
- Moves the "last" point to the exact location that the brush has cut
  the curve, using a sphere-line-segment or circle-line-segment
  intersection
- Strength of brush is used as a "chance to omit a curve" (similar to
  how particle edit mode does it)

Resolves #96450

Pull Request: https://projects.blender.org/blender/blender/pulls/131755
2026-07-13 17:14:42 +02:00
Christoph Lendenfeld
323d5a0758 Anim: Replace with duplicate Action operator
Add a new operator `Replace with duplicate Action`.
Similar to `Replace with new Action` this looks at the action
of the active object and replaces all users of that action with
a duplicate.

Pull Request: https://projects.blender.org/blender/blender/pulls/158258
2026-07-13 11:44:31 +02:00
Pratik Borhade
37fbb9e22c Fix #160076: GP: New Deselect Linked missing from the menus
Missed during 66ee7f79c9
Add `deselect linked` operator inside select menu of grease pencil

Pull Request: https://projects.blender.org/blender/blender/pulls/160958
2026-07-10 11:37:38 +02:00
Tariq-Sulley
59a996b74b Modeling: Relax from looptools
Adds a new builtin operator called relax ported
from the looptools addon that smooths edge loops.

Pull Request: https://projects.blender.org/blender/blender/pulls/155615
2026-07-09 10:44:58 +02:00
Sean Kim
8704773557 Paint: Add support for automasking in Vertex & Weight Paint
This commit adds support for brush and scene level automasking into
Vertex and Weight Paint mode. The following options are supported:

* Topology
* Mesh Boundary
* Cavity & Inverted Cavity
* View Normal
* Area Normal

Face set automasking is not supported, as face sets do not currently
display in either mode. Additionally, none of the operators that create
dedicated masks are available, as masks are not displayed in either mode
as well.

The pie menu is also exposed for easy access to these properties via
`Alt-A`

Part of #156409

Pull Request: https://projects.blender.org/blender/blender/pulls/158071
2026-07-09 01:41:45 +02:00
Sam Aoudi
f650388695 Fix: UI: Show shortcut for armature Dissolve Bones in menu
This is due to an operator context mismatch between the keymap and the
UI item. Dissolve Bones is added under `EXEC_AREA` in
`VIEW3D_MT_edit_armature_delete.draw()`

Part of #159616

See PR description for images

Pull Request: https://projects.blender.org/blender/blender/pulls/160763
2026-07-08 05:47:21 +02:00
Pablo Vazquez
0e5263ff5b UI: Replace use of Info, Warning, and Error icons
Instead of reusing `ERROR` for both warnings and errors, and the Info
Editor icon for "info" label comments, use the new icons from !161002.

* Use `STATUS_WARNING` when the code refers to simple warnings, the
  feature might still work.
* Use `STATUS_ERROR` when the code refers to incompatibility, broken
  functionality, general errors.
* Use `STATUS_INFO` for every info label. Keep `INFO` for the editor.
* Sometimes `WARNING_LARGE` was used, that should only be used for
  dialogs. Use the regular warning instead, it looks almost the same.
* When extra contrast is needed, the filled version is used.

Mostly no big visual changes, other than warnings that were meant as
actual errors using the proper icon now.

See !161038 for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/161038
2026-07-05 14:27:56 +02:00
Eitan Traurig
97e86aef26 UI: Reverse order of delete operators in Object Menu
Images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/160628
2026-07-02 21:13:26 +02:00
RedMser
7c00566f74 Anim: Add "Align to Transform Orientation" to armature pose mode
Exposes the "Align to Transform Orientation" operator for armature
pose mode. Edit mode has some additional quirks, which is why it is
currently not exposed there.

This commit also renames existing `Align Bones` operator to better
clarify what it aligns to (to avoid confusion between two "Align"
operators.

Pull Request: https://projects.blender.org/blender/blender/pulls/159749
2026-06-22 19:41:15 +02:00
Bastien Montagne
fd5ea60a8a Merge branch 'blender-v5.2-release' 2026-06-22 15:39:20 +02:00
Christoph Lendenfeld
8b23d0d92d Cleanup: variable name in space_view3d.py
use explicit `operator_context` instead
of short `ctx`
2026-06-22 14:41:57 +02:00
Christoph Lendenfeld
fe5ab1bd2e Merge branch 'blender-v5.2-release' 2026-06-22 13:25:02 +02:00
Christoph Lendenfeld
afe075cc17 Fix: Bone Transform tool for envelope distance not working
Caused by fc0bdbf779

In the above commit, the menu operator was not updated to
the correct mode for envelope distance. That is now fixed.

Found by brechts LLM [1]

[1] https://projects.blender.org/llm-test/llm-reports/src/branch/main/llm_review/log_2026_w25.md#fix-152822-bone-envelopesize-tools-affect-the-wrong-properties

Pull Request: https://projects.blender.org/blender/blender/pulls/160480
2026-06-22 13:10:13 +02:00
Lukas Tönne
b5e21e421a Merge branch 'blender-v5.2-release' 2026-06-22 12:47:16 +02:00
Christoph Lendenfeld
6c3008ac99 Fix #160425: Wrong operator context for pose slide menu
The pose slide operators only make sense when running with
"invoke". However when assigning a hotkey to the menu, they
would be run in an "exec" context.
The fix is to override the operator context for the menu operators.

Pull Request: https://projects.blender.org/blender/blender/pulls/160477
2026-06-22 09:53:37 +02:00
Eitan Traurig
b207b277e3 UI: Add missing delete and duplicate icons
- Add Duplicate and Delete icons
- Reorder Delete by moving to the bottom

Pull Request: https://projects.blender.org/blender/blender/pulls/159814
2026-06-13 13:07:58 +02:00
Sean Kim
8eaee263f6 Refactor: Make UnifiedPaintPanel paint_settings more explicit
The existing `UnifiedPaintPanel.paint_settings` helper function is
commonly used, but has some nuance to the usage that is non-obvious from
the naming. Because it does filtering both on the space type and the
tool system information, there may be cases where it returns `None`
where we otherwise know the correct `Paint` struct to be used.

This commit renames the primary usage to
`paint_settings_from_active_tool` and adds a new overload,
`paint_settings_from_mode`, which can be primarily used in the context
of methods drawing information about specific modes, rather than general
functionality.

Pull Request: https://projects.blender.org/blender/blender/pulls/159826
2026-06-09 21:01:55 +02:00
Pratik Borhade
1af1d6026d Merge branch 'blender-v5.2-release' 2026-06-09 15:39:06 +05:30
Nika Kutsniashvili
03c09fe3cc Fix: Some operators missing from Armature Transform menu
78b81795c2 moved some operators from base menu class to
`VIEW3D_MT_transform`. Armature object type had it's own panel and
didn't follow the general one, this results in "Warp" and "Randomize"
operators being missing from transform menu in armature edit mode.
To fix this, add those entries in Armature menu.

Also fixed an incorrect separator placement.

Bug and fix detected by LLM weekly report

Pull Request: https://projects.blender.org/blender/blender/pulls/159807
2026-06-09 12:07:20 +02:00
Eitan Traurig
e78cb53426 UI: Add missing 'X' icons to delete operators
Images in the PR.

Adds missing `X` icons to delete operators, plus couple small tweaks.

Pull Request: https://projects.blender.org/blender/blender/pulls/159718
2026-06-08 18:32:53 +02:00
Eitan Traurig
8360731a9f UI: Add missing icons in context and "Object" menus in 3D viewport
Add the `X` icon to all uses of the delete operator in object mode.
Add the `Duplicate` icon to Duplicate Objects in the Object menu.

Images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/159595
2026-06-06 10:41:54 +02:00
Sean Kim
010b904e5a Weight Paint: Update default settings and bundled assets
This PR makes a number of changes to the bundled essential brush assets
for Weight Paint, along with a number of other mode / default changes
to improve the experience for beginners.

### Brush Changes

* The default brush is now the "Add Weight" brush, which uses the "Add"
  blend mode, accumulation, and a low strength.
* The existing "Paint" brush is renamed to "Set Weight" and now has a
  Constant falloff curve. This brush also has a new icon to distinguish
  it from the "Add Weight" brush.
* The "Blur" brush has been changed to use accumulation with a low
  strength.
* For all brushes, the stroke spacing has been changed to 5% to feel
  more responsive.
* For all brushes which formerly used a Custom falloff curve that
  approximated a smoothstep function, the built-in "Smooth" curve is
  now used.

### Mode Changes
* Multi-Paint defaults to enabled
* Auto-Normalize defaults to enabled
* Mirror Vertex Groups defaults to enabled

Along with the above, the asset shelf is now shown by default in Weight
Paint mode, as there are now more brushes than tools in the toolbar.

Only the default startup files will use these new options, for existing
files, if the old "Paint" brush was active, the new "Add Weight" brush
will be active upon loading.

See #149470 for further context.

Asset PR: blender/blender-assets!67

Pull Request: https://projects.blender.org/blender/blender/pulls/158671
2026-06-05 23:34:27 +02:00
Christoph Lendenfeld
d00c0d81e0 Anim: Pose Slide operators for objects
This implements the pose slide operators for objects.
It extends the `AnimTransformable` API to support objects,
which makes most of the pose slide code work right away.

The auto keying code had to be adjusted because it used
the "Whole Character" keying set which doesn't work for
objects.

Discussed in an animation & rigging module meeting [1]

Part of #156579

[1] https://devtalk.blender.org/t/2026-05-28-animation-rigging-module-meeting/45331#p-162762-ongoing-work-5

Pull Request: https://projects.blender.org/blender/blender/pulls/158906
2026-06-02 10:34:38 +02:00
Nika Kutsniashvili
78b81795c2 UI: Reorganize "Transform" menu
"Transform" menu appears in Object Mode and edit modes, and there are
operators that work in both, and operators that work only in Object
mode, or only in edit modes.

Previously, those operators were mixed, and because of that, navigation
was more difficult. From users POV this was perceived as items jumping
around based on mode.

To avoid this create a clear separation. Have shared operators always
grouped at the top, followed by a separation and mode-specific
operators. This way item order stays the same always.

Images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/159331
2026-05-30 13:29:25 +02:00
Pratik Borhade
793fd943f3 Revert "UI: Add "Link to Scene" operator in Outliner context menu for objects"
This reverts commit 21db30bfb2.
2026-05-29 17:01:27 +05:30
1P2D
21db30bfb2 UI: Add "Link to Scene" operator in Outliner context menu for objects
Linking an Object to another Scene was only possible
from "3D Viewport → Object → Link/Transfer Data" menu.

This PR adds the operator in objects context menu in Outliner as well.

Additionally, an incorrect error message of the operator is also
updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/159007
2026-05-29 11:48:53 +02:00
Jonas Holzman
8b69e79018 Cleanup: UI: Remove color argument from template_palette calls in Python UI scripts
This fixes a few warnings on startup due linked to template_palette
being called with too many argument. This trailing named argument was
removed in commit 79a60b4816 due to it not being used in logic (also
added to 5.2 release notes PyAPI changes).
2026-05-26 18:01:57 +02:00
Tariq-Sulley
abf193c6f8 Modeling: Space Evenly from looptools
Adds a new builtin operator called "space edge loops evenly" ported from
the looptools addon that spaces selected vertices evenly across a
connected chain of edges.

Pull Request: https://projects.blender.org/blender/blender/pulls/154933
2026-05-21 16:19:37 +02:00
Christoph Lendenfeld
f67497581b Anim: Duplicate rename operator for bones
This implements an operator that duplicates edit bones
and does a search replace at the same time.
Crucially, the search replace is done before name collisions
are checked so this avoids a potential rename to append `.001` by
blender.

When the "replace" is left empty, the "search" is just removed.
The search and replace has no fancy regex logic built in.

When called, the operator pops up a GUI

On a technical level this is very much identical to the existing
`ARMATURE_OT_duplicate` but I had to create a separate
operator that has an invoke function for the menu. Otherwise the menu
pops up every time you press `shift+D`.
I refactored out a separate function to avoid code duplication

Pull Request: https://projects.blender.org/blender/blender/pulls/154553
2026-05-12 11:07:43 +02:00
Tariq-Sulley
b35c52b395 Modeling: Flatten from looptools
Adds a new builtin operator called flatten
ported from the looptools addon that flattens
selected vertices on a best fitting plane

Pull Request: https://projects.blender.org/blender/blender/pulls/157166
2026-04-27 16:07:52 +02:00