Commit Graph

135933 Commits

Author SHA1 Message Date
Clément Foucault
d9945a218f Fix: EEVEE-Next: Wrong minimum value for volume probe surfel density 2024-05-08 18:55:07 +02:00
Clément Foucault
0e4e05ec97 EEVEE-Next: Make volume light-probe surfel density scale dependant
This avoids wrong default values and make setup easier.

This changes the RNA and DNA to create a new nice default
depending on resolution.
2024-05-08 18:22:44 +02:00
YimingWu
a987fac1a3 Fix #121548: Use evaluated object for local view
Object with deformations will have different boundbox, this fix made
local view respect the deformation.

Pull Request: https://projects.blender.org/blender/blender/pulls/121552
2024-05-08 18:13:00 +02:00
Jacques Lucke
125afb20d3 Nodes: reorganize node group properties UI
The initial motivation for this came from #121334, because now there
are two description inputs which look very alike and not's not obvious
at a glance where they belong to. Additionally, I find myself sometimes
looking for node properties in the group properties panel because of the same panel name.

This patch does the following changes to improve the situation:
* Reorder the node group properties and socket interface panel.
* Rename `Properties` panel to `Group` (similar to `Node` in the corresponding tab).
* Rename the `Interface` panel to `Group Sockets`.
* Add a `Name` field for the node group. This makes it even more obvious that
  one is looking at the group properties. Also it makes it possible to rename
  the group without having to go up one level to change the name in the group node.
* New layout-panel for the different usages. This only exists for geometry nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/121564
2024-05-08 18:03:49 +02:00
Harley Acheson
5aa996e49f UI: Knife Tool Missing Iface for Pan View
Knife Tool status bar display is missing translation of "Pan View".

Pull Request: https://projects.blender.org/blender/blender/pulls/121581
2024-05-08 17:14:59 +02:00
Falk David
9a3abe22a3 Refactor: GPv3: legacy_gpencil_to_grease_pencil
This is part of #121565.

Refactors `legacy_gpencil_to_grease_pencil` to use
`GreasePencil::insert_frame` instead of manually creating
the drawing array.

Now `legacy_gpencil_frame_to_grease_pencil_drawing`
actually returns a drawing by value.

Note: This means that we're now resizing the drawing
array for every frame in every layer, but this can be optimized
later.
2024-05-08 17:10:08 +02:00
Sergey Sharybin
149e547de6 Compositor: Remove quality setting from DNA and UI
It was meant to be included into the previous commit in the area,
but was forgotten due to some technicalities.

Also remove the DisplaceSimpleOperation, which is now not used.

Pull Request: https://projects.blender.org/blender/blender/pulls/121580
2024-05-08 16:56:32 +02:00
Falk David
fea091e18e Refactor: GPv3: insert_blank_frame
This is part of #121565.

Renames the `insert_blank_frame` function to `insert_frame`.

Instead of returning a boolean for if the keyframe was created,
return a pointer to the drawing. This aligns more with how
we're using this API. After inserting a keyframe, it's common
to then e.g. write to the newly created drawing.

Also use sensible default parameter values for the duration
(default = implicit hold) and the keyframe type
(dafault = `BEZT_KEYTYPE_KEYFRAME`).

With this change, we're moving closer to the goal of
only allowing to create drawings by creating keyframes.
2024-05-08 16:47:46 +02:00
Sergey Sharybin
9532ea3f8c Compositor: Remove Render/Edit Quality setting
The setting was only affecting some of the blur operations, which
does not typically results in a measurable performance boost in real
compositor setups.

For the simplicity of settings on user level remove setting which
potentially makes compositor output worse, without much benefit.

There are better ways to gain performance, like compositing on a
lower resolution, exposing "preview" as an input to the node tree
(similar to the geometry nodes) etc.

Pull Request: https://projects.blender.org/blender/blender/pulls/121576
2024-05-08 16:41:23 +02:00
Falk David
a3c9baacae Cleanup: GPv3: Remove drawing_index parameter from Layer::add_frame
This is part of #121565.
Since the function `Layer::add_frame` returns the `GreasePencilFrame`,
the `drawing_index` can be assigned after it's created.

