Commit Graph

151639 Commits

Author SHA1 Message Date
Guillermo Venegas
3cd285d7f0 Cleanup: UI: Remove unused pie menu functions
I couldn't find exactly when it was stopped being used,
but seems that this has some years with no use.

Pull Request: https://projects.blender.org/blender/blender/pulls/141435
2025-07-04 18:29:05 +02:00
Falk David
cc7f1a2b52 Merge branch 'blender-v4.5-release' 2025-07-04 18:05:43 +02:00
Falk David
eff92923ec Fix: Grease Pencil: Soft eraser leaves points with zero opacity
The soft eraser could leave points with zero opacity. To fix this issue
for now, we apply a post-process step when the stroke is done to remove
these points.

In the future, it would be better to refactor the eraser a bit more and
delete points during the stroke.

Part of #131686.

Pull Request: https://projects.blender.org/blender/blender/pulls/141454
2025-07-04 17:22:49 +02:00
Dalai Felinto
2c9d14f9c4 Merge remote-tracking branch 'origin/blender-v4.5-release' 2025-07-04 16:08:45 +02:00
Dalai Felinto
7d3b93ed4e Multi-View: Fix (unreported) wrong icons for disabled Render Views
This is likely broken since 60cc73afe6, when I sorted the icons
alphabetically.

Multi-View lives on!
2025-07-04 16:05:49 +02:00
Pratik Borhade
a559fb833c Tree View: Multi-select support
Add support to select multiple tree view elements (similar to outliner/anim channels)
`Ctrl + LMB` to select+activate element under the mouse
`Shift + LMB` to select all items between active and clicked item.

As of now, only Shape key has support for multi-select. (straightforward to include
other views). `KEYBLOCK_SEL` flag is used for storing selection state.

Pull Request: https://projects.blender.org/blender/blender/pulls/138979
2025-07-04 15:45:18 +02:00
Ido-Shahar
0e8110fa94 Node Wrangler: Add support for boolean sockets to nw_merge_nodes, results in a Boolean Math node
### Summary

A small fix / addition to Node Wrangler operators.py, specifically the
nw_merge_node operation. I added support for merging nodes with
boolean sockets, which used to not respond to nw_merge_nodes / nw_lazy_mix.

### Motivation

As a user, I found it frustrating that I couldn't use lazy mix on boolean
nodes, as geonodes-heavy projects relied on them, and required adding
Boolean Math nodes often.
I intuitively expected it to add a Boolean Math node, which is the most
similar to Math Add for floats & Join Geometry for geometry.

### Implementation

A boolean nodes list is created when the rest of the lists are cerated,
nodes with boolean outputs get added to it, it's taken into consideration
when checking if PASS_THROUGH, then if we didn't PASS_THROUGH,
a Boolean Math node is created, similar to the existing options.
When the user uses a math merge shortcut (ctrl+0, ctrl+*, etc), the
code ignores it, adds Boolean Math anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/140236
2025-07-04 15:26:21 +02:00
Ray Molenkamp
81e862140f Deps_builder: pydantic 2.11.7
As requested by @dr.sybren and approved by the admins

Also pydantics deps :

annotated-types 0.7.0
pydantic-core 2.33.2
typing-extensions 4.14.0
typing-inspection 0.4.1

these are installed as binary packages agreed upon with the admins

versions determined by just pip installing it and seeing what it dragged in.

as some of these are binary packages that will differ per platform, there will
be a per platform hash for some packages now unfortunately

Pull Request: https://projects.blender.org/blender/blender/pulls/140434
2025-07-04 15:25:17 +02:00
Philipp Oeser
458e224587 Merge branch 'blender-v4.5-release' 2025-07-04 15:01:33 +02:00
Philipp Oeser
eb82ff6166 Fix #141387: Light Probes not integrated into Animation Editors
You could basically not interact with the animation (except for
keyframes in the main region), channels region was totally empty, NLA
could not be used, ...

It is not something users will animate a lot, but we should still have
animation editors in mind when adding a new object type.

Just missing from cc31d7bb49

Pull Request: https://projects.blender.org/blender/blender/pulls/141449
2025-07-04 15:01:15 +02:00
Falk David
93d83bdad4 Merge branch 'blender-v4.5-release' 2025-07-04 14:57:53 +02:00
Falk David
859d271528 Fix: Grease Pencil: Crash when geometry has no drawings
Adds checks to the `get_drawing` functions to make sure that there is at
least one drawing in the geometry.
2025-07-04 14:57:08 +02:00
Alaska
7771c36270 Tests: Add tests for AOV passes on objects with transparent materials
This commit adds a test for the situation in which a AOV pass is used
on a object with a fully or semi-transparent material, either using the
transparent BSDF directly, or mixing it with some other material.

