Commit Graph

120055 Commits

Author SHA1 Message Date
Bastien Montagne
cf3323fe32 Merge branch 'blender-v4.2-release' 2024-06-08 16:29:50 +02:00
Bastien Montagne
f59f5fd83f Fix #122901: Geonodes modifier- setting an imput as string crashes blender.
Regressions (typo) from 57669600b1.
2024-06-08 16:26:28 +02:00
Campbell Barton
3412a34145 Merge branch 'blender-v4.2-release' 2024-06-08 23:34:46 +10:00
Campbell Barton
5f06d3aa17 Extensions: consider system repositories read-only
The following operations have been removed for system repositories:

- Installing from disk.
- Uninstall extensions.
- Delete files (when removing the repository).

Also change the operator to remove a repository so the option to
remove files is now a boolean instead of an enum. While a dynamic
enum can be made to work, this option is logically a boolean.
2024-06-08 23:04:17 +10:00
Campbell Barton
c0c1f1884a Merge branch 'blender-v4.2-release' 2024-06-08 13:46:38 +10:00
Campbell Barton
4718d68349 Extensions: expose extensions debug option in release builds
These are useful for more verbose output and expose useful utilities
for development.
2024-06-08 13:32:24 +10:00
Clément Foucault
3f247d6a3c Fix: GPU: Make tests compile 2024-06-08 00:25:40 +02:00
Germano Cavalcante
cf73d80deb Merge branch 'blender-v4.2-release' 2024-06-07 17:59:51 -03:00
Germano Cavalcante
4690c69a65 Fix #122787: Grid snap in UV Editor also snaps to vertices
The `Snap to Grid` and `Snap to Vertex` modes were being mixed if
either mode was enabled.

Support for mixed snap modes doesn't yet fully work for UVs.
2024-06-07 17:58:45 -03:00
Jesse Yurkovich
77baa064ce Merge branch 'blender-v4.2-release' 2024-06-07 13:29:15 -07:00
Jesse Yurkovich
e24eb7d85c Fix #122820: Collection export would dirty the file
The various collection export operators had their flags set for undo.
This isn't necessary and would cause the .blend file to be marked dirty.

Pull Request: https://projects.blender.org/blender/blender/pulls/122864
2024-06-07 22:28:07 +02:00
Germano Cavalcante
6bf9d6f038 Merge remote-tracking branch 'origin/blender-v4.2-release' 2024-06-07 16:45:33 -03:00
Germano Cavalcante
2cb8b4b7f7 Fix #122438: Orbit Around Selection drastically moves view
When starting a navigation operation that uses `Auto Depth` or
`Orbit Around Selection` the value of `#RegionView3D::dist` is modified
to match the distance from the new pivot.

This value was incorrect when the pivot was behind the viewer.

In these cases `dist` is negative.

This commit, in addition to fixing `dist`, also limits the execution of
this code to only when `Auto Depth` is used.

Pull Request: https://projects.blender.org/blender/blender/pulls/122795
2024-06-07 21:41:50 +02:00
Hans Goudey
a6d00905f0 Cleanup: Sculpt: Simplify retrieval of multires draw buffers layout
Pull Request: https://projects.blender.org/blender/blender/pulls/122899
2024-06-07 21:35:21 +02:00
Hans Goudey
5013ab90f6 Cleanup: Sculpt: Rename PBVH draw multires variable
Everything here is drawn as triangles in the end, and currently we use
index buffers either way, so "needs_tri_index" isn't a meaningful name.
What this really controls is whether the layout is flattened to duplicate
each subdiv vertex 4 times, for drawing flat shading.
2024-06-07 21:35:19 +02:00
Hans Goudey
8df0690ab4 Sculpt: Optimize mesh wireframe index buffer creation
Retrieve the index buffer data as a span and set it directly rather than
using the API functions to add vertices which add overhead. Also pass
all the necessary data as arguments instead of retrieving them from
the "args" struct on every use.