This brings us a bit closer to the goal of only changing drawing indices
of frames in the internal API.
2024-05-08 15:41:21 +02:00
Campbell Barton
41efa30a75 Fix failure to catch errors parsing arguments to Context.temp_override
Resolve unhandled exception when invalid types for StructRNA arguments
were passed to temp_override(..).
2024-05-08 23:37:22 +10:00
Clément Foucault
ad6e553ad8 Fix: EEVEE-Next: Wrong pixel radius calculation for LIGHT_SUN_ORTHO
Fix #121388
2024-05-08 15:24:40 +02:00
Sergey Sharybin
525f3e6fbb Cleanup: strict compiler warnings
Fixes compilation warning about unused lambda capture.

Pull Request: https://projects.blender.org/blender/blender/pulls/121573
2024-05-08 14:55:05 +02:00
Sergey Sharybin
6db8091f45 Compositor: Remove Two Pass option
There are few issues with the logic and implementation of this option:

- While the first pass is faster in the terms of a wall-clock time, it
  is often not giving usable results to artists, as the final look of
  the result is so much different from what it is expected to be.

- It is not supported by the GPU compositor.

- It is based on some static rules based on the node type, rather than
  on the apparent computational complexity.

The performance settings are planned to be moved to the RenderData, and
it is unideal to carry on such limited functionality to more places. There
are better approaches to quickly provide approximated results, which we can
look into later.

Pull Request: https://projects.blender.org/blender/blender/pulls/121558
2024-05-08 14:34:11 +02:00
Pratik Borhade
5df1ee46bc GPv3: Add layer inside active layer group
If a layer group is active in properties panel, add the new layer
inside this group.

Pull Request: https://projects.blender.org/blender/blender/pulls/121568
2024-05-08 14:23:09 +02:00
Sebastian Parborg
0e67f060ee Fix: Don't take overlays into account when drawing curves
Previously when drawing curves and using surface project, the strokes
would snap to gizmos like lights and camera objects. This is not what
most people expect when projecting to surface objects, so disable them
from the depth check.

Pull Request: https://projects.blender.org/blender/blender/pulls/121530
2024-05-08 14:04:43 +02:00
Julian Eisel
d3b2906348 UI: Respect fixed layout width in grid view layout calculations
Fixed layout widths would previously be ignored, resulting in incorrectly sized
grid view items. This is especially relevant for displaying grid views in
popups, where these fixed width are commonly used.

Necessary for the brush assets project which adds a popup version of the asset
shelf, see #116337.
2024-05-08 13:36:11 +02:00
Jacques Lucke
25c134fd08 Geometry Nodes: new Axes to Rotation node
This adds a new `Axes to Rotation` node which creates a new rotation.
In many cases, the primary and secondary axis inputs are a normal and
tangent of a mesh or curve. This provides a simpler and more direct way
to create this rotation compared to using two `Align Rotation to Vector` nodes.

This more direct way of computing the rotation also allows us to optimize
the case better.

The node rotates one axis (X, Y or Z) to the given primary axis direction. Then
 it rotates around that primary direction to align the second axis to the given
secondary direction. Ideally, both input axes are orthogonal. However, the node
still creates the "best" rotation when they are not orthogonal. If one or the axes
is zero or both are (close to) parallel, the resulting rotation is unstable. There is
not too much the node can do to make it more stable.

Pull Request: https://projects.blender.org/blender/blender/pulls/104416
2024-05-08 13:34:14 +02:00
Campbell Barton
3d84a1170f Extensions: ensure extensions "site-packages" precede Python's
Ensure extensions modules aren't overridden to the systems modules.
Without this, installing a system module could break an extension.
2024-05-08 21:32:16 +10:00
Julian Eisel
b7bb0e94a0 UI: Allow displaying grid views in popups
The optimization to only add grid view items to the layout that are actually in
view relied on View2D information on scrolling. Popups don't use View2D, so
with this change the optimization will be skipped when View2D is not used.

