Commit Graph

117289 Commits

Author SHA1 Message Date
Bastien Montagne
3cbfd26bad Fix #134212: Crash when appending into an Excluded collection.
Would only happen in some specific cases. Essentially, do not consider
an excluded collection as 'editable'.

Also refactored `BKE_collection_parent_editable_find_recursive` on the
way, as it was applying the same checks twice to all but the initial
processed collections.
2025-02-07 12:45:12 +01:00
Clément Foucault
954b800c3f GPU: Add test for byte pattern clearing of storage buffers 2025-02-07 12:23:50 +01:00
Falk David
445ae53c8e Merge branch 'blender-v4.4-release' 2025-02-07 12:22:59 +01:00
Falk David
8c01a59411 Fix: Grease Pencil: Use ensure_selection_attribute in vgroup_select_verts
This was implemented in the kernel but it shouldn't have been.
Since the function operates at the editor level and doesn't
only work at the low-level, it should be in the `object_vgroup.cc` file
in the `editor` context.

This also means that we can use `ensure_selection_attribute` which
fixes a crash when the selection attribute is on the wrong domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/134060
2025-02-07 12:22:29 +01:00
Falk David
a9f75d45ad Merge branch 'blender-v4.4-release' 2025-02-07 10:57:17 +01:00
Pratik Borhade
e58b6a3279 Fix #134152: Grease Pencil: Keyframe color missing in viewport text overlays
Use `TH_TIME_GP_KEYFRAME` theme to color the object name in viewport
when there are any keyframes on any layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/134161
2025-02-07 10:56:32 +01:00
Jeroen Bakker
a475678701 Cleanup: Subdiv: Move shaders to draw_shader
Subdivision had its own store of shaders. Best to move them to
`draw_shader.cc` where all draw manager related shaders are stored.

Includes some small tweaks:

- Use enum class for shader types
- patch evaluation must now be retrieved via the
  `DRW_shader_subdiv_get`. Previously there were 2 ways to retrieve
  them, and one didn't support all the variations.
- Use strongly types when possible (`GPUVertCompType`).

Pull Request: https://projects.blender.org/blender/blender/pulls/134213
2025-02-07 10:53:29 +01:00
Jeroen Bakker
d496e69eca Cleanup: Subdiv: Remove common_ prefix
The `common_` prefix can be confusing as there are other common_ files as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/134184
2025-02-07 07:48:49 +01:00
Campbell Barton
75574f8a0a Merge branch 'blender-v4.4-release' 2025-02-07 16:06:50 +11:00
Campbell Barton
466eecf909 Fix potential memory leak file_browse_exec 2025-02-07 16:05:58 +11:00
Campbell Barton
fed8ecdaaf Fix use of MEM_callocN for a struct containing a PointerRNA 2025-02-07 16:05:58 +11:00
Richard Antalik
a56a1ce5da Merge branch 'blender-v4.4-release' 2025-02-07 01:29:56 +01:00
Richard Antalik
69b2f603de Fix: VSE duplicate snapping values
Enums `SEQ_SNAP_TO_RETIMING` and `SEQ_SNAP_TO_PREVIEW_BORDERS` were mistakenly
assigned same value.

Pull Request: https://projects.blender.org/blender/blender/pulls/134140
2025-02-07 01:29:03 +01:00
Campbell Barton
aea0cf9867 Merge branch 'blender-v4.4-release' 2025-02-07 11:20:35 +11:00
Campbell Barton
7bdffe124a Fix #134201: Invalid doc-string for Scene.ray_cast 2025-02-07 11:17:57 +11:00
Campbell Barton
b3f45d8e6b Cleanup: quiet unused argument warning 2025-02-07 10:45:17 +11:00
Hans Goudey
69b5124e09 Fix: Link error from missing include
Back ported from:
3b4ead2ecc
2025-02-07 10:39:45 +11:00
Campbell Barton
59b5d5adb0 Merge branch 'blender-v4.4-release' 2025-02-07 10:30:20 +11:00
Campbell Barton
b113e848ef NDOF: implement new methods to pick the orbit-center
Note: this is a back-port from `main`, details below,
Original message:

Add support for dynamic NDOF orbit center calculation.

- When "Auto" NDOF preference is enabled:
  All visible objects in the viewport are used to calculate a
  bounding box center, if the bounds are outside the view or the center
  is behind the viewport, use a Z-Buffer test to calculate the depth in
  the middle of the region.

- When "Use Selected Items" NDOF preferences is enabled,
  calculating the bounds from the selection.

- An option to show the orbit center as a guide has also been added.

Ref !129594

Co-authored-by: Kamil Galik <kgalik@3dconnexion.com>

Back-ported as this change as this only missed the 4.4 branch by hours
and is considered an important feature for 4.4 by 3dconnexion.

This includes the following commits from main:

1a14d69498
30399fd165
3a8658958f
da8d9d989e
2a0ce11104
fb539baa89
2025-02-07 10:23:45 +11:00
Hans Goudey
54dc692d7b Refactor: Use StringRef for attribute API and BMesh CustomData functions
Replace `const char *` with `StringRef` for the API in `BKE_attribute.h`.
The benefits are slightly simpler code and possibly slightly improved
performance through avoiding the need to measure string length.

Pull Request: https://projects.blender.org/blender/blender/pulls/134183
2025-02-06 21:38:19 +01:00
Hans Goudey
d279a807f2 Fix: Potential build error from missing include 2025-02-06 14:21:39 -05:00
Harley Acheson
f2f43640b8 Merge branch 'blender-v4.4-release' 2025-02-06 11:17:20 -08:00
Harley Acheson
fd97a8f578 Fix #134166: Show Context Menus as "Options" on Status Bar
The Status Bar often shows context menu items as the name of that menu,
which is confusing in this context. For example in Object mode it shows
"Object" as the right-click operation. In Grease Pencil it shows this
as "Draw" even though you don't draw with it. In "Sculpt" mode you see
two items as "Sculpt", one on left click and the other on right click.
This PR makes all these show as "Options" instead. This seems like a
very succinct description of what is available on right-click.

Pull Request: https://projects.blender.org/blender/blender/pulls/134191
2025-02-06 20:15:44 +01:00
Clément Foucault
257c32c5f2 Merge branch 'blender-v4.4-release' 2025-02-06 19:31:34 +01:00
Clément Foucault
59db8d427f Fix #132663: Selection: Object selection is broken on Intel Macs
Copy the fix that is used by EEVEE shadow code.
2025-02-06 19:30:41 +01:00
Sybren A. Stüvel
fcf5b44d7c Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-02-06 17:50:09 +01:00
Sybren A. Stüvel
f9a45702fa Anim: remove ActionLayer.mix_mode and .influence from RNA
Remove the `ActionLayer.mix_mode` and `ActionLayer.influence` properties
from RNA. The animation evaluation already takes these into account, but
there is no guarantee that the mixing that is currently implemented is
going to be mathematically identical to the eventual implementation. So
better to not expose the properties quite yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/134186
2025-02-06 17:49:45 +01:00
Hans Goudey
4f833b0b5f Refactor: Add StringRef overloads to translation functions
Currently UI code always has to use char pointers when interacting with
the translation system. This makes benefiting from the use C++ strings
and StringRef more difficult. That means we're leaving some type safety
and performance on the table. This PR adds StringRef overloads to the
translation API functions and removes the few calls to `.c_str()` that
are now unnecessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/133887
2025-02-06 17:47:52 +01:00
Hans Goudey
7f1b8d947f Fix: Potential crash in attribute search code
Need to properly account for the change to StringRef when checking
if the string is empty.
2025-02-06 11:23:40 -05:00
Weizhen Huang
1d24c8c927 Merge branch 'blender-v4.4-release' 2025-02-06 16:24:16 +01:00
YimingWu
fc43f4e1e8 Fix #134035: Grease Pencil: Correct index for multistroke modifier
The stroke index was wrong when a influence filter is active in the
modifier, this would lead to crashes. Now corrected this by only
iterating duplicated strokes in front of the curves geometry.