In a test with a 16 million vertex grid, this reduces the runtime of
generating all the wireframe index buffers by about 25%, from 95 to 76 ms
for that step of the drawing process.
2024-06-07 21:35:19 +02:00
Hans Goudey
0d9d6fad41 Cleanup: Sculpt: Remove unnecessary draw debugging code 2024-06-07 21:35:19 +02:00
Hans Goudey
a9907c4ed9 Sculpt: Fix over-allocation of wireframe index buffers
The lines index buffers were twice as big as they needed to be.
The init function already multiplies by the number of indices in
the primitive type.
2024-06-07 21:35:19 +02:00
Hans Goudey
39894f4beb Sculpt: Avoid double map lookup creating draw batches 2024-06-07 21:35:19 +02:00
Hans Goudey
279fda3dcd Cleanup: Sculpt: Reorder function to avoid forward declaration 2024-06-07 21:35:19 +02:00
Hans Goudey
c18d209b85 Refactor: Sculpt: Move some drawing code out of classes
Most functions in `draw_pbvh.cc` are inside of the `PBVHBatch` or
`PBVHBatches` classes, besides the more recently added attribute
copying code. This means they have access to "all the information"
and it's hard to get a sense for the proper order of calculation and
what each function is responsible for. This commit is an attempt to
clarify things a bit by changing to regular static functions.
2024-06-07 21:35:19 +02:00
Hans Goudey
dc0fe8a26c Cleanup: Sculpt: Remove unnecessary variables from draw batches
lines_count was set but never used. tris_count was the same in one
case and just set to the same value as faces_count in another.
2024-06-07 21:35:19 +02:00
Hans Goudey
fd992c57bf Cleanup: Sculpt: Avoid unnecessary clearing of index buffers 2024-06-07 21:35:19 +02:00
Hans Goudey
8cac7bc6cc Cleanup: Sculpt: Use CCG grid index access utility in drawing code 2024-06-07 13:39:12 -04:00
Hans Goudey
9f4930509e Cleanup: Sculpt: Rename multires draw iteration variables
These "j" and "k" are actually X and Y, it's a bit easier to understand
what's going on if they're named that way.
2024-06-07 13:39:12 -04:00
Hans Goudey
466df1a97a Subdiv: Utility for grid index XY lookup, use in paint visibility function 2024-06-07 13:39:11 -04:00
Miguel Pozo
2276d0e767 Merge branch 'blender-v4.2-release' 2024-06-07 19:01:47 +02:00
Miguel Pozo
35cfc71b95 EEVEE: Parallel specialization constants compilation
Convert `Renderbuffers::sync` into `RenderBuffers::init`.
Use `GPU_shaders_precompile_specializations` in EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/122798
2024-06-07 18:53:59 +02:00
Miguel Pozo
83db9cc7b4 Merge branch 'blender-v4.2-release' 2024-06-07 18:47:47 +02:00
Miguel Pozo
22652b305e GPU: Add GPU_shaders_precompile_specializations
Allow precompiling specialization constants variations in parallel.
Only supported in OpenGL as the rest of the batch compilation API,
on the other backends the function is a no-op.
This also moves the `SpecializationConstant` from
`gpu_shader_create_info` (private API) into`GPU_common_types`
(public API).

Pull Request: https://projects.blender.org/blender/blender/pulls/122796
2024-06-07 18:45:31 +02:00
Raul Fernandez
dae3554d5c Fix #122786: Multiresolution > Apply Base produces garbled meshes
This changes fixes a wrong mesh as a result of apply base mesh from the Multires modifier

In the previous code some corner vertices where incorrectly assigned to null and skipped form processing as a safety guard
that was only relevant when the mesh had hidden faces in edit mode. The hidden corner vertices bug is handled now when checking

> if (corner_x_index < 0 || corner_y_index < 0) {
> continue;
> }

Since the patch that caused this error was a fix to a previous infinite loop bug,
I also tested and made sure this updated patch still fixes the original issue it was trying to fix.

Note: This PR replaces #122845 due to a large amount of git rebase issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/122859
2024-06-07 18:35:28 +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
b4523a42b0 Merge branch 'blender-v4.2-release' 2024-06-08 00:45:16 +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