Necessary for the brush assets project which adds a popup version of the asset
shelf, see #116337.
2024-05-08 13:30:27 +02:00
Vitaljok
be1f527cb4 EEVEE Next: Fixing sun shadows in ortho camera
Fix #120566 case.

Moved initial `lod_bias` calculations from `Light` struct to
`ShadowDirectional` and `ShadowPunctual` classes to avoid value
runaway during subsequent syncs. Changed internal functions to
use member variable instead of parameters.

Pull Request: https://projects.blender.org/blender/blender/pulls/121541
2024-05-08 13:07:39 +02:00
Campbell Barton
3290e25dc4 Cleanup: spelling in comments & code 2024-05-08 20:57:05 +10:00
Campbell Barton
e64d067c78 Docs: document why the eventstate is cleared while refreshing a popup
Also correct a comments grammar.
2024-05-08 20:44:36 +10:00
Falk David
737572ed88 Cleanup: GPv3: Use GreasePencil::layer function instead of GreasePencil::layers
This also ensures that there is an assert that checks
for valid indices before accessing the span of layers.
2024-05-08 12:35:06 +02:00
Guillermo Venegas
3a640a4707 Fix #121280: clamp layout panel sub-background color to block region
Pull Request: https://projects.blender.org/blender/blender/pulls/121534
2024-05-08 12:32:51 +02:00
Falk David
bba4555526 Refactor: GPv3: Remove get_eval_grease_pencil_layer_drawing* functions
As part of #121565.

To avoid using drawing indices outside of the internal grease pencil API,
this refactor adds the functions `GreasePencil::get_eval_drawing` to replace
the `get_eval_grease_pencil_layer_drawing*` functions.

Pull Request: https://projects.blender.org/blender/blender/pulls/121567
2024-05-08 12:27:40 +02:00
Pratik Borhade
5f1a31c88a GPv3: Change "active" property to "active_layer"
Rename layer property `active` -> `active_layer` to distinguish
between active layer and active layer group.
The active group property was introduced in d1710f7232.

Pull Request: https://projects.blender.org/blender/blender/pulls/121563
2024-05-08 12:18:00 +02:00
Falk David
2707cc28fd GPv3: Add asserts for drawing access by index
Assert that the index is valid before accessing the span.
2024-05-08 12:09:10 +02:00
Jacques Lucke
d740d6b942 Fix: node group description only available for geometry nodes 2024-05-08 11:42:00 +02:00
Jacques Lucke
6176e66636 Nodes: add node group description
This allows node groups to have a description that is shown in the add menu
or when hovering over the node header.

This new description is stored in `bNodeTree.description`. Unfortunately, it
conflicts a bit with `ID.asset_data.description`. The difference is that the latter
only exists for assets. However, it makes sense for node groups to have
descriptions even if they are not assets (just like `static` functions in C++ should
also be able to have comments). In some cases, node groups are also generated
by addons for a specific purpose. Those should still have a description without
being reusable to make it easier to understand for users.

The solution here is to use the asset description if the node group is an asset,
and to use `bNodeTree.description` otherwise. The description is synced
automatically when marking or clearing assets.

A side benefit of this solution is that appended node group assets can keep their
description, which is currently always lost.

Pull Request: https://projects.blender.org/blender/blender/pulls/121334
2024-05-08 11:25:00 +02:00
Aras Pranckevicius
d66598c16f VSE: Text shadow blur / outline
Text strips in VSE got:
- Configurable shadow angle and offset (previously shadow location relative to
  text was fixed). Currently the shadow position is rounded to integer pixel
  locations; sub-pixel positioning might come later.
- Optional shadow blur amount.
- Optional outline, with color and outline width controls. Outline is
  implemented using jump flooding algorithm.

Images and more detail in pull request.