Pull Request: https://projects.blender.org/blender/blender/pulls/141068
2025-07-04 14:29:11 +02:00
Omar Emara
c18e4b69a4 Fix: Versioning of Normal node applies to all nodes
The versioning code for the Normal node applies to all nodes, while it
should only apply to the Normal node.

Pull Request: https://projects.blender.org/blender/blender/pulls/141452
2025-07-04 14:07:00 +02:00
Campbell Barton
441cc3ab09 Merge branch 'blender-v4.5-release' 2025-07-04 20:23:30 +10:00
Jason C. Wenger
014be23586 Fix #141351: Default edge dissolve angle leaves many verts undissolved
Adjust angle threshold defaults to dissolve verts as before,
while preserving selected geometry.

The new behavior works as follows:

- If a dissolve terminates on an edge loop or the the corner vert of a
  face, do the dissolve.
- If a set of dissolve edges (either a chain, or a set of 3+ edges)
  crosses a loop cut, do the dissolve.
- If a chain of dissolve edges touch the corner of an unselected face,
  and then leave in a different direction without crossing a loop cut,
  preserve that vert. Just because the selection touches it doesn't mean
  it should be altered.
- If a dissolve edge is separating two triangles,
  then the face join creates a quad. Users generally prefer
  and strive to create meshes that contain quads.
  Instead of destructively dissolving the corners of the quad and
  automatically turning it to a triangle or wire,
  instead prefer to preserve the quad.

Ref !141097
2025-07-04 20:14:55 +10:00
Pratik Borhade
eab747e8dd Fix #51739: Sliding values in add primitive redo panel not hiding cursor
Cursor is actually wrapped at the beginning with the help of function
`WM_cursor_grab_enable`. Though the `ND_MODE` event notifier added
inside  `editmode_enter/exit_ex` further calls `region_cusor_set()`.
This resets the cursor to default at the bottom of
`ED_region_cursor_set()`. Such sitution could be avoided by creating a
dummy cursor function for hud region. But issue remains when we call
redo panel from F9. As Julian suggested, add condition for `grabcursor`
to avoid changing cursor when editing buttons.

Pull Request: https://projects.blender.org/blender/blender/pulls/133529
2025-07-04 12:01:03 +02:00
Pratik Borhade
841c36850c Fix #67806: Delete non existing temp screens
When deleting a window, clear screen ID data if it belongs to
non-main window with single area

Pull Request: https://projects.blender.org/blender/blender/pulls/132978
2025-07-04 11:56:12 +02:00
Campbell Barton
dcf59ca85a Merge branch 'blender-v4.5-release' 2025-07-04 19:54:38 +10:00
Campbell Barton
389a9197ae Merge branch 'blender-v4.5-release' 2025-07-04 19:51:40 +10:00
Patryk-Skowronski
c53a0cfcb6 NDOF: use fixed speed values for translations in "Fly Mode"
Use fixed speed values for translations in Fly mode to constant
values for each axis. Until now, after switching to the Fly mode,
the latest speed value calculated based on RegionView3D::dist
was used for translations.
Now, the translation speed in Fly mode is an adjusted constant
for each axis.

Ref !141285
2025-07-04 19:33:43 +10:00
Casey Bianco-Davis
5cbaee3321 Grease Pencil: Implement align Bézier handles in transform operator
This PR add bezier `align` type calculation to Grease Pencil.
Curves objects were implement in #128726.

Pull Request: https://projects.blender.org/blender/blender/pulls/141371
2025-07-04 11:27:14 +02:00
Pratik Borhade
29b97535d7 Cleanup: Use one struct member for GP and curve point count
Remove totgppoint/totcuvepoints and instead use `totpoints`.

Pull Request: https://projects.blender.org/blender/blender/pulls/141441
2025-07-04 10:58:03 +02:00
Pratik Borhade
70f4eccdfc Cleanup: Remove unused header
Functions from these headers are not used anywhere in `info_stats.cc`

Pull Request: https://projects.blender.org/blender/blender/pulls/141444
2025-07-04 10:56:56 +02:00
Falk David
c2225155e2 Cleanup: Remove meaningless consts in function declaration 2025-07-04 10:51:56 +02:00
Pratik Borhade
27b205f579 Fix #141420: Grease Pencil: Crash enabling material overlay without material
Crashed due to accessing members of nullptr Material. Add extra
condition to avoid this.

Pull Request: https://projects.blender.org/blender/blender/pulls/141431
2025-07-04 10:40:09 +02:00
Aras Pranckevicius
65ce05eae7 Merge branch 'blender-v4.5-release' 2025-07-04 11:37:22 +03:00
Aras Pranckevicius
641824753a Fix #141434: OBJ importer should apply bounds clamp size to the whole scene
It was applying the bounds clamp to each object individually,
which changed spatial relationships between objects. Make the logic
match what used to be done in the Python OBJ importer back in the day.

