Commit Graph

106802 Commits

Author SHA1 Message Date
Hans Goudey
1c3c1e7776 Cleanup: Simplify asset metadata copy function
Also move the destructor declaration to be consistent with the style guide.
2024-02-14 12:06:56 -05:00
Harley Acheson
48dee674f3 UI: Changes to Menu Separator Padding
Add interior horizontal padding to menu separator lines.

Pull Request: https://projects.blender.org/blender/blender/pulls/118227
2024-02-14 17:14:17 +01:00
Hans Goudey
a52323d711 Cleanup: Move BKE_duplilist.hh to C++ 2024-02-14 10:51:46 -05:00
Hans Goudey
ed0be291c8 Cleanup: Use float4x4 matrix type in volume displace modifier 2024-02-14 10:51:46 -05:00
Clément Foucault
f20425bc4c Fix: EEVEE-Next: Missing Volume Probe update after world update 2024-02-14 16:24:02 +01:00
Hans Goudey
1c0f374ec3 Object: Move transform matrices to runtime struct
The `object_to_world` and `world_to_object` matrices are set during
depsgraph evaluation, calculated from the object's animated location,
rotation, scale, parenting, and constraints. It's confusing and
unnecessary to store them with the original data in DNA.

This commit moves them to `ObjectRuntime` and moves the matrices to
use the C++ `float4x4` type, giving the potential for simplified code
using the C++ abstractions. The matrices are accessible with functions
on `Object` directly since they are used so commonly. Though for write
access, directly using the runtime struct is necessary.

The inverse `world_to_object` matrix is often calculated before it's
used, even though it's calculated as part of depsgraph evaluation.
Long term we might not want to store this in `ObjectRuntime` at all,
and just calculate it on demand. Or at least we should remove the
redundant calculations. That should be done separately though.

Pull Request: https://projects.blender.org/blender/blender/pulls/118210
2024-02-14 16:14:49 +01:00
Clément Foucault
bdd15e827f Fix: EEVEE-Next: Crash in bake caused by motion blur
Motion blur needs to be disabled for volume probe baking.
2024-02-14 15:55:36 +01:00
Omar Emara
357d6fcae1 Cleanup: Format 2024-02-14 16:50:20 +02:00
Brecht Van Lommel
aefd930317 Fix: Build error when not using unity build 2024-02-14 15:13:12 +01:00
Clément Foucault
2d08e16601 Cleanup: EEVEE-Next: Split display sync function 2024-02-14 15:09:31 +01:00
Clément Foucault
ee6c7d8eea Fix: EEVEE-Next: Sphere Probe: Wrong world probe index 2024-02-14 15:09:31 +01:00
Jacques Lucke
d27a1c47fa Nodes: hide uneditable input sockets in sidebar
This hides some labels from the sidebar which look a bit out of place.

Pull Request: https://projects.blender.org/blender/blender/pulls/118264
2024-02-14 14:47:07 +01:00
Sergey Sharybin
a8a05ebba1 Compositor: Switch CPU compositor to Full-Frame
The tiled compositor code is mainly still around, which is only
expected to be a short-lived period. Eventually it will also be
removed.

The OpenCL, Group Buffers, and Chunk size options are already removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/118010
2024-02-14 14:23:49 +01:00
Clément Foucault
1f8fac5082 Fix: EEVEE-Next: Broken light baking from script
The G.is_break was not properly set back to false
and the data was never copied back to the original
object.
2024-02-14 13:02:01 +01:00
Sergey Sharybin
2cec7e3aa5 Fix levels node regression in tiled compositor
Caused by previous change for full-frame compositor.

The determine_canvas() is still used by the tiled compositor,
so restore it to the state which makes both compositors to work.

Pull Request: https://projects.blender.org/blender/blender/pulls/118254
2024-02-14 12:02:59 +01:00
Pratik Borhade
dda277e48c Merge branch 'blender-v4.1-release' 2024-02-14 16:22:28 +05:30
Pratik Borhade
f344823785 UI: Opus files not included in sound files filter
Include `.opus` extension in audio filter list

Fixes #118235

Pull Request: https://projects.blender.org/blender/blender/pulls/118238
2024-02-14 11:39:11 +01:00
Pratik Borhade
18912561b5 Fix #118163: Crash hiding face sets with multires
Caused by ce4ec6d42b
Crash occurs due to accessing `corner_tri_faces` when pbvh tpye is
"grid".
Fix is same as 72d324bd81

Pull Request: https://projects.blender.org/blender/blender/pulls/118183
2024-02-14 11:37:11 +01:00
Sergey Sharybin
a1047e0689 Compositor: Make CPU Level node output single value
This aligns the node behavior to GPU compositor.