Pull Request: https://projects.blender.org/blender/blender/pulls/134038
2025-02-06 15:08:07 +01:00
Brecht Van Lommel
b66e8bd508 Merge branch 'blender-v4.4-release' 2025-02-06 14:58:18 +01:00
Ray Molenkamp
1540817576 For VFX platform 2025 and more.
Boost (removed!)
Cython 3.0.11
Expat 2.6.4
GMP 6.3.0
MaterialX 1.39.2
Nanobind 2.1.0 (new, for OpenVDB)
NumPy 1.26.4
OpenColorIO 2.4.1
OpenEXR 3.3.2
OpenImageIO 3.0.3.1
OpenVDB 12.0.0
OSL 1.14.3-beta
Python 3.11.11
Robinmap 1.3.0
TBB 2021.13.0
TIFF 4.7.0
USD 25.02
libxml2 2.13.5
zlib 1.3.1

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Co-authored-by: Jonas Holzman <jonas@holzman.fr>
Co-authored-by: Sebastian Parborg <sebastian@blender.org>

Ref #128577

Pull Request: https://projects.blender.org/blender/blender/pulls/134178
2025-02-06 14:57:02 +01:00
Brecht Van Lommel
7112eb3e8b Merge branch 'blender-v4.4-release' 2025-02-06 14:30:15 +01:00
Brecht Van Lommel
d5823ad895 Fix: MaterialX 1.39 subsurface not exporting correctly
Pull Request: https://projects.blender.org/blender/blender/pulls/134139
2025-02-06 14:29:42 +01:00
Brecht Van Lommel
7b3fa03e56 Math: Work around Windows math::is_negative build failures
Don't template size for matrix is_negative. These are causing random
build failures on the Windows buildbot.

Note that these already have the assumption of 3D coordinates baked
in. For 2D or 4D coordinates the implementation would have to be
different. So templating these for arbitrary dimensions does not
make much sense.

Pull Request: https://projects.blender.org/blender/blender/pulls/134137
2025-02-06 14:29:09 +01:00
Omar Emara
31444fe5b1 Refactor: Compositor: Use generic container for results
This patch refactors the Result class in the compositor to use
GMutableSpan and std::variant to wrap the result's data. This reduces
the complexity of the code and slightly optimizes performance. This will
also make it easier to add new types and interface with other code like
multi-function procedures.

Pull Request: https://projects.blender.org/blender/blender/pulls/134112
2025-02-06 13:49:44 +01:00
YimingWu
f07b227f18 Merge branch 'blender-v4.4-release' 2025-02-06 19:24:06 +08:00
YimingWu
981f9f767d Fix #134082: Clarify description for subsurface scattering radius
User may think of the `radius` vector value as RGB color, however it's
meant to be the depth of scattering for R/G/B channels. Now clarified in
the desctiption.

Pull Request: https://projects.blender.org/blender/blender/pulls/134088
2025-02-06 12:23:23 +01:00
Jacques Lucke
3b49b5b587 Fix: Geometry Nodes: Instance on Points ignores Grease Pencil layer transform
It already doesn't work in a very fairly simple case when the Grease Pencil
geometry is transformed. This simple case used to work before we changed
the Transform Geometry node to transform layers instead of points.

Pull Request: https://projects.blender.org/blender/blender/pulls/134131
2025-02-06 11:34:58 +01:00
Falk David
8af27ce27e Fix #133969: Crazyspace broken with bezier curves and armature modifier
The issue was that the topology of the drawing changes when the bezier
curves get resampled to poly curves in the armature modifier.
This means that the crazyspace code fails to find deformed positions
with the same length as the original positions.

