Commit Graph

150077 Commits

Author SHA1 Message Date
Sergey Sharybin
9c270d6a48 Merge branch 'blender-v4.2-release' 2024-06-07 17:54:45 +02:00
Sergey Sharybin
b803d7fabb Fix: Command line Cycles render crash on multi-CUDA device
Since #118841 there are more cases where Cycles would check for the
graphics interop support. This could lead to a crash when graphics
interop functions are called without having active graphics context.

This change makes it so there is no graphics interop calls when doing
headless render. In order to achieve this the device creation is now
aware of the headless mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/122844
2024-06-07 17:53:44 +02:00
Aras Pranckevicius
fb0e358e1a Merge branch 'blender-v4.2-release' 2024-06-07 18:43:17 +03:00
Aras Pranckevicius
73d4872f5a Fix: VSE strip outline no longer extends outside of strip bounds
Previously selected strips in VSE timeline were drawing their outline
1px outside of the strip boundaries. This makes outlines of the strips
overlap each other when neighboring strips are selected.

Now the selected outline is fully within regular strip shape.

Pull Request: https://projects.blender.org/blender/blender/pulls/122890
2024-06-07 17:41:56 +02:00
Omar Emara
ec411b55f1 Merge branch 'blender-v4.2-release' 2024-06-07 18:39:32 +03:00
Omar Emara
1e359f4173 Fix #112742: File output node ignores colorspace overrides
The File Output node ignores color space overrides for EXR images. To
fix this, we save the images using save_as_render set to true. We don't
need to provide this as an option similar to other image types because
even when save_as_render is set to true, it will not have an effect
unless the user chooses to override the color space explicitly, since it
is not affected by view transforms and the like.

Pull Request: https://projects.blender.org/blender/blender/pulls/122791
2024-06-07 17:38:18 +02:00
Omar Emara
20e18b0d79 Merge branch 'blender-v4.2-release' 2024-06-07 18:36:07 +03:00
Omar Emara
79da892126 Fix #122587: File Output node can only save one size
The File Output node forces all inputs to have the same size, which
should only be the case for multilayer files. This is a regression in
931c188ce5. To fix this, we allow inputs to have any size, except for
multilayer files, which are realized on the automatic operation domain
of the operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/122824
2024-06-07 17:34:14 +02:00
Omar Emara
d66e3f899a Fix #102240: Viewer node does not work inside group
The CPU compositor does not recognize viewer groups inside node groups
unless a viewer node exists at the top level node group. This is caused
by bad logic when registering viewer node at the node operation builder.
And the fix is just to correct the logic to always register viewers if
no active viewer already exists, which can then later be overwritten if
a viewer node that takes precedence was discovered.

Pull Request: https://projects.blender.org/blender/blender/pulls/122869
2024-06-07 17:33:25 +02:00
Campbell Barton
8aafeba8b4 Merge branch 'blender-v4.2-release' 2024-06-08 00:45:19 +10:00
Campbell Barton
b4523a42b0 Merge branch 'blender-v4.2-release' 2024-06-08 00:45:16 +10:00
Campbell Barton
451141a77a Extensions: make install/upgrade non-blocking
Run extension commands as a non-blocking operator.
2024-06-08 00:44:44 +10:00
Falk David
0089a90625 Refactor: Attribute API: Remove ID owner dependency
The attribute API defined in `attribute.cc` was dependent on
the assumption that `ID`s are always the "direct" owners of attributes.

For Grease Pencil drawings, this is not the case. The Grease Pencil ID
stores the attributes for layers, and the attributes for drawings are stored
in `CurvesGeometry` on the drawings themselves.

In order to make use of  `rna_attribute.cc`, we need that API to handle
other types of attribute owners.

This adds an `AttributeOwner` which is basically just a type and a
pointer. We replace the `ID` pointers and pass `AttributeOwner`s instead.

For cases where we have to do a switch based on the type, all the
types are handled and the `default` statment is left out. This ensures
that we get a compiler warning when a new `AttributeOwnerType`
is added.

