Commit Graph

134079 Commits

Author SHA1 Message Date
Jaume Bellet 183ad17df5 Merge branch 'bf-blender' into mb-0014-bpy-images 2024-03-12 07:27:04 +01:00
Jaume Bellet 151324627b Merge branch 'main' of https://projects.blender.org/blender/blender into bf-blender 2024-03-11 18:26:46 +01:00
Howard Trickey 70fa3becad Refactor: Move mesh_boolean_convert from blenkernel to geometry.
Header file is renamed to GEO_mesh_boolean_convert.cc and
files that included it are updated to use that path.
This is in preparation for bigger changes to the internal
boolean API, which make more sense as a "geometry" API
than a kernel API.

Pull Request: https://projects.blender.org/blender/blender/pulls/119336
2024-03-11 18:17:57 +01:00
Harley Acheson 1f1fbda3ee UI: template_ID button Width Minimums
Use the prior fixed button widths as minimum sizes for the template_ID
new and open buttons. That way they will look the same as before under
most circumstances but will still adjust rather than overflow for
longer content or larger text sizes.

Pull Request: https://projects.blender.org/blender/blender/pulls/119330
2024-03-11 17:31:04 +01:00
Sybren A. Stüvel c7e4365d7a Merge remote-tracking branch 'origin/blender-v4.1-release' 2024-03-11 17:16:32 +01:00
Sybren A. Stüvel 5531a191e8 Fix #117798: "Nothing to Bake" when pose object is not selected
Use `context.pose_object` when baking a pose, on on top of the objects
in `context.selected_editable_objects`. When in pose mode, it's expected
that the pose of the active will be baked, regardless of whether the
pose object is selected itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/119317
2024-03-11 17:11:14 +01:00
Sean Kim 1df10d0d25 Fix #119014: Crash on keymap editing for Mac
Due to differences with the libc++ std::sort implementation that has a strong
requirement on strict weak ordering.

Pull Request: https://projects.blender.org/blender/blender/pulls/119189
2024-03-11 16:31:08 +01:00
Germano Cavalcante 976a8012d1 Fix: wrong conditional check in 'transform_mesh_edge_slide_data_create' 2024-03-11 12:25:06 -03:00
Germano Cavalcante fcfce8f69f Fix: unhandled empty Optional in 'bounds_min_max()'
Snap for meshes without vertices raised an error in debug build.
2024-03-11 12:25:06 -03:00
Hans Goudey f6f767b879 Cleanup: Rename "me_eval" to "mesh_eval"
Similar to 854cdd1180
2024-03-11 11:21:18 -04:00
Sebastian Parborg 013cd3d1ba Fix: Remove duplicate image_add operators in the 3D view port
As part of #118623, we discovered that the operator used for adding images in the 3D viewport was not the same when drag and dropping as when adding it from the add menu. This lead to different and potentially confusing behaviour for the user when they use both.

This patch removes the python operator and unifies the functionality into one operator. It also renames the operator to be in line with the other "Add X" object operators.

Pull Request: https://projects.blender.org/blender/blender/pulls/118973
2024-03-11 16:18:25 +01:00
Jacques Lucke 4d0936c7d7 Fix #119316: instancing lamps does not work
The issue was that calling `ensure_geometry_instances` converts all instances to a
geometry, even the ones that can't be converted. The comment already says that
non-geometry instances should stay intact, but that didn't work correctly yet:
```
  /**
   * If references have a collection or object type, convert them into geometry instances
   * recursively. After that, the geometry sets can be edited. There may still be instances of
   * other types of they can't be converted to geometry sets.
   */
```

Pull Request: https://projects.blender.org/blender/blender/pulls/119324
2024-03-11 15:58:40 +01:00
Jacques Lucke deb332601c Fix #113090, #111450, #104909: node rna properties collide with built-in names
This fixes the following name collisions:
* Compositor Box/Ellipse Mask node: `width` -> `mask_width`
  (also renamed the `height` property accordingly)
* Shader AOV Output node: `name` -> `aov_name`
* Geometry Color node: `color` -> `value`.

Those are breaking changes unfortunately, because looking up those property
names yielded the node-specific and not the common property. Therefore, this is
targeted at `main` instead of `4.1`.

