Commit Graph

133997 Commits

Author SHA1 Message Date
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
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
Casey Bianco-Davis
5b33a7bc62 Fix: Vertex group data lost after draw tool or delete operator.
Fixes vertex group data loss after the `Draw Tool`, `Delete`, `Dissolve` operators.

Note: This is not a exhaustive list and there are other operators that will still loss vertex group data.

Pull Request: https://projects.blender.org/blender/blender/pulls/119034
2024-03-11 03:01:57 +01:00
Jason Fielder
703353b5da Metal: Fix uniform upload for small types
This patch adds special cases to Shader::uniform_int routine
to allow writing of small types (1 bytes, 2 bytes) to the push
constant buffer.

This previously interpreted all incoming push constant data as
integer components only, resulting in rendering artifacts such as
bad SRGB mode selection and shader editor not rendering due
to mis-aligned overlay parameter, as the uniform assignment
would overflow consecutive small types.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/119285
2024-03-10 19:36:30 +01:00
Jacques Lucke
2c5f51e683 Merge branch 'blender-v4.1-release' 2024-03-10 14:04:35 +01:00
Jacques Lucke
b020173984 Fix #114120: support output attributes on instanced geometry in geometry nodes modifier
Pull Request: https://projects.blender.org/blender/blender/pulls/119016
2024-03-10 13:02:56 +01:00
Jesse Yurkovich
5ad9f9dc90 Cleanup: unused includes in source/blender/io
Reduce dependence on Blender headers as much as possible and move closer
to an include-what-you-use setup.

- Removes unnecessary includes
- Replaces some includes with more appropriate, narrower, substitutes

Pull Request: https://projects.blender.org/blender/blender/pulls/119234
2024-03-10 04:28:00 +01:00
Jesse Yurkovich
5b522359ee Cleanup: Centralize MSVC conformance related cmake items
Move the MSVC conformance flags to a win32-specific central location.

Pull Request: https://projects.blender.org/blender/blender/pulls/119235
2024-03-09 23:42:20 +01:00
Ray Molenkamp
61a88e525b Windows libs: OSL 1.13.7, OIDN 2.2.1
ref #119095
2024-03-09 09:37:29 -07:00
Campbell Barton
e33f5e36ac Cleanup: spacing around C-style comment blocks 2024-03-09 23:40:57 +11:00
Campbell Barton
91229f0e16 Cleanup: use full sentences for comments in transform & windowmanager 2024-03-09 23:28:03 +11:00
Brecht Van Lommel
0f1e93e78a Cleanup: Remove debug print 2024-03-09 12:27:16 +01:00
Kyler Kelly
060174cf14 Transform: customizable rotation snap increment values
Add two snapping increment options: a regular value
(activated with Ctrl) and a precise value (activated with Ctrl+Shift).
These values are separate for 2D and 3D views.

Ref !118760
2024-03-09 16:57:12 +11:00
Campbell Barton
32151abfc3 Cleanup: spelling in comments 2024-03-09 16:47:38 +11:00
Campbell Barton
c8706feb2d Cleanup: use doxy references to C++ identifiers 2024-03-09 16:46:42 +11:00
Campbell Barton
b1c59a793c Cleanup: correct spelling for alignment 2024-03-09 16:43:34 +11:00
Campbell Barton
74d9fb60ba Cleanup: use 'const' where possible, remove redundant check 2024-03-09 16:38:25 +11:00
Hans Goudey
21371baac2 Cleanup: Use unique_ptr and references for sculpt gesture data 2024-03-08 22:43:14 -05:00
Hans Goudey
8f51b0927e Merge branch 'blender-v4.1-release' 2024-03-08 22:26:36 -05:00
Jesse Yurkovich
dfa8039b0d Fix: Memory leak from sculpt paint lasso
The early returns inside `sculpt_gesture_init_from_lasso` would cause
the `SculptGestureContext` to be leaked.

Pull Request: https://projects.blender.org/blender/blender/pulls/119233
2024-03-09 04:20:40 +01:00
Harley Acheson
23aaf88233 UI: Position of Current Frame Indicator Text
Improve the positioning of the text on the current frame indicator
by taking the Text Style size into consideration.

Pull Request: https://projects.blender.org/blender/blender/pulls/119236
2024-03-09 03:25:02 +01:00
Hans Goudey
733f02407d Merge branch 'blender-v4.1-release' 2024-03-08 20:56:27 -05:00
Hans Goudey
7b25699333 Fix #119232: Crash on Generate Data Layers in DataTransfer modifier
"r_map" is null for the generate layers operator (rather than the modifier
evaluation). It should disable the creation of the "CD_NORMAL" layer too,
like the crease, bevel weight, sharp edge, and uv seam attributes above.
2024-03-08 20:55:43 -05:00
Harley Acheson
196cd48aad UI: Positioning of 3DView Sidebar Tab Titles
Improve the positioning of the tab titles in the 3D Viewport sidebar
by taking the Text Style size into consideration.

Pull Request: https://projects.blender.org/blender/blender/pulls/119231
2024-03-09 01:34:42 +01:00