Commit Graph

120055 Commits

Author SHA1 Message Date
Miguel Pozo
f64641ad30 Fix #133638: Overlay Next: Some overlays not displayed in X-Ray mode
Ensure overlay object modes/x-ray/wireframe combinations match 4.3
behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/134069
2025-02-07 18:12:25 +01:00
Bastien Montagne
87a4c0d3a8 Refactor: Make Library.runtime an allocated pointer.
Move `Library.runtime` to be a pointer, move the related
`LibraryRuntime` struct to `BKE_library.hh`. Similar to e.g.
Mesh.runtime, that pointer is expected to always be valid, and is
allocated at readtime or when creating a new Library ID.

Related smaller changes:
* Write code now uses standard ID writing codepath for Library IDs too.
  * Runtime pointer is reset to nullptr before writing.
* Looking up a library by its absolute path is now handled through a
  dedicated utils, `search_filepath_abs`, instead of using
  `BLI_findstring`.

Pull Request: https://projects.blender.org/blender/blender/pulls/134188
2025-02-07 17:47:16 +01:00
Falk David
971f3e0699 Fix #132826: Grease Pencil: Missing "Paste by Layer" option
The Grease Pencil `Clipboard` only stored a single `CurvesGeometry`. This meant
that the `Paste by Layer` operation (from 4.2 LTS) couldn't be implemented.

This PR adds an `Array` of `ClipboardLayer`s to the  `Clipboard`. Each layer stores
the name of the Grease Pencil layer that it was copied from and the `CurvesGeometry`.

The `grease_pencil.paste` operator has a new property `type` (`ACTIVE` or `LAYER`)
that decides how to paste the strokes.

Using the `ACTIVE` type, the strokes of all the `ClipboardLayer`s get merged and then
pasted to the active layer.
Using the `LAYER` type, we first try to find layers to paste the `ClipboardLayer`s into.
We just look for matching layer names. If no matching layer is found, the strokes are
pasted into the active layer instead.

This should be consistent with how Grease Pencil used to behave in 4.2. LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/134168
2025-02-07 16:17:16 +01:00
Falk David
25b3f234fe Merge branch 'blender-v4.4-release' 2025-02-07 15:09:09 +01:00
Falk David
a0548950a0 Fix: Compiler warning after recent commit
Caused by 2d18046bbc.
The function should be `static`.
2025-02-07 15:08:17 +01:00
Falk David
b00c8bd391 Merge branch 'blender-v4.4-release' 2025-02-07 15:01:35 +01:00
Jacques Lucke
c7e44734fb Fix #134228: crash when trying to open file in text editor
Caused by the fact that PointerRNA is a non-trivial type now.
2025-02-07 14:51:23 +01:00
Clément Foucault
5fcfc57103 Fix: DRW: Avoid division by zero in frustum_culling_planes_calc
This doesn't fix the float precision issue, just making sure we
don't hit undefined behavior.
2025-02-07 14:42:56 +01:00
Janne Nylander
bf5a8ab8b9 Fix #133318: Extruding bezier curve with handles selected didn't deselect old handles
Previously bezier curve handle selections were not processed. This would lead to the handles
of the previously selected handles also being dragged around if they were selected before
the extrusion operation.

This pull request will use the control point selection attribute to override the handle
selections. This will lead to both handles always being selected on extrusion.

Pull Request: https://projects.blender.org/blender/blender/pulls/134192
2025-02-07 14:31:57 +01:00
Jacques Lucke
190ba72acf Cleanup: Nodes: use utility method to check if node is undefined 2025-02-07 13:40:26 +01:00
Pratik Borhade
2d18046bbc Fix: Grease Pencil: Missing operator to delete breakdown keyframes
Operation to delete keys generated from interpolate sequence.

Resolves #134081

Pull Request: https://projects.blender.org/blender/blender/pulls/134091
2025-02-07 13:36:38 +01:00
Jacques Lucke
fa912845ac Merge branch 'blender-v4.4-release' 2025-02-07 13:31:43 +01:00
Jacques Lucke
3baac1992a Fix: Nodes: handle undefined nodes more gracefully
Found while checking #134193.
2025-02-07 13:26:24 +01:00
Bastien Montagne
8d56e2cddf Merge branch 'blender-v4.4-release' 2025-02-07 12:54:57 +01:00
Bastien Montagne
2f8021775c Animation: Allow overriding transform locks on posed bones.
The reason why this was not enabled is unclear, but has likely to do
with the idea that if this is defined by the rigging department, the
animation department should not tamper with it.

However, preventing animators to lock some transform themselves is
likely a worse limitation here.

Pull Request: https://projects.blender.org/blender/blender/pulls/134169
2025-02-07 12:53:26 +01:00
Bastien Montagne
9fbde225da Merge branch 'blender-v4.4-release' 2025-02-07 12:45:32 +01:00
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