The implementation is a bit of a stretch of the full-frame
constant-foldable operations, but this is as good as it can
get in a short time.

The alternative could be to somehow inject a SetValue
operation, but since it expects ahead-of-time known value it
is not as straight forward.

Pull Request: https://projects.blender.org/blender/blender/pulls/118248
2024-02-14 10:54:59 +01:00
Campbell Barton
5a86067ff0 Fix build error from duplicate include 2024-02-14 14:27:58 +11:00
Campbell Barton
291ca4ec8e Cleanup: unused variable, redundant strlen call 2024-02-14 13:59:37 +11:00
Campbell Barton
aa6ab9caf9 Cleanup: various non-functional changes for C++ 2024-02-14 13:56:58 +11:00
Campbell Barton
cdc17751ae Cleanup: format 2024-02-14 13:53:36 +11:00
Campbell Barton
1111dff0a6 Tests: improvements to BLI_convexhull_2d_test
The convex hull tests included a reference AABB-fitting function for
comparison which was used to validate the optimized implementation.
This wasn't great as it depended on matching exact return values and
didn't test the logic of AABB-fitting worked usefully.

Replace this with a more general test that creates random polygons with
known bounds, apply a random rotation & translation, then use
AABB-fitting to un-rotate the points, passing when the bounds are no
larger than the size of the generated input.

Details:

- Make BLI_convexhull_aabb_fit_hull_2d a static function again as it was
  only exposed for tests. Use BLI_convexhull_aabb_fit_points_2d instead.