Pull Request: https://projects.blender.org/blender/blender/pulls/141446
2025-07-04 10:36:18 +02:00
Lukas Tönne
455a8554e2 Refactor: Utility "mixer" class to simplify armature deform functions
The main armature deform functions compute a vector and/or matrix from
a weighted sum of bone deformations. This can be done either with
linear interpolation or using dual quaternions.

The linear and dual-quaternion methods were mixed together in the same
functions, which makes the code unnecessarily hard to follow. This patch
introduces a "Mixer" concept (similar to attribute math) that abstracts
the process of adding bone influence to the target vector/matrix. It also
takes care of finalizing the value. This way the code iterating over the
vertex group and/or bone envelopes can be agnostic of the target data.

The ArmatureUserData also receives significant refactoring to remove
unnecessary variables, utilize modern math classes, and generally improve
variable naming.

Pull Request: https://projects.blender.org/blender/blender/pulls/141348
2025-07-04 10:13:48 +02:00
Philipp Oeser
ae0ca8e616 Merge branch 'blender-v4.5-release' 2025-07-04 10:11:52 +02:00
Philipp Oeser
ab9f03555c Fix #141384: Anim Channel Pinning: object data pin only for cameras
As mentioned in 98c7e75897, the idea of "pinning" was to have certain
animation always visible (regardless of object selection -- e.g.
animating camera movement even while animating something else).

dea7ef4dd9 added a special case that would also
include the object regardless of it being selected or not if its
**object data** is animated and pinned.

It only fully implemented that for Cameras though (that was the primary
request at that time), leaving ugly blank/empty space (pin icon missing)
for other object data types.

It is understandable that it only did it for Cameras a that time, but
there is no reason to **not** do it for other (viewport selectable)
object data types as well (animators might as well be interested in
pinning other types as well for timing reference) -- which is what this
PR does.