Pull Request: https://projects.blender.org/blender/blender/pulls/121478
2024-05-08 11:13:20 +02:00
Philipp Oeser
5817553105 Fix: python errors due to missing shadow resolution scale prop
Was moved (as different prop) to the sampling panel in 826d2ed4ec

Pull Request: https://projects.blender.org/blender/blender/pulls/121561
2024-05-08 10:31:43 +02:00
Pratik Borhade
d1710f7232 GPv3: Support layer group selection
Introduce new `active_group` pointer and get/set api functions.
Use RNA to change active group in on_activate() function, similar to
layer selection: 4c12801532

Pull Request: https://projects.blender.org/blender/blender/pulls/121524
2024-05-08 09:05:32 +02:00
Harley Acheson
dfe060ea6f UI: Edit Mesh Knife Status Display
While using the knife tool show keymap entries and statuses in a more
informative and concise way.

Pull Request: https://projects.blender.org/blender/blender/pulls/121506
2024-05-07 22:15:12 +02:00
Hans Goudey
ba9286706a Geometry Nodes: Sample Grid Index node
This (experimental, for now) node retrieve's voxel values
at specific voxel indices for a grid input. It's similar to the
Sample Grid node (77cba3d551), but there is
no interpolation, and it uses indices instead of positions.

Pull Request: https://projects.blender.org/blender/blender/pulls/118690
2024-05-07 21:53:22 +02:00
Harley Acheson
42a8947eb1 UI: Edit Mesh Inset Faces Status Display
Show changing values in the area header, but keymap entries on the
Status Bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/121504
2024-05-07 21:45:34 +02:00
Habib Gahbiche
6f2afc7390 Fix #121436: Compositor: 2d Stabilization translates image when set to bicubic
The node uses multiple transform operations, each using its own sampling. Using bicubic sampling in the translate node causes undesired offsets.

These changes were intentional (see test updates in `c4e1be73`), but the offsets were thought to be too small for users to notice.

Pull Request: https://projects.blender.org/blender/blender/pulls/121495
2024-05-07 21:08:28 +02:00
Ray Molenkamp
a602e4fa40 CMake: Fix ASAN builds on windows
When building with asan enabled on windows tools such as
msgfmt will run before the install phase which normally
copies the required asan dlls next to the binaries preventing
msgfmt from stating and causing a build error.

This change adds the MSVC path to the PLATFORM_ENV_BUILD_DIRS
so when we run the various tools the asan shared libs can
be found.
2024-05-07 12:19:20 -06:00
Hans Goudey
c4051c3216 Fix #121347: GPU subdivision loose edges hidden with no non-loose edges
There was an incorrect early return in 1b7e67a851.
2024-05-07 14:07:30 -04:00
Richard Antalik
897664ccc5 Fix #121319: Mask modifier not clamped to mask strip
Skip modifier, when using strip as a mask that ends before specified
timeline frame. To make behavior of missing mask more consistent,
modifier is also skipped, when strip produces blank output due to
missing data.

Skipping modifier due strip boundary only works, when "Mask Time" is set
to Relative mode. This is because absolute mode ignores strip offsets.

Pull Request: https://projects.blender.org/blender/blender/pulls/121498
2024-05-07 19:37:24 +02:00
Hans Goudey
1210a53c6d Fix #121503: Loose edges lines index buffer crash
The array used to not set the data for an edge multiple times
was the wrong size.
2024-05-07 13:18:52 -04:00
Miguel Pozo
96c0533997 Fix #120762: Linked materials always initialize MA_BL_TRANSPARENT_SHADOW from EEVEE settings
If `bmain->scenes.first` is null, we can't know which engine settings we should
use to initialize `MA_BL_TRANSPARENT_SHADOW`.
Default to Cycles settings in this case, since EEVEE-Next is going to break
compatibility anyway.
See
https://projects.blender.org/blender/blender/issues/120762#issuecomment-1183725