No functional changes expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/122765
2024-06-07 16:42:41 +02:00
Campbell Barton
f1461e157b Fix call to Vector::last when empty (asserted in debug mode) 2024-06-08 00:38:53 +10:00
Falk David
b7c570c854 GPv3: Don't use unified paint settings for draw tools
Using unified paint settings for the draw tools as multiple issues.
As an artist, it is expected that changing a draw brush will change
its settings. Sharing the radius between draw brushes only leads
to frustration of having to change the radius back and forth.

Instead, we don't use unified paint settings for the tools in draw
mode and always use the settings on the brush.

Resolves #122157.

Pull Request: https://projects.blender.org/blender/blender/pulls/122886
2024-06-07 16:31:53 +02:00
Miguel Pozo
ca7f1785fc Merge branch 'blender-v4.2-release' 2024-06-07 16:25:37 +02:00
Miguel Pozo
a9ec92005a Fix: EEVEE: Add missing DRW_viewport_request_redraw() call
Required to keep the compilation process going on.
2024-06-07 16:22:20 +02:00
Miguel Pozo
6a3d9018cf EEVEE: Compile probe passes in parallel
Right now probe passes are compiled one by one, since passes are only
requested if `materials.queued_shaders_count` is 0 and requesting a
pass will increase the number.
This splits the logic into 2 functions, one for checking if sync is needed
and another to check if pass shaders are needed.
This allows compiling the shaders in parallel.

Pull Request: https://projects.blender.org/blender/blender/pulls/122799
2024-06-07 16:19:17 +02:00
Miguel Pozo
12eca8692f EEVEE: Parallel static shader compilation
Use the `GPU_shader_batch` API to compile the EEVEE static shaders in
parallel and without blocking Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/122797
2024-06-07 16:19:16 +02:00
Miguel Pozo
9f125489e7 Revert "EEVEE: Compile probe passes in parallel"
This reverts commit e031fbe2f3.
2024-06-07 16:18:54 +02:00
Miguel Pozo
bafd529823 Revert "EEVEE: Parallel static shader compilation"
This reverts commit 9b4b248f36.
2024-06-07 16:18:44 +02:00
Aras Pranckevicius
91fa37fecb Fix: VSE timeline strip rounded corner outlines not pixel correct
PR #122576 added rounded corners to VSE timeline strips, but they were not
"snapped" to pixel grid so the outline that is normally 1px was sometimes
falling in between pixels and was blurred out.

Fix by rounding all SDF related coordinates inside the shader to the pixel
grid.

Pull Request: https://projects.blender.org/blender/blender/pulls/122764
2024-06-07 16:18:09 +02:00
Miguel Pozo
e031fbe2f3 EEVEE: Compile probe passes in parallel
Right now probe passes are compiled one by one, since passes are only
requested if `materials.queued_shaders_count` is 0 and requesting a
pass will increase the number.
This splits the logic into 2 functions, one for checking if sync is needed
and another to check if pass shaders are needed.
This allows compiling the shaders in parallel.

Pull Request: https://projects.blender.org/blender/blender/pulls/122799
2024-06-07 16:15:57 +02:00
Miguel Pozo
9b4b248f36 EEVEE: Parallel static shader compilation
Use the `GPU_shader_batch` API to compile the EEVEE static shaders in
parallel and without blocking Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/122797
2024-06-07 16:14:46 +02:00
Miguel Pozo
fb98edf322 GPU: Add GPU_material_batch_compile
Add `GPU_material_batch` API.
It uses the new `GPU_shader_batch` from #122232 internally and it
works in the same way.

Note: This doesn't implement parallel material optimizations.

Pull Request: https://projects.blender.org/blender/blender/pulls/122793
2024-06-07 16:11:50 +02:00
Miguel Pozo
ec0dd18de5 GPU: OpenGL: Support parallel geometry and compute shader compilation
Support parallel compilation of geometry and compute shaders when
using the `GPU_shader_batch` API.

Pull Request: https://projects.blender.org/blender/blender/pulls/122792
2024-06-07 16:10:43 +02:00
Nikita Sirgienko
1790314f89 Cycles: Fix multiple "Loading denoising kernels" messages
Pull Request: https://projects.blender.org/blender/blender/pulls/122880
2024-06-07 16:05:48 +02:00
Ray Molenkamp
9a71bc176b deps: Fix osl build
OSL needs to know where to find deflate, this was
mentioned during review but not addressed before landing,
my bad.
2024-06-07 07:37:13 -06:00
Sybren A. Stüvel
22d30bc7da Refactor: Anim: use enum type for filter_mode parameter
Use `enum` type for the `filter_mode` parameter of many functions. This
makes debugging easier and just makes the code slightly easier to
understand.