Pull Request: https://projects.blender.org/blender/blender/pulls/119284
2024-03-11 15:57:30 +01:00
Hans Goudey 3c908dc7f5 Merge branch 'blender-v4.1-release' 2024-03-11 10:43:55 -04:00
Hans Goudey 8b9abd09c8 Fix #119270: Multires color attribute fallback drawing changed to black
Before e05c36f56d the fallback for unsupported attributes was
white. That's arbitrary, but not worth changing.
2024-03-11 10:41:38 -04:00
Jacques Lucke ad9d93ef13 Merge branch 'blender-v4.1-release' 2024-03-11 15:40:43 +01:00
Iliya Katueshenock 95810eec8f Fix #106235: use first non-dangling link of multi-input socket for internal link
Pull Request: https://projects.blender.org/blender/blender/pulls/119280
2024-03-11 15:39:02 +01:00
Brecht Van Lommel 92f6ba5a5f Merge branch 'blender-v4.1-release' 2024-03-11 15:09:55 +01:00
Brecht Van Lommel c388ed1e53 Fix #118709: Crash in OIDN GPU detection for unsupported HIP device
Pull Request: https://projects.blender.org/blender/blender/pulls/119315
2024-03-11 15:09:24 +01:00
Falk David 771538f362 Fix: GPv3: Eraser used wrong layer index
The `execute_eraser_on_drawing` expects the first argument to be the layer index, but the drawing index
was passed to the lamda.
The fix makes sure to pass the active layer index.
Also return early if there is no active layer.
2024-03-11 14:44:46 +01:00
Brecht Van Lommel d6d768bc65 Merge branch 'blender-v4.1-release' 2024-03-11 14:34:55 +01:00
Brecht Van Lommel 972087ed58 Fix: Linux libraries have files stored as LFS that shouldn't be 2024-03-11 14:33:38 +01:00
Jacques Lucke 55cda490ab Fix #119171: show node panels when they have ui even if they don't have sockets
Pull Request: https://projects.blender.org/blender/blender/pulls/119287
2024-03-11 14:08:59 +01:00
Brecht Van Lommel e36d90fad2 Merge branch 'blender-v4.1-release' 2024-03-11 13:32:00 +01:00
Brecht Van Lommel ee0e4bd392 Build: Update to OSL 1.13.7, OIDN 2.2.1 on Linux 2024-03-11 13:28:28 +01:00
Germano Cavalcante 20dbcd8814 Fix #119305: Edge slide is not working properly
Caused by 930b11b0fe.

The `find_best_dir` method needs to break the loop of edges that share
faces if these edges go beyond those selected for slide.
2024-03-11 09:23:15 -03:00
Bartosz Kosiorek 0a1dd4be05 UI: Add and improve more shader node descriptions
Pull Request: https://projects.blender.org/blender/blender/pulls/119169
2024-03-11 13:19:17 +01:00
Brecht Van Lommel 9d0f49c843 Merge branch 'blender-v4.1-release' 2024-03-11 13:11:36 +01:00
Pratik Borhade 04d37cd887 Fix #119309: Face Set from Visible crash with multires
Fix is same as 18912561b5 / 72d324bd81

Pull Request: https://projects.blender.org/blender/blender/pulls/119311
2024-03-11 13:01:24 +01:00
Brecht Van Lommel f7a071bd60 Fix: Build failing when WITH_OPENIMAGEDENOISE is OFF 2024-03-11 12:59:46 +01:00
Alaska 989e9ef890 Fix: Assert in Cycles multi-device OIDN check
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/119267
2024-03-11 12:54:45 +01:00
Lukas Tönne f04bf1694f Fix #118509: Make sure to use valid indices in frame maps
Moving a set of keyframes could cause crashes by setting invalid
`drawing_index` in `GreasePencilFrame` data.

The transform operator for grease pencil keyframes can add and remove
keyframes by overwriting existing frames. The `move_duplicate_frames`
function in particular has to keep track of drawing user counts to
ensure that the drawings referenced by the frames are still alive at the
end.

This was broken when moving multiple keyframes at once, such that later
keyframes would overwrite the target positions for earlier frames (for
example moving frames [1,2,3] to [2,3,4]). The `move_duplicate_frames`
was first removing the source frame and then adding it back at the
destination. In case the source frame was already the destination of an
earlier keyframe, this will cause incorrect user count because the frame
being removed is not the same as the one being added back.

To avoid this problem, remove all the source keyframes first before any
other modification of the destination layer. That way we can be sure the
frames at the source index is actually the expected frame.

Pull Request: https://projects.blender.org/blender/blender/pulls/119207
2024-03-11 12:50:19 +01:00
Pratik Borhade 51bcaad457 GPv3: Set dash segment active
When new dash segment is added in empty list, it is not set as active.
This is because active_index value becomes greater than segment_num.