Pull Request: https://projects.blender.org/blender/blender/pulls/121537
2024-05-07 19:17:58 +02:00
Clément Foucault
bd34a74439 Fix: EEVEE-Next: Incorrect Alpha in AOVs
Was caused by float imprecision and storage precision
conversion. Use same fix as combined pass but
more selective as the alpha channel can contain
other data for AOVs.

Fix #118494
2024-05-07 18:39:33 +02:00
Raul Fernandez
00e2f55239 Fix #99887: Multires Unsubdivide freezes Blender with hidden geometry
Previously in
```
edge_y = edge_step(current_vertex_y, edge_y, &current_vertex_y);
while (!BM_elem_flag_test(current_vertex_y, BM_ELEM_TAG))
```
With hidden faces this code enters in an infinite loop by returning the same null
edge in edge_step() and the same current_vertex_y causing Blender to crash.

The current fix solves the infinite loop and provides a solution when faces are hidden.
This causes the hidden faces to be merged into one for unsubdivided per original dev's implementation.

At minimum the crash is identified and a solution proposed.
Attached is a video of the fix

Pull Request: https://projects.blender.org/blender/blender/pulls/121086
2024-05-07 18:04:52 +02:00
Vitaljok
88b56a6ad2 Fix: EEVEE-Next: Missing Shader to RGB node when dragging output link from the node and searching
Added `BLENDER_EEVEE_NEXT` engine ID to polling code called during
"drag search". Main ADD menu routines already had this ID.

Fixes #121026 missing `Shader to RGB` node.
`Specular BSDF` node had similar problem, fixed as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/121231
2024-05-07 18:03:15 +02:00
Sybren A. Stüvel
b56daddda6 Anim: restore logging of key insertion errors on stdout
An earlier commit accidentally removed too much code. This is now
restored, so that when keyframe insertion fails, at least on stdout it's
logged which F-Curve caused this failure.

8dbd167e80 did improve the error
reporting, but even that does not explicitly mention which F-Curves
caused those errors (for good reason, as cluttering the UI would be very
simple then).

Pull Request: https://projects.blender.org/blender/blender/pulls/121527
2024-05-07 17:57:26 +02:00
Clément Foucault
f5a4dec458 Fix: EEVEE-Next: Missing shadow refresh after compilation
This affects only transparent materials. Ideally, the shader
compilation should trigger a tag update on the object but
that's bad level call.

Instead, we just discard all shadows after finishing recompiling
a transparent material. This is overly conservative but it fixes
the issue.

Fixes #119624
2024-05-07 17:53:35 +02:00
Julian Eisel
952bc075ae Fix #121490: Unable to access asset from context in asset shelf
Displaying an operator in the context menu that would access the asset
via context would fail.

3 issues here in fact:
- 798219225d removed code to attach the asset to the button's context.
  Brought this back.
- If the `AssetShelf.get_active_asset()` method (in Python) isn't set,
  `AssetViewItem::should_be_active()` would always return false, making
  it impossible to lookup the active item. Instead it should return an
  empty value so the view's internal active state is used instead.
  Mistake in a700c90ec3.
- These kind of context queries can't rely on cursor coordinates, it's
  not well defined what state they are in. In fact `wmWindow.eventstate`
  is unset in debug builds to help enforce this. Also an issue from
  a700c90ec3. With the above two corrections this change can be
  undone so the query doesn't depend on cursor coordinates anymore.
2024-05-07 17:45:15 +02:00
Clément Foucault
286cbc8317 Fix: EEVEVE-Next: Wrong material reused for transmission material
This is caused by #121137 as the bug disappear if
`can_use_default_cb` returns false.


The issue is caused by the material binning system.
`ShaderKey` uses the `GPUMaterial` to differentiate between
material. But with #121137, different materials can reuse the
same `GPUMaterial`.

The fix is to not reuse the shader for the prepass (even if opaque)
for transmission enabled shaders.

Fix #121343
2024-05-07 17:34:36 +02:00
Clément Foucault
a7eb1a13d4 Cleanup: EEVEE-Next: Make format 2024-05-07 16:36:09 +02:00