Also make the function parameter `const` wherever possible. Unfortunately,
due to the `BEGIN_ANIMFILTER_SUBCHANNELS` and `END_ANIMFILTER_SUBCHANNELS`
macros (which modify `filter_mode`), this is possible less often than I'd
like.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/122882
2024-06-07 15:22:31 +02:00
Bastien Montagne
f49181d6fc Merge branch 'blender-v4.2-release' 2024-06-07 14:58:21 +02:00
Bastien Montagne
89e790d2a4 Cleanup: Improve/fix some IDProperty comments and TODOs.
Mainly correct/update some comments (e.g. missing reference to Boolean
type), and add some notes essentially about issues with current IDProp
String code (see also #86960 ).

No functional change.
2024-06-07 14:55:40 +02:00
Bastien Montagne
00461991f5 Merge branch 'blender-v4.2-release' 2024-06-07 14:38:10 +02:00
Bastien Montagne
57669600b1 Fix (unreported) GeoNode modifiers keeps 'invalid' IDProps types forever.
In case a 'compatible' old IDProperty exists,
`update_input_properties_from_node_tree` would essentially reuse it
as-is, only keeping the UI data from the freshly new IDProp it created
for the socket.

This commit instead fully re-use the newly created idprop, only copying
(and converting as needed) the value from the old one.

That way, we can be sure that the actual type of the IDProperty is reset
to its expected type, instead of being kept forever in a 'wrong' type.

Having IDProps in a stable, expected type is a sounder behavior in
general, and critical for lower-levels of code to work as expected
(like RNA diffingi, and by extension, Library Overrides e.g.)

NOTE: This is a side-finding from work on #122743 to make some idprops
statically typed, and is a pre-requirement for this to work with the
GeoNodes modifiers case.

Pull Request: https://projects.blender.org/blender/blender/pulls/122876
2024-06-07 14:34:40 +02:00
Falk David
e65981b999 Cleanup: GPv3: Add static assets for sizes of classes
The C++ classes that wrap DNA structs should never store any data.
Runtime data needs to be stored on the runtime classes/structs
and anything else needs to be put into DNA.

This adds static asserts to make sure (at compile time) that these
classes have the same size as the DNA structs (i.e. they don't store
additional data).
2024-06-07 14:22:07 +02:00
Sybren A. Stüvel
53c2ee7e37 Refactor: Anim: make some bAnimListElem fields enum-typed
Change the `bAnimListElem` fields `type`, `update`, and `datatype` from
respectively `int`, `char`, and `short` to their actual `enum` types,
respectively `eAnim_ChannelType`, `eAnim_Update_Flags`, and
`eAnim_KeyType`.

To prevent compiler warnings, all `switch` statements that try to handle
these fields have been expanded with the missing `case`s. This should
help in the future when new channel types are added, as that'll cause
more compiler warnings in those places that need updating.

One `if`/`else if`/`else` chain was converted into a `switch` for
clarity. This was actually the place where my (upcoming) code is hitting
the `BLI_assert_unreachable()`, which was the final straw for this
refactor.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/122874
2024-06-07 13:48:32 +02:00
Sybren A. Stüvel
96a024dede Refactor: Anim: move struct bAnimListElem down in its header file
Move the `bAnimListElem` struct down in its header file, so that it sits
underneath the `enum` types that it uses. This move is necessary for an
upcoming refactor where the struct actually declares its fields to be of
those enum types.

Separating the move from the actual change in type will help with
clarity in the diffs.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/122874
2024-06-07 13:48:32 +02:00
Campbell Barton
7d8b18a3fd Merge branch 'blender-v4.2-release' 2024-06-07 21:45:42 +10:00
Campbell Barton
c0f39e7b40 Extensions: correct 3D coat mapping 2024-06-07 21:44:14 +10:00
Jacques Lucke
c85b4c1f84 Merge branch 'blender-v4.2-release' 2024-06-07 13:42:14 +02:00
Jacques Lucke
68db2c8328 Fix #122607: connect deactivated viewer causes crash 2024-06-07 13:39:36 +02:00
Jacques Lucke
1573091b48 Merge branch 'blender-v4.2-release' 2024-06-07 13:26:54 +02:00
Nathan Vegdahl
a36599b323 Anim: implement 3D viewport keyframing functionality for layered actions
This modifies the 3D viewport keyframing operators to work with layered
actions.  The functionality is relative basic, and still leaves some things out.
Of particular note:

- Keyframing with keying sets does not yet work.
- User preferences such as the `XYZ to RGB` flag and the keyframe interpolation
  type are not yet used/respected.
- Something not caused by this PR but revealed by it: when the last keyframe of
  an fcurve is deleted in a layered action, the fcurve still sticks around. This
  is different from legacy actions, which delete fcurves when their last key is
  deleted. Since the "Only Insert Available" feature is based on the existence
  of fcurves, that makes the feature appear broken in some circumstances right
  now with layered actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/121661
2024-06-07 13:26:18 +02:00
Jacques Lucke
34588cd933 Fix: invalid data sharing after loading certain .blend files
This fixes a bug that happens when two drawings in the same grease pencil
data-block reference the same array. In this case, the same attribute array
pointer is written to .blend files for both drawings. However, when loading the
.blend file, it was not detected that the data is shared. Instead each drawing
would think that it was the single owner of the array even though it was shared.

The same problem can technically occur for all kinds of shared data, and not
just for grease pencil. However, only grease pencil shows this issue currently,
because it can easily happen that the same attribute is shared between different
`CustomData` within the same data-block. This very rarely happens with meshes or
curves, because different `CustomData` usually have different sizes and don't
share the same arrays.

A previous fix (cc891aa699) solved pretty much the same issues for the case
when two layers in the same `CustomData` share data. This original fix is now
generalized and is integrated with `BLO_read_shared` which makes it less error
prone. For each data-block, the `BlendDataReader` now remembers which shared
data it has loaded before so that it is not loaded again.

In the future this could be extended to support data that is shared between
data-blocks, but that's not as straight forward as one would hope currently. For
various reasons, different data-blocks could store independent data at the same
pointer. I specifically noticed that with a regression test file:
`blender/tests/data/modeling/geometry_nodes/attributes/attribute_statistics.blend`.
To support it, one solution could be to tag `BHead` in .blend files to indicate
that a specific pointer is shared and unique within the entire file. But that's
for another day.

Pull Request: https://projects.blender.org/blender/blender/pulls/122780
2024-06-07 13:22:39 +02:00
Bastien Montagne
7d9ee6bb71 Merge branch 'blender-v4.2-release' 2024-06-07 12:59:14 +02:00
Thomas Barlow
eb7a2f47d2 Fix #122794: FBX Subsurf Export applies the last Subsurf modifier
Disabling the last Subdivision Surface modifier was removed by mistake
in
blender/blender-addons/commit/bc801d7b1dad4be446435e0cab4d3a80e6bb1d04

This patch restores the mistakenly removed code that disables the last
Subdivision Surface modifier when the option to export FBX Subdivision
Surface is enabled.

The add-on's patch version has been increased.

Pull Request: https://projects.blender.org/blender/blender/pulls/122841
2024-06-07 12:55:29 +02:00
Campbell Barton
c9324a0baa Merge branch 'blender-v4.2-release' 2024-06-07 17:38:51 +10:00
Campbell Barton
7e2552e4af Merge branch 'blender-v4.2-release' 2024-06-07 17:38:48 +10:00
Campbell Barton
059dc93cde Extensions: support refreshing local repositories when offline
Since [0] there was no way to refresh local repositories,
with the poll messages suggesting to restart Blender to see updates
which isn't practical for developers.

The ability to refresh was prevented when "Online Access" was disabled,
meaning a developer couldn't easily develop their own add-ons unless
they were online.

[0]: 651621da0d
2024-06-07 17:36:59 +10:00
Campbell Barton
3dd8c826b5 Extensions: correct the descriptions for active repository actions 2024-06-07 16:52:51 +10:00
Campbell Barton
69e6240587 Merge branch 'blender-v4.2-release' 2024-06-07 16:34:09 +10:00