- Remove brute force reference implementation from tests,
  moving this to an assertion within convexhull_2d
  (disabled by default since it's quite slow).
2024-02-14 13:42:14 +11:00
Campbell Barton
3f8cd44485 Cleanup: move BLI_strict_flags.h last, not that it should be kept last
Also add a note in the header why it should be kept last.
2024-02-14 13:40:31 +11:00
Germano Cavalcante
e6e4e6c287 Optimization: avoid calculating the contraint plane when transforming
In most cases, we only need the normal of the plane.

It's a micro-optimization, the difference is very subtle.
2024-02-13 21:21:48 -03:00
Germano Cavalcante
1a74b80d42 Refactor: replace 'isect_ray_plane_v3' with 'isect_ray_plane_v3_factor'
By using `isect_ray_plane_v3_factor` we avoid calculating the v4 plane.
2024-02-13 21:08:49 -03:00
Germano Cavalcante
c9bd326255 Merge branch 'blender-v4.1-release' 2024-02-13 20:35:52 -03:00
Germano Cavalcante
c6e229d3e4 Fix #118221: Snap to Edge with Constraint Plane shifts out of plane
The intersection needs to be calculated with the plane passing through
the snap pivot.
2024-02-13 20:35:08 -03:00
Hans Goudey
5ba6f6d833 Cleanup: Replace typedef keyword in C++ headers 2024-02-13 15:34:32 -05:00
Hans Goudey
7b77c2ebd4 Cleanup: Remove unused 3D view function declaration 2024-02-13 15:00:01 -05:00
Miguel Pozo
2a2effc0c2 Workbench: Share shader cache across instances
Improve instance creation performance by sharing compiled shaders
across instances. (See #114990)

Pull Request: https://projects.blender.org/blender/blender/pulls/118062
2024-02-13 20:56:54 +01:00
Harley Acheson
8fee7c5fc7 UI: Line Under Title for Properties Dialogs
When a popup dialog includes properties, add a line under the title.

Pull Request: https://projects.blender.org/blender/blender/pulls/118051
2024-02-13 20:37:45 +01:00
Hans Goudey
9cf304160b BLI: Add missing overrides to some generic virtual array implementations
The lack of these functions in the "single trivial value" and "sliced
GVArray" implementations caused some code to call fack to the base
class functions. Those are much slower since they involve a virtual
function call per element. For example, this changed the runtime of
creating a new boolean attribute set to "true" on one million faces
from 3.4 ms to 0.35 ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/118161
2024-02-13 19:59:58 +01:00
Clément Foucault
88228a84d1 Fix: EEVEE-Next: Another uninitialized variable in volume probe loading
The spherical_harmonics_triple_product was not working as
expected and produced NaNs.

Cleanup to avoid more confusion.
2024-02-13 19:05:15 +01:00
Clément Foucault
13f0d7bd47 Fix: EEVEE-Next: Uninitialized variable in volume probe loading
The spherical_harmonics_triple_product was not working as
expected and produced NaNs.
2024-02-13 18:59:53 +01:00
Clément Foucault
65d42af3e3 Fix: EEVEE-Next: Broken light capture on emission only materials
This was cause by uninitialized fragment output.
2024-02-13 18:59:53 +01:00
Clément Foucault
6802d87329 EEVEE-Next: Remove DeferredProbeLayer intermediate class
This class is redundant as it is never instanced more
than once.
2024-02-13 18:59:53 +01:00
Clément Foucault
ba6e6e96ed EEVEE-Next: Move ray type change out of view loop
Avoid needlessly pushing the uniform_data to the GPU.
2024-02-13 18:59:53 +01:00
Clément Foucault
0bab7b59a1 EEVEE-Next: Use same GBuffer binding logic for every pipeline 2024-02-13 18:59:53 +01:00
Hans Goudey
1cfe9dd08c Geometry Nodes: Matrix socket type, attribute type, and initial nodes
Implements the design from #116067.
The socket type is called "Matrix" but it is often referred to as "Transform"
when that's what it is semantically. The attribute type is "4x4 Matrix" since
that's a lower level choice. Currently matrix sockets are always passed
around internally as `float4x4`, but that can be optimized in the future
when smaller types would give the same behavior.

A new "Matrix" utilities category has the following set of initial nodes"
- **Combine Transform**
- **Separate Transform**
- **Multiply Matrices**
- **Transform Direction**
- **Transform Vector**
- **Invert Matrix**
- **Transpose Matrix**

The nodes and socket type are behind an experimental flag for now,
which will give us time to make sure it's the right set of initial nodes.
The viewer node overlay doesn't support matrices-- they aren't supported
for rendering in general. They also aren't supported in the modifier interface
currently. But they are supported in the spreadsheet, where the value is
displayed in a tooltip.

Pull Request: https://projects.blender.org/blender/blender/pulls/116166
2024-02-13 18:59:36 +01:00
Hans Goudey
21cea65ea6 WM: Add runtime struct
Currently most of the data stored in `wmWindowManager` is runtime
data not saved to files. It's confusing that it's declared in DNA then. That
also prevents us from using C++ features. This commit adds an initial
runtime struct. Moving data there can be done as a separate step.
Initially I wanted to look at moving the `ReportList` system to C++.

The runtime struct has to be defined in the blenkernel module because
the members are (will be) used there in a few places.

Pull Request: https://projects.blender.org/blender/blender/pulls/118157
2024-02-13 17:45:05 +01:00
Omar Emara
8b46fdeab8 Fix: Translate node crashes for single inputs
The Translate node crashed for single inputs in the Full Frame
compositor, that's because it always assumed image inputs. So fix this
by handling the single value case.
2024-02-13 17:45:28 +02:00
Miguel Pozo
9fb17c1ca4 Workbench: Skip per-sample sync in image renders
Use the same method as viewport image renders.
2024-02-13 16:31:06 +01:00
Clément Foucault
778945a2cd Fix: EEVEE-Next: NaN in surfel lighting with area lights
This fix broken lighting in volume probe baking if
any area light is present in the scene.
2024-02-13 16:29:06 +01:00
Bastien Montagne
5baef63a20 BKE ID remap: Refactor: Remove C API around CPP IDRemapper.
The ID remapper code was already largely defined in a CPP struct
(IDRemapper). Make this an actual class, and remove the C API wrapper
around.

This makes the code cleaner, easier to follow, and easier to extend or
modify in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/118146
2024-02-13 15:36:38 +01:00
Raul Fernandez
d284941e89 Fix #99172: Sculpt Paint Tool: Strength doesn't use unified paint settings.
Previously in the function brush_strenght , the SCULPT_TOOL_PAINT case didn't took into account the unified strength parameter.

Pull Request: https://projects.blender.org/blender/blender/pulls/118109
2024-02-13 15:22:00 +01:00
Germano Cavalcante
1dd163c2f7 Fix: build error with 'WITH_CXX_GUARDEDALLOC' 2024-02-13 10:59:56 -03:00
Campbell Barton
2119d271e0 Cleanup: remove "-noaudio" argument in background mode
This is no longer needed as background mode implies -noaudio.
2024-02-14 00:13:38 +11:00
Campbell Barton
7c90018f23 CLI: make "-noaudio" implicit with "-b/--background"
Running background mode now behaves as if the "-noaudio" was passed in.

The -setaudio command now has a "Default" option which can be used
in the rare cases audio playback is desired in background mode. e.g.

  blender --background -setaudio Default

Ref !118192
2024-02-14 00:13:37 +11:00