Commit Graph

107685 Commits

Author SHA1 Message Date
Jacques Lucke
d6829fa7cc Merge branch 'blender-v4.1-release' 2024-03-11 19:49:34 +01:00
Jacques Lucke
9feb02e9ad Fix #113170: node editor background color affects node panel color
The offset `-15` that's passed to `UI_GetThemeColorShade4fv` is chosen so that the color
stays almost the same in the default theme.

Pull Request: https://projects.blender.org/blender/blender/pulls/119283
2024-03-11 19:47:52 +01:00
Hans Goudey
6f4718242e Fix #119304: Assert copying transform data in OBJ and STL export 2024-03-11 14:36:36 -04:00
Jacques Lucke
b4e3a00cd3 Merge branch 'blender-v4.1-release' 2024-03-11 19:35:26 +01:00
Jacques Lucke
c5443ec80d Fix #90999: crash when converting volume grid with high indices to dense volumes
There seems to be an integer overflow in OpenVDB code. For now just avoid rendering
the volume when the indices are very large, which is an extreme case anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/119279
2024-03-11 19:34:57 +01:00
Hans Goudey
dc9249c97f Fix #110562: Crash animating node property affecting socket visibility
For various reasons, the animation system can't properly update the node tree
so that the socket availability caused by changing node enum properties
propagates completely. So animating node properties that affect
socket visibility to change isn't possible without issues like crashes.
Unfortunately that wasn't disallowed before. In this commit there is
a balance of disabling animation on sockets that could reasonably expected
to affect socket visibility, and minimizing breaking changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/119221
2024-03-11 19:26:58 +01:00
Hans Goudey
23ebc45f70 WM: Add dynamic callback version of operator "depends on cursor" flag
For node tools, I would like to give the option of invoking the operator from the
menu, but waiting for a mouse click for the future "Mouse Position" node. Not
all node tools should do that though, and they all use the same operator type,
so it needs to depend on an operator callback. That's implemented here.

Pull Request: https://projects.blender.org/blender/blender/pulls/118983
2024-03-11 19:23:16 +01:00
Jacques Lucke
b33ec06283 Merge branch 'blender-v4.1-release' 2024-03-11 19:18:07 +01:00
Iliya Katushenock
bca31c3846 Fix: handle cyclic links when detecting dangling reroutes
Fix of error from 95810eec8f

Pull Request: https://projects.blender.org/blender/blender/pulls/119335
2024-03-11 19:17:27 +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
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
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
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
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
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
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
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
Campbell Barton
7b4fb47298 Merge branch 'blender-v4.1-release' 2024-03-11 17:36:36 +11:00
Campbell Barton
e09f08fa78 Fix #119202: Crash closing the area with a temporary context
When restoring a temporary context, account for changes to the context
made by actions (typically operators) in the script.

There was an incorrect assumption that an override which didn't change
the current context would also be unchanged when restoring the temporary
context's original values.
2024-03-11 17:34:25 +11:00
Campbell Barton
5fe0213659 Fix error that let a temporary context restore a removed region
Missing check from [0] allowed a removed region to be set when exiting
the temporary context.

[0]: 1ec10323ff
2024-03-11 17:13:10 +11:00
Campbell Barton
443e9cba90 Cleanup: unused includes 2024-03-11 14:42:18 +11:00