The fix does multiple things:
* First, we make sure that we create an `GeometryComponentEditData` in
  weight paint mode.
* When the armature modifier runs, we remember the current positions in
  this component.
* Then, we store the curve offsets and weights _before_ converting the
   bezier curves.
* Finally we deform the positions stored in the edit hint component
   (which have the same length as the original positions).

Since the resampling just adds new points, there might be a way to
avoid running the armature deformation a second time on the edit
hints, but I'll leave that for another day as a performance improvement.
In any case, this is only done when we actually need the deformation
(e.g. in weight paint mode when we paint the weights).

Pull Request: https://projects.blender.org/blender/blender/pulls/134030
2025-02-06 11:15:32 +01:00
Falk David
3a85ccde38 Fix #133969: Crazyspace broken with bezier curves and armature modifier
The issue was that the topology of the drawing changes when the bezier
curves get resampled to poly curves in the armature modifier.
This means that the crazyspace code fails to find deformed positions
with the same length as the original positions.

The fix does multiple things:
* First, we make sure that we create an `GeometryComponentEditData` in
  weight paint mode.
* When the armature modifier runs, we remember the current positions in
  this component.
* Then, we store the curve offsets and weights _before_ converting the
   bezier curves.
* Finally we deform the positions stored in the edit hint component
   (which have the same length as the original positions).

Since the resampling just adds new points, there might be a way to
avoid running the armature deformation a second time on the edit
hints, but I'll leave that for another day as a performance improvement.
In any case, this is only done when we actually need the deformation
(e.g. in weight paint mode when we paint the weights).

Pull Request: https://projects.blender.org/blender/blender/pulls/134030
2025-02-06 11:14:23 +01:00
Bastien Montagne
5f6a8bcea0 Merge branch 'blender-v4.4-release' 2025-02-06 11:10:11 +01:00
Bastien Montagne
734af8206c Fix #134162: Crash when opening a file with a compositor image node.
Yet another remaining case of non-trivial data created with C-style
allocation.

While 4.4 and previous did not exhibit the crash, the invalid code
responsible for this crash is present here as well, and it would be
dangerous not to fix it.
2025-02-06 11:07:04 +01:00
Christoph Lendenfeld
0398fcb780 Merge branch 'blender-v4.4-release' 2025-02-06 11:00:01 +01:00
Christoph Lendenfeld
ca65379d70 Fix: Indicate that creating a pose asset opens a pop up
As indicated by pablovazquez , operators that open a pop up should end with `...`.

I decided to change the operator name instead of doing it in python with `text=`
This seemed more reasonable to me because it can't be forgotten when adding this operator
somewhere else, but I am not sure if this is the right way to do it.

Pull Request: https://projects.blender.org/blender/blender/pulls/134062
2025-02-06 10:51:04 +01:00
Bastien Montagne
8390fdbd66 Fix #134155: Crash when searching in properties editor.
Mistake in recent RNA refactor (45f231141d), not sure why I ended up
returning empty PointerRNA with non-null type when calling
`RNA_id_create_pointer` with a null ID...

In general, PointerRNA with no data ==> no type either, we are trying to
get rid of the very few exceptions in our codebase relying on a
different behavior!
2025-02-06 10:36:28 +01:00
Omar Emara
3c066738fe Merge branch 'blender-v4.4-release' 2025-02-06 09:49:27 +02:00
Omar Emara
0a066c11ea Fix #134151: Crash when appending Bloom node
Blender crashes when appending a Bloom node. This is because the scene
is needed to infer the render size while versioning, and the scene
doesn't exist while appending, so we need to fallback to a default
render size in those cases.
2025-02-06 09:47:31 +02:00
Campbell Barton
fb539baa89 Cleanup: quiet compiler warnings WITH_INPUT_NDOF=OFF 2025-02-06 16:49:42 +11:00