Commit Graph

117289 Commits

Author SHA1 Message Date
Weizhen Huang
0cf7484817 Refactor: EEVEE: separate ggx reflection and transmission functions
They use different techniques, separating them helps with commenting and
readability
2024-10-10 13:56:11 +02:00
Weizhen Huang
3d29979edf EEVEE: improve GGX NDF precision at small roughness
See !125919
2024-10-10 13:56:11 +02:00
Weizhen Huang
3db43b6705 Cleanup: EEVEE: remove unused code block and simplify computations 2024-10-10 13:56:11 +02:00
Weizhen Huang
5df1afad1d Cleanup: EEVEE: remove unnecessary check of normal visibility
We always sample visible normals, this check is unnecessary
2024-10-10 13:56:11 +02:00
Philipp Oeser
e89cf5ecc0 Merge branch 'blender-v4.3-release' 2024-10-10 13:55:29 +02:00
Jacques Lucke
22eac7655d Fix: wrong return type
This only resulted in an assert in debug builds.
2024-10-10 13:55:16 +02:00
Philipp Oeser
da9cf98324 Fix: assert parenting a legacy curve to an armature
The armature modifier calls `BKE_armature_deform_coords_with_mesh` (and
thus `BKE_id_defgroup_list_get`) for legacy curves as well, these are
only "riggable" via envelope weights though (this situation could be
made a bit clearer when parenting -- which is for another commit
though).

So to avoid the (rightful) assert in `BKE_id_defgroup_list_get`, only
call it in case vertex groups are supported (and possibly used later on
-- which is never the case for legacy curves).

Note: this was reported in chat by @LazyDodo because the CurveArmature
test was failing in debug

Pull Request: https://projects.blender.org/blender/blender/pulls/128792
2024-10-10 13:53:51 +02:00
Jacques Lucke
f2352efe55 Fix: wrong return type
This only resulted in an assert in debug builds.
2024-10-10 13:26:07 +02:00
Jonas Holzman
85120627d8 Fix: Wrong RNA doc description for WM_cursor_modal_set() / _restore()
The RNA function doc string / generated bpy documentation for the
`WM_cursor_modal_set` function was being overridden by the documentation
of `WM_cursor_modal_restore` due to a missing `func =`assignment.
Making the `cursor_modal_set` use the documentation of `cursor_modal_restore`,
and leaving `cursor_modal_restore` with no documentation.

Pull Request: https://projects.blender.org/blender/blender/pulls/126227
2024-10-10 12:45:22 +02:00
Jeroen Bakker
318d61756f Merge branch 'blender-v4.3-release' 2024-10-10 12:17:11 +02:00
Jeroen Bakker
9bcba25bc2 Fix #128282: EEVEE: Unable to compile displacement
When using vertex displacement EEVEE didn't compile the generated
functions into the vertex shader. This could result in errors when
compiling materials.

**Notes**

- Should be back-ported to Blender 4.2

Pull Request: https://projects.blender.org/blender/blender/pulls/128525
2024-10-10 12:16:28 +02:00
Jeroen Bakker
a62fa40b58 Merge branch 'blender-v4.3-release' 2024-10-10 11:28:53 +02:00
Jeroen Bakker
7d5712be9b Fix #128407: EEVEE: Cannot allocate volume pool on Intel ARC/OpenGL
When using OpenGL on Intel ARC the driver reports a max 3d allowed size
of 2048. The volume probe will create a texture that doesn't fit in this
dimension when selecting a probe size of 512 or 1024 MB.

This PR will reshape the volume pool atlas texture until it found a shape
that is optimal and fit on the device. When reshaping selects a different
pool size a warning message will be displayed as it might change the
visual quality.

When reshaping the smallest row size will be selected in order
to improve the occupancy. Reshaping will only happens when a
different setting is set in the `Performance->Memory->Light Probes Volume Pool`.