Adding this to 4.5 (since it fixes the blank space (even though it is
somewhat adding a feature as well...)

Pull Request: https://projects.blender.org/blender/blender/pulls/141396
2025-07-04 10:11:34 +02:00
Philipp Oeser
9f3d47a5d8 Merge branch 'blender-v4.5-release' 2025-07-04 10:09:55 +02:00
Philipp Oeser
5787b74580 Fix #141378: Anim Channel Pinning on object data lost adding object anim
Seems like a mistake in dea7ef4dd9

The decision to display an object or not in animation filtering is done
in `animdata_filter_base_is_ok`
So e.g. if an **object** has `AnimData` and that one is pinned
(`ADT_CURVES_ALWAYS_VISIBLE`) it would be included regardless of it
being selected or not. dea7ef4dd9 added a special case that would also
include the object regardless of it being selected or not if its
**object data** is animated and pinned.

What dea7ef4dd9 did wrong though in that special case was that it also
required the object to **not** have animation.
This seems wrong, the object can have animation which itself is not
pinned (ultimately causing `animdata_filter_base_is_ok` to return
`false`).

So to resolve, remove the check for NULL object animation, it should be
entirely enough to have object data animation which is pinned to include the
object in animation filtering.

Pull Request: https://projects.blender.org/blender/blender/pulls/141379
2025-07-04 10:09:34 +02:00
Guillermo Venegas
eb3c6c0505 Fix: Collection name is clamped to 64 characters on creation
Noticed while adding the `Move to Collection` menu #140883.
This follows #137608

Pull Request: https://projects.blender.org/blender/blender/pulls/141350
2025-07-04 05:33:07 +02:00
Campbell Barton
a950d0b2b1 Build: correct error in 2a414eea0c 2025-07-04 13:20:39 +10:00
Eitan Traurig
be72a484e5 UI: Disable Copy and Remove Materials when slots are empty
Grey out this operator when material list is empty

Pull Request: https://projects.blender.org/blender/blender/pulls/141283
2025-07-04 04:55:05 +02:00
Maxime-Cots
6e3039173d UV: Ensure Pie Menu consistency with 3D Viewport
"Selected to Grid" and "Cursor to Grid" are now swapped to fix the
consistency between UV Snap Pie Menu and 3DView Snap Menu.

Resolves #140714

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141300
2025-07-04 04:33:02 +02:00
Campbell Barton
2a414eea0c PyAPI: Refactor attribute access to avoid creating & clearing exceptions
- Add PyObject_GetOptionalAttrString (only available in Python 3.13).
- When registering RNA classes use optional attribute access to avoid
  raising and clearing exceptions.
- Refactor macro that handles substituting Python's built-ins
  with a `for` loop for better readability.
2025-07-04 12:09:16 +10:00
Campbell Barton
dad8bddd78 Cleanup: remove redundant calls to PyErr_Clear after PyErr_Print
I was under the impression both were needed however
PyErr_Print always clears the error too.
2025-07-04 11:10:54 +10:00
Campbell Barton
b99e4e1de1 PyAPI: treat "None" fallback properties as missing in class registration
If `__name__` or `__doc__` were None, the property would be detected as
being set when checking if the property is set (for required properties).

This is more of a technical correction as its unlikely developers would
run into this in practice since `__name__` should never be None and
the description is not a required property.
2025-07-04 11:02:24 +10:00
Campbell Barton
c2c8f54a52 Merge branch 'blender-v4.5-release' 2025-07-04 09:19:25 +10:00
Jorn Visser
94f4df8ec4 Fix #141339: Mantaflow: Clear Python errors when grids aren't available
Adding a Flow to a Mantaflow domain could sometimes cause a crash. This
was because the grids are allocated lazily, and as such, getting them
through `PyObject_GetAttrString` will fail when they are not yet
available. As the resulting Python errors were not cleared, Python could
be left in a bad state, leading to crashes. This is avoided by clearing
these errors before returning from `callPythonFunction` when such an
error is raised.

Ref !141364
2025-07-03 23:17:25 +00:00
Sean Kim
34ce46322c Refactor: Change SubdivCCG adjacency structs to use containers
This commit changes the `SubdivCCGAdjacentEdge` and
`SubdivCCGAdjacentVertex` structs to be simple wrappers around standard
container types, avoiding the need for manual memory management.

Pull Request: https://projects.blender.org/blender/blender/pulls/141163
2025-07-03 23:03:57 +02:00
Sean Kim
6fb90e5303 Fix: Background paint strokes may not initialize certain settings
When a paint stroke is executed instead of processed via the modal
handler, prior to this commit, the `paint_brush_update` function was
not called. This method handles initialization of some temporary stroke
data inside `UnifiedPaintSettings`, which is used by dyntopo when
performing edge collapse.

This had the result of causing a divide by 0 with certain uninitalized
settings when using a brush with dyntopo enabled and calling the
operator from the python API (e.g. from unit testing), resulting in
nonsensical deformations.

There are a number of weak points with the current design:
* This issue was only exposed because of the refactor to the
  `UnifiedPaintSettings`, indicating that despite these values being
  runtime-only, they were still persisted in some cases in .blend files
* The data stored as individual stroke steps is not sufficient to
  reconstruct a paint stroke given a list of screen-space locations, and
  this data is populated outside of the common `stroke` callbacks.

Both of the above issues are wider reaching than this PR is intended to
fix.

This commit ensures that `paint_brush_update` is called in the `exec`
codepath and updates the related test image.

Pull Request: https://projects.blender.org/blender/blender/pulls/141314
2025-07-03 23:00:28 +02:00
Sean Kim
2e049ba4a7 Merge branch 'blender-v4.5-release' 2025-07-03 13:58:55 -07:00
Sean Kim
954dbedc57 Fix #140309: Invalid normals when using external render engine in Sculpt Mode
External render engines, like Cycles, do not use the paint BVH for
rendering. As part of the stroke update process, normal caches are
tagged as dirty. These normals need to be recalculated to be valid on
the next stroke step.

This commit is a mitigation for the reported issue, but does not
fully fix the underlying issue that causes the cycles data to
be in this state.

Pull Request: https://projects.blender.org/blender/blender/pulls/140503
2025-07-03 22:58:16 +02:00
Hans Goudey
de63022ca0 Cleanup: Remove unnecessary SDNA info for node tool flags
These all have getters and setters anyway. The flag for "wait for click"
was wrong, even though that dicn't cause an observable bug (AFAIK).
2025-07-03 16:11:29 -04:00
Hans Goudey
7ca392b5ee Merge branch 'blender-v4.5-release' 2025-07-03 16:01:08 -04:00
Guillermo Venegas
b36e5b4b06 Refactor: UI: Replace UI_block_layout with blender::ui::block_layout
This renames `UI_block_layout` API as `blender::ui::block_layout`,
following uiLayout refactors.
This function now returns a layout reference instead of pointer,
this changes applies this return type where the layout can be used
as such reference.

Changes includes the use of `blender::ui::LayoutDirection` and
`blender::ui::LayoutType` as typed enum parameters.

Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/141401
2025-07-03 22:00:46 +02:00
Hans Goudey
dd535aba68 Fix #141406: "Wait for Click" changes Node tools Grease Pencil toggle
A mistake in the original commit a7d2b7850e
2025-07-03 15:59:05 -04:00