Pull Request: https://projects.blender.org/blender/blender/pulls/119318
2024-03-11 12:30:38 +01:00
Miguel Pozo a53e8d6d24 Merge branch 'blender-v4.1-release' 2024-03-11 12:27:39 +01:00
Miguel Pozo 23fd84ffbe Fix #118764: Freezing on Viewport Render Image during shader compilation
The shader compilation job assumes it can only be closed on program
exit, leaving all their materials as queued.
However, render tasks can kill it, causing drw_deferred_shader_add to
get stuck in an infinite loop.

Pull Request: https://projects.blender.org/blender/blender/pulls/119172
2024-03-11 12:25:12 +01:00
Miguel Pozo 6aa50832cf Fix: EEVEE-Next: Workaround for Nvidia shader compiler
Using the previously computed L breaks shadows on reflection probes,
even if the value should be the same.

Pull Request: https://projects.blender.org/blender/blender/pulls/119219
2024-03-11 12:23:07 +01:00
Philipp Oeser dbce0c3183 Cleanup: format 2024-03-11 11:40:04 +01:00
Casey Bianco-Davis ce58a69313 GPv3: Deselect newly drawn strokes
Sets the newly drawn stroke to be deselected. (matching legacy implementation)

Previously the selection attribute was left uninitialized, and would often be outside of the valid range, causing a crash to occur during some operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/119306
2024-03-11 11:20:19 +01:00
Casey Bianco-Davis af6d09b439 Fix: GPv3: Armature modifier crash when vertex groups are empty
A debug error was thrown when the armature modifier was added to a GPv3
object that did not have vertex groups.

Pull Request: https://projects.blender.org/blender/blender/pulls/119301
2024-03-11 10:54:23 +01:00
Attila Afra 60e8b56bcd Fix: CUDA module memory leak since using primary context
Previously the CUDA context was always destroyed and the module along
with it. Now that this no longer happens, the missing module free became
a memory leak.

Also fix the same issue for HIP, though this is destroying the context
so it's not a problem yet.

Fix part of #119035

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
2024-03-11 10:39:24 +01:00
Campbell Barton 5bb1c07fea Merge branch 'blender-v4.1-release' 2024-03-11 20:25:14 +11:00
Campbell Barton e480b6a50c Fix error accessing the "__class__" on removed data
Accessing `__class__` on a removed object raised an exception, making
`isinstance(ob, cls)` unreliable. Always allow class access.

Resolves issue raised by blender/blender-addons!104958.
2024-03-11 20:23:26 +11:00
Clément Foucault 070d72b8f3 DRW: Fix debug_print using char4 macro
This is a side effect of the new small types
support. We need to avoid using them as local
variables.
2024-03-11 09:52:20 +01:00
Omar Emara 739216dc0f Fix #119264: Crashe when Hue Correct and Curves used together
GPU compositor crashes when the Hue Correct and one of the Curves node
are used together. That's due to a utility function that goes by the
same name in both nodes. To fix this, rename one of them to be more
specific.
2024-03-11 10:48:57 +02:00
Philipp Oeser 7394a4042b Merge branch 'blender-v4.1-release' 2024-03-11 09:33:15 +01:00
Philipp Oeser a8b9a58608 Fix #54468: crash calling transform operators with incomplete regiondata
If we run into NULL `RegionView3D` `regiondata` [which e.g. happens if
we just set `bpy.context.area.type = 'VIEW_3D'` without further actions
in the text editor prior to calling the transform operator], we can make
it gracefully work just by using `t->spacetype = SPACE_EMPTY` in
`initTransInfo`.

Similar check is already done in ba229e3859 (marked /* running in the
text editor */).

Transform code is smart enough to have fallback code in place that sets
matrices etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/119205
2024-03-11 09:27:32 +01:00
Omar Emara f4f22b64eb Compositor: Add Bloom option to Glare node
This patch implements the GPU Bloom glare for the CPU compositor, and
adds a new option for it, leaving the Fog Glow option unimplemented once
again for the GPU compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/119128
2024-03-11 08:43:52 +01:00
Jason Fielder 06ac33bdd2 Metal: Fix SSBO from VBO size assertion
Resolves assertion firing when creating an SSBO
from a VBO which is not aligned to 16 bytes.
Required to ensure API validation is satisfied.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/119298
2024-03-11 08:28:14 +01:00
Prakhar-Singh-Chouhan 5d076e0e7b Vulkan: Implementing `VKBackend::samplers_update()`
Implemented `VKBackend::samplers_update()`. When triggered,
if the VK Device is initialized, the `device.samplers` are
freed and reinitialized.

Implements: #117019
Pull Request: https://projects.blender.org/blender/blender/pulls/119109
2024-03-11 07:57:52 +01:00
Campbell Barton bd58a9fbbb Merge branch 'blender-v4.1-release' 2024-03-11 17:36:40 +11:00