Pull Request: https://projects.blender.org/blender/blender/pulls/128518
2024-10-10 11:28:09 +02:00
Bastien Montagne
d70477ad4e Silence compiler warning about struct initialization.
In C++, in most cases empty braces (aka value initilization) are
the best way to initialize to 0/null (or the default values if
specified in the class/struct declaration).
2024-10-10 11:15:26 +02:00
Bastien Montagne
3adcae5727 Fix compilation warnings with Clang.
Caused by b79dd3fc5d, `nonnull-compare` is a warning option only in
GCC currently.
2024-10-10 11:13:04 +02:00
Anthony Roberts
ef58d4ae26 Windows: Switch to ProcessorNameString for CPU identification on ARM64
This probably should always have been the value used, really.

Now, instead of reporting `Qualcomm Technologies Inc`, it reports the more informative `Snapdragon(R) X Elite - X1E78100 - Qualcomm(R) Oryon(TM) CPU` on a Thinkpad T14s Gen6 device.

Pull Request: https://projects.blender.org/blender/blender/pulls/128808
2024-10-10 10:37:17 +02:00
Campbell Barton
806d1fd1fa Cleanup: quiet set but unused warning 2024-10-10 18:36:08 +11:00
Campbell Barton
c9b7f22e98 Cleanup: use a structure to store edge neighbor for join triangles
Replace 3x arguments and a return value with a structure
that stores the neighboring edges & loops.

Also call add_without_duplicates from a loop instead of inlining.
2024-10-10 18:33:36 +11:00
Aras Pranckevicius
2d5106036f Cleanup: rename OPENEXR_COMPRESS for clarity
Rename to OPENEXR_CODEC_MASK and add comments in several places

Pull Request: https://projects.blender.org/blender/blender/pulls/128814
2024-10-10 08:45:55 +02:00
Jason C. Wenger
dc57693b0c Modeling: add support for merging triangles with reference to topology
A new parameter, topology influence, is added that causes the
join_triangles operator to prioritize edge joins that create quads with
sensible geometry relative to existing quads, instead of selecting the
'flattest' and 'squarest' next pair and then leaving leftover triangles
with no partners to merge with.

This produces its best results with the face and shape thresholds set to
180 degrees (no hard limits as a restriction against merging) and
topology influence somewhere between 100-130%, depending on the mesh.
Too low and many parallelograms and triangles are left, too high and the
algorithm tries too hard and starts making errors.

Note that both quads already present in the selection, as well as the
quads that are generated during the operator, will influence the
topology around them. This allows the modeler to manually merge a few
quads in key areas of the mesh, as a hint to the algorithm, indicating
what result they way they want to see, and the algorithm will then take
those quads into account and try to build around them according to the
modeler's guidance.

A new checkbox to leave only the remaining triangles selected has also
been added. This helps users visualize what remains to be fixed.

Ref !128610
2024-10-10 17:28:59 +11:00
Campbell Barton
085d959d87 Merge branch 'blender-v4.3-release' 2024-10-10 12:19:54 +11:00
Campbell Barton
de0cfcba67 Merge branch 'blender-v4.3-release' 2024-10-10 12:19:47 +11:00
Campbell Barton
a762f2b664 Merge branch 'blender-v4.3-release' 2024-10-10 12:19:45 +11:00
Campbell Barton
f666902d17 Fix error in snap-grid check
Correct check from 75ffda39b2.
2024-10-10 12:17:40 +11:00
Jacques Lucke
2dd9f454c9 Refactor: BKE: use StringRef in IDProperty API
This way it's not necessary anymore to always prepare null-terminated strings
when using IDProperties.

Pull Request: https://projects.blender.org/blender/blender/pulls/128729
2024-10-10 03:17:15 +02:00
Jacques Lucke
b79dd3fc5d BLI: improve FunctionRef constructor in case of a falsy callable
Previously, passing a falsy `std::function` (i.e. it is empty) or a null
function pointer would result in a `FunctionRef` which is thruthy and thus
appeared callable. Now, when the passed in callable is falsy, the resulting
`FunctionRef` will be too.

Pull Request: https://projects.blender.org/blender/blender/pulls/128823
2024-10-10 03:14:44 +02:00
Germano Cavalcante
75ffda39b2 Fix #126665: Reintroduce 'Absolute Grid Snap' (now 'Absolute Increment Snap')
The 'Absolute Grid Snap' feature remains useful even alongside
'Snap to Grid', so this option is being reintroduced, partially
reverting commit f0479e915f.

Pull Request: https://projects.blender.org/blender/blender/pulls/128135
2024-10-09 22:52:28 +02:00
notrudyyy
9da1b8a74b Fix #128473: New node insertion on link search connects to main socket
Fixes an issue with the new node insertion feature where, after a link drag search,
the main input of the new node is connected to, regardless of which one was chosen.

Pull Request: https://projects.blender.org/blender/blender/pulls/128640
2024-10-09 22:18:13 +02:00
Aras Pranckevicius
97208a42d3 UI: Reorder EXR compression dropdown and add tooltips
OpenEXR has many compression codecs exposed, with some of them arguably
not very useful. Generally, for lossless compression you want ZIP or PIZ,
and for lossy compression you want DWAA/DWAB. Reorder the dropdown
entries so that these are at the top just below "No compression".
Previously the not-really-great choice of Pxr24 was the first.

Add tooltips to all the compression codecs too, trying to explain
what each of them does in once sentence.

Remove "(lossless)" labels and keep only "(lossy)" -- this is much easier
to visually parse, since both of them were very similar to each other before.

Pull Request: https://projects.blender.org/blender/blender/pulls/128787
2024-10-09 20:28:59 +02:00
Harley Acheson
97c41218a9 Merge branch 'blender-v4.3-release' 2024-10-09 11:04:33 -07:00
Harley Acheson
cb26e5a169 Fix: Improve Blurry Text 3DView Drag Name
Like #128623 this improved the blurry text shown when dragging an
object into a 3DView.

Pull Request: https://projects.blender.org/blender/blender/pulls/128809
2024-10-09 19:31:11 +02:00
Julian Eisel
2499299ff2 Fix: Empty grease pencil brush libraries linked on startup
Second part to fix #128420.

On startup, the Blender File Outliner mode would show empty libraries
linked, pointing to the brush essentials files. This was because some
grease pencil versioning code would call
`BKE_paint_ensure_from_paintmode()`, which would link in the default
brushes. Then a bit later, brush assets versioning code would remove
local brushes from the default starup file, so the library link became
empty.

Initializing paint data shouldn't necessarily include importing default
brushes. In an earlier version I made this optional with a boolean, but
it's easy enough to separate out entirely.

Now `BKE_paint_ensure()` just initializes paint data, and
`BKE_paint_brushes_ensure()` has to be called to ensure that active
brushes are available.

Pull Request: https://projects.blender.org/blender/blender/pulls/128801
2024-10-09 16:13:01 +02:00
Bastien Montagne
60325a7f8c Gizmo: Refactor storage of 'target properties' to use a Vector.
Replace 'over-allocation' by a standard `blender::Vector` storage for
the `wmGizmoProperty` target properties of the gizmo. This simplifies code somewhat, and
makes the code ready to manage non-trivial types of data.

Explicit default values are also given to all data of `wmGizmoProperty`,
as it appears that the default constructor will not nullify values in
the (trivial) embedded `custom_func` struct.

NOTE: There is much more that could be done in the wmGizmo area to make
it use modern C++ features. The scope of this refactor is strictly
limited to allowing C++ construction/destruction of the wmGizmoProperty
data, as it embeds a PointerRNA pointer that will soon become
a non-trivial C++ struct.

Pull Request: https://projects.blender.org/blender/blender/pulls/128763
2024-10-09 16:07:12 +02:00
Bastien Montagne
2b72cccc85 Merge branch 'blender-v4.3-release' 2024-10-09 15:59:01 +02:00
Jacques Lucke
cf954b1d8d Cleanup: unused variable 2024-10-09 15:49:55 +02:00
Jacques Lucke
6ffc585fb8 Refactor: Geometry Nodes: recursive node declarations
This refactor contains the following changes:
* Each `PanelDeclaration` contains its direct children. Previously, it only knew
  how many children it had. That added complexity to wherever we iterate over
  the node declaration.
* Adds a new `DeclarationListBuilder` that is a base class of
  `NodeDeclarationBuilder` and `PanelDeclarationBuilder`. It makes sure that the
  same API for adding sockets, panels and separators exist for both.
* Modified declare functions for group, group input and group output nodes to
  use the normal node builder api instead of doing something custom.

No functional changes are expected.

The main reason for this refactor is to simplify working with nested panels in
node declarations which is useful when we want to support nested panels in the
node editor. The node drawing code is not simplified in this patch, but that
should be easier afterwards.

Pull Request: https://projects.blender.org/blender/blender/pulls/128799
2024-10-09 15:45:43 +02:00
Julian Eisel
eac897bb38 Fix: No default brush set for vertex paint mode
Name of the default brush to use was wrong, so it wouldn't be found.
2024-10-09 14:52:33 +02:00
Omar Emara
dad7babaae Compositor: Implement single value reduction for CPU
This patch implements single value reduction for the new CPU compositor.

Reference #125968.
2024-10-09 15:18:58 +03:00
Pratik Borhade
9e6c884394 Fix #122206: Int soft limits changed to 10000
When soft limits set to extreme int values, the softmin/max of custom
property changes to -10k/10k. Instead use extreme values.

Pull Request: https://projects.blender.org/blender/blender/pulls/123223
2024-10-09 14:05:36 +02:00
Campbell Barton
e83d8271ac Merge branch 'blender-v4.3-release' 2024-10-09 22:59:48 +11:00
nutti
1d07ec7bc9 PyAPI: add specific BMLayerCollection element type to doc-strings
Ref: !125851
2024-10-09 22:58:17 +11:00
Campbell Barton
8771952ce9 Merge branch 'blender-v4.3-release' 2024-10-09 22:37:36 +11:00
Campbell Barton
e99cb62007 Unbreak WITH_IMAGE_OPENEXR=OFF 2024-10-09 22:37:10 +11:00
Campbell Barton
233cf07866 Cleanup: remove unused functions 2024-10-09 22:29:16 +11:00
Omar Emara
8ed15db920 BLI: Add safe power function
This patch adds a safe_pow function that returns the base if the pow
function is undefined.
2024-10-09 14:04:29 +03:00
Philipp Oeser
927769899b Merge branch 'blender-v4.3-release' 2024-10-09 13:02:49 +02:00
Philipp Oeser
738dc431eb Fix: Sequencecache modifier opening a file mem allocation mismatch
Oversight in 9506fed905

This would give: "Attempt to use C-style MEM_freeN on a pointer created
with CPP-style MEM_new" (and crash in my local builds)

(noticed while cecking on #128746)

Pull Request: https://projects.blender.org/blender/blender/pulls/128755
2024-10-09 13:01:42 +02:00
Aras Pranckevicius
8b275092e0 Image: Add Quality setting to EXR DWAA/DWAB compression
EXR DWAA and DWAB are conceptually similar to lossy JPG compression,
with a tunable file size vs image quality parameter. However, previously
Blender always used the fixed default setting, which is kinda similar
to very high quality (like 97) for JPG.

Internally EXR DWA/DWB quality parameter is inverted scale, i.e. 0 is
best/lossless quality, and increased setting value means decreased
quality. However the rest of Blender UI uses 1-100 JPG-like quality
scale, where values above 90 are "visually lossless", 100 is lossless,
and going below something like 50 would be visually quite lossy. So map
that to internal DWA setting:
- blender 100 -> DWA 0
- blender 97 -> DWA 45
The rest is linear relation based on those two points.

Pull Request: https://projects.blender.org/blender/blender/pulls/128790
2024-10-09 12:34:49 +02:00
Lukas Tönne
4f5f8f6e17 Merge branch 'blender-v4.3-release' 2024-10-09 12:28:18 +02:00
Lukas Tönne
12b4ac87ea Fix #128789: GPv3: Context property missing nullptr check
`grease_pencil` context property has to check for valid active object.
Added in 70c7fb6da2

Pull Request: https://projects.blender.org/blender/blender/pulls/128791
2024-10-09 12:22:51 +02:00