Commit Graph

132293 Commits

Author SHA1 Message Date
Clément Foucault fdcc8dc689 EEVEE-Next: Add missing translucent weight in deferred
This makes mixed translucent BSDF behave correctly.
2024-01-30 20:35:55 +01:00
Clément Foucault 95b523f268 Cleanup: EEVEE-Next: Replace unused Gbuffer struct 2024-01-30 20:35:55 +01:00
Harley Acheson 8f6ee910ba UI: Remove Blender Logo Alert Icon
As discussed in the UI Module Meeting we don't have an acceptable use
case for dialogs that use the Blender logo. Removing this image from
the project since this is now exposed through dialog customization.

Pull Request: https://projects.blender.org/blender/blender/pulls/117676
2024-01-30 20:22:38 +01:00
Miguel Pozo 5a2aceb671 Fix: EEVEE-Next: Add missing translucent weight 2024-01-30 20:15:10 +01:00
Omar Emara 049b0e6539 Compositor: Rewrite and optimize Double Edge Mask node
This patch rewrites and optimizes the Double Edge Mask node to be orders
of magnitude faster. For a 1k complex mask, it is 650x faster, while for
a 1k simple mask, it is only 50x faster.

This improvement is attributed to the use of a new Jump Flooding
algorithm as well as multi-threading, matching the GPU implementation.

The result of the new implementation differs in that the boundaries of
the masks are now identified as the last pixels inside the mask.

Pull Request: https://projects.blender.org/blender/blender/pulls/117545
2024-01-30 19:49:32 +01:00
Omar Emara 316f14b834 Compositor: Unify behavior of Z Combine node across CPU and GPU
The GPU implementation of the Use Alpha option of the Z Combine node
only worked if the first image is closer, since it sampled the alpha
channel from it and used it for mixing. Instead, the mix factor should
depend on the closer pixel, like the CPU implementation.
2024-01-30 18:48:58 +02:00
Omar Emara 5d0b506463 Fix: Z Combine node switches inputs when changing Use Alpha
The Z Combine node switches its inputs when changing the Use Alpha
option if both Z values are equal. That's because the operations used by
the node internally use two different conditions, less than and less
than or equal. This patch fixes that by unifying it to the less than
case.
2024-01-30 18:45:40 +02:00
Jacques Lucke f358843108 UI: simplify layout panels C++ API
This simplifies the C++ API for making layout panels. Now it is also more similar to the Python API.
`uiLayoutPanel` is like `layout.panel` and `uiLayoutPanelProp` is like `layout.panel_prop`.

Both, `uiLayoutPanel` and `uiLayoutPanelProp`, now exist in two variants. One that takes a label
parameter and one that does not. If the label is passed in, only the panel body layout is returned.
Otherwise, the header and body are returned for more customization.

Pull Request: https://projects.blender.org/blender/blender/pulls/117670
2024-01-30 17:44:56 +01:00
Lukas Tönne 78a0127356 Grease Pencil: Fix opacity modifier vertex weight factor
This should be applied _after_ the opacity bias.
2024-01-30 17:38:30 +01:00
Clément Foucault 953774fab5 Fix: EEVEE-Next: Shader compilation warnings in surfel list
False warnings about variable being used before initialization.
2024-01-30 17:27:00 +01:00
Clément Foucault 39397fd73e Cleanup: EEVEE-Next: Fix compilation warnings in shadow tests
Warnings were variable used before initialization.
2024-01-30 17:27:00 +01:00
Lukas Tönne 237babd2e8 Fix default weight in grease pencil modifiers when vertex group not set
Grease pencil modifiers were using a default weight of 1.0 if the
influence vertex group is not found. Whether or not that is correct
depends on whether a vertex group is set (name not empty). In case the
name is set but the group is not found a weight of zero should be used.
This can happen in GP3 when no vertex is assigned to a vertex group,
since each drawing only has a subset of all the vertex groups.

A utility function was added to make this consistent and less error
prone.

Pull Request: https://projects.blender.org/blender/blender/pulls/117671
2024-01-30 17:19:35 +01:00
Sybren A. Stüvel 236881ff9c Anim: Armature, move notifiers from setters to updaters
Move WM notifiers from property setter functions to
`RNA_def_property_update` call.

This actually makes them work properly, for example setting
`bone_collection.is_solo` from Python now actually updates the armature
in the 3D Viewport. Toggling the property from the UI already worked
(for other reasons, apparently), masking this issue.
2024-01-30 17:12:17 +01:00
Sybren A. Stüvel f2e7f26072 UI: Tree view, no longer auto-expand clicked item
When clicking on an expandable item in the tree view, it used to
automatically expand that item. This has now been removed; clicking just
makes that item the active one.

This impacts all tree views. The authors of the following ones have been
consulted on this, and all agreed it was a good idea:

- Asset Catalogs
- Bone Collections
- Grease Pencil Layers
- Node Panels
- Light Linking (uses tree view, but just to present a flat list)
2024-01-30 15:57:51 +01:00
Jacques Lucke c87f235598 Cleanup: make format 2024-01-30 15:14:39 +01:00
Hans Goudey 8d4643af63 Fix: GPv3: Don't ignore influence in thickness modifier
Also make some cleanups in the area, using more standard
variable names and removing an unused include.
2024-01-30 08:44:41 -05:00
Hans Goudey 35f949531f Cleanup: Fix warning of deprecated value in Paint struct
Instead of using the deprecated tag, just add it to the name.
2024-01-30 08:41:58 -05:00
Hans Goudey 29df9e5e14 Fix: Warning about string use after scope in macro 2024-01-30 08:30:57 -05:00
YimingWu 4722c801c5 GPv3: Thickness modifier
Thickness modifier ported to Grease Pencil v3.

Note: Uniform thickness range and UI step changed to better
match new thickness of blender unit.

![image](/attachments/2e9c9bfa-d869-4bec-a529-c3833390a201)

Pull Request: https://projects.blender.org/blender/blender/pulls/117631
2024-01-30 13:04:30 +01:00
Pratik Borhade ed458b5e69 Fix #113774: Select objects doesn't work for multiple selected Collections
Current method only considers first selected collection in the outliner
tree. This restricts user from selecting objects of multiple selected
collections. To fix this, first gather all the selected collections in
list with the help of `outliner_collect_selected_collections` traverse
function. Then iterate through layer collections to select base/objects

Pull Request: https://projects.blender.org/blender/blender/pulls/113831
2024-01-30 12:30:59 +01:00
Lukas Tönne 0daa426739 GPv3: Mirror modifier
Implements the mirror modifier from GPv2.

Pull Request: https://projects.blender.org/blender/blender/pulls/117637
2024-01-30 12:10:33 +01:00
Sybren A. Stüvel 4d3bb6a38a Cleanup: Anim, simplify `animviz_verify_motionpaths()`
Simplify `animviz_verify_motionpaths()` as the current code structure
got in the way of me reviewing an addition to it.

Some conditions and calculations are reordered so that they don't have
to be repeated. This allowed me to reduce nesting of the code, and make
it easier to understand when exactly a motion path is reused
cache-and-all, when it's reused but gets a new cache, and when it's
freshly allocated.

I also think this removes a theoretical memory leak, as there was a code
path that would allocate a new cache without freeing the old one. This
would require a somewhat invalid data structure to begin with, but the
code path now simply doesn't exist any more. I don't think this
problematic code path was ever hit in normal use, though.

No actual functional changes.
2024-01-30 10:54:38 +01:00
Philipp Oeser 5a6034654c Fix #117547: RBD Bake to Keyframes no longer working
Since a99e419b6e, we now have to use `keyframe_insert_by_name` when
inserting keyframes with a specified keying set.

Pull Request: https://projects.blender.org/blender/blender/pulls/117624
2024-01-30 10:54:05 +01:00
Jeroen Bakker 4b3254279c RenderTests: Enable EEVEE-Next Raytracing
Allow testing of material refractions. Also set the reflection probe to match
the raytracing pipeline closely.

Pull Request: https://projects.blender.org/blender/blender/pulls/117662
2024-01-30 10:44:04 +01:00
Alaska 58b9240c82 Cycles: Separate the caustics controls for Generalized Schlick
This allows users to turn off reflective and refractive caustics
separately from each other when using the Generalized Schlick material.

This will impact the Principled BSDF and Glass BSDF, along with some
custom OSL scripts.

Pull Request: https://projects.blender.org/blender/blender/pulls/117617
2024-01-30 10:31:32 +01:00
Campbell Barton 6ab800c5a8 Extensions: remove additional Extensions section in the preferences
Now extensions reuse the add-ons, renaming this section when
the experimental extensions option is enabled.
2024-01-30 17:59:53 +11:00
Campbell Barton 2cf993f9a0 Refactor: extract add-on preferences drawing into a static method
This allows it to be used by the extensions UI.
2024-01-30 16:55:38 +11:00
Campbell Barton 948e806a1a Cleanup: add PyC_UnicodeFromStdStr utility function
Add a std::string wrapper for PyC_UnicodeFromBytesAndSize.
2024-01-30 15:56:08 +11:00
Campbell Barton a360bd3f31 Cleanup: use std::optional instead of empty strings for return values
When a string shouldn't be used or is invalid, use std::nullopt to
make it clear it's value shouldn't be used.

Without this it's possible to accidentally use an empty string
which will silently fail.
2024-01-30 15:56:08 +11:00
Sean Kim a2b3fe5e01 Sculpt: Add per-brush input samples
This pull request adds the ability for users to specify input samples
on a per brush basis. The existing field in the main `Paint` struct
forces all brushes of a particular tool type to use the same value.
A new field was added to the `Brush` struct to allow for this value
to be specified there instead, and a corresponding unified value in
`UnifiedPaintSettings` has been created to allow users to use the
same value across all brushes.

Addresses #108109

Pull Request: https://projects.blender.org/blender/blender/pulls/117080
2024-01-30 05:08:23 +01:00
Campbell Barton dd7362d6e2 Cleanup: use a dictionary for add-on lookups
Replace the set of known add-ons with a dictionary to avoid a slower
string lookup for add-on preferences.
2024-01-30 14:30:03 +11:00
Hans Goudey 6aaa74cda9 Geometry Nodes: Improve extrude node vertex group performance
Add separate functions that deal with the vertex domain and copy vertex
groups without using the attribute API which has a large overhead when
abstracting the access of many vertex groups.

In a 1m vertex mesh with 20 vertex groups, I observed an improvement
in the node's runtime from 399 ms to 64 ms.

Also resolves #117553. That was an error when adding weight data to a
mesh without any weight data would invalidate custom data layers. That
is solved more simply now by just doing nothing in that case.
2024-01-29 21:57:55 -05:00
Campbell Barton 67cc9da7ba Extensions: move repositories into a popover
Part of changes proposed in #117285.

Unfortunately layout panels aren't supported in popovers, so this has
been worked around using a kludge that stores the expanded state as a
class member, toggled via "wm.context_toggle".
2024-01-30 13:17:58 +11:00
Hans Goudey 961783c444 Cleanup: Move BKE_deform.h to C++ 2024-01-29 19:04:13 -05:00
Campbell Barton e72dae4949 Fix crash when calculating the RNA path failed for property buttons
Since [0] changing extension repositories was crashing,
add missing return, null-check & free.

[0]: 61fb2b17c8
2024-01-30 10:44:21 +11:00
Campbell Barton 73214e9b26 Extensions: change the manifest filename
Use the name "blender_manifest.toml" for clarity.
2024-01-30 09:42:01 +11:00
Hans Goudey 61fb2b17c8 Cleanup: Use std::string for WM API function return values 2024-01-29 16:33:49 -05:00
Hans Goudey 4fa780d334 Fix: Sort Index Switch node alphabetically in add menu 2024-01-29 16:33:12 -05:00
Hans Goudey 13d280b8d8 Cleanup: Rename function to ensure button operator properties
For some reason the "get" function actually allocates the button's
operator properties container. This may or may not make sense to
do, but while it happens, the function name might as well make
that clear.
2024-01-29 16:33:12 -05:00
Miguel Pozo 0c23f1ac2a Fix: EEVEE render tests python syntax
The script still fails, though.
2024-01-29 20:13:50 +01:00
Miguel Pozo 39f244a227 Fix: EEVEE-Next: Crash on GP render test
Handle null pos_buf.
Skip GP velocity sync.
2024-01-29 20:11:57 +01:00
Omar Emara 6fe2bbd51c Realtime Compositor: Anti-alias morphological threshold
This patch anti-aliases the output of the morphological threshold
operation in the Dilate/Erode node. This is done to match the CPU
implementation.
2024-01-29 20:13:04 +02:00
Iliya Katueshenock fb7f29c98e Fix: Geometry Nodes: Leak of 4+ items of enum
There is extra one user of shared enum definition in case this is new one
so already exist user is enough. Also using of `new` operator to construct
enum definition make this impossible to catch such leask for trivial type.
`Vector` have 4-element inline buffer so this was trivial case for <=4 items.

Pull Request: https://projects.blender.org/blender/blender/pulls/117599
2024-01-29 19:03:08 +01:00
Iliya Katueshenock 8102c86c6e Fix #117612: Crash for incorrect Menu propagation
https://projects.blender.org/blender/blender/pulls/113445#issuecomment-1090513
Pull Request: https://projects.blender.org/blender/blender/pulls/117614
2024-01-29 19:02:39 +01:00
Harley Acheson 28366f624f UI: Operator Confirm Dialog Changes
Removal of "confirm" operator callback for confirmation customization,
in favor of new method that shares existing operator dialog code and
allows python configuration.

Pull Request: https://projects.blender.org/blender/blender/pulls/117564
2024-01-29 18:52:18 +01:00
Aras Pranckevicius 5bd1e0bb22 VSE: replace Subsampled3x3 filter by a general Box filter
Part of overall "improve filtering situation" (#116980): replace Subsampled3x3
(added for blender 3.5 in f210842a72 et al.) strip scaling filter with a
general Box filter.

Subsampled3x3 is really a Box filter ("average pixel values over NxM region"),
hardcoded to 3x3 size. As such, it works pretty well when downscaling images by
3x on each axis. But starts to break down and introduce aliasing at other
scaling factors. Also when scaling up or scaling down by less than 3x, using
total of 9 samples is a bit of overkill and hurts performance.

So instead, calculate the amount of NxM samples needed by looking at scaling
factors on X/Y axes. Note: use at least 2 samples on each axis, so that when
rotation is present, the result edges will get some anti-aliasing, just like it
was happening in previous filter implementation.

Images in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/117584
2024-01-29 18:41:31 +01:00
Omar Emara 1aafb6802b Compositor: Use SMAA for anti-aliasing in all nodes
This patch changes all anti-aliasing operations to use SMAA instead of
the Scale3x-based operation. That's because SMAA is more accurate while
the Scale3x one is more a hack.
2024-01-29 18:44:10 +02:00
Sybren A. Stüvel 5c6376fd0a Cleanup: anim, add newlines between groups of includes
No functional changes.
2024-01-29 17:33:38 +01:00
Sybren A. Stüvel ee814b8646 Cleanup: add missing `#pragma once` to `ANIM_animdata.hh`
No functional changes.
2024-01-29 17:33:38 +01:00
Miguel Pozo f185a284f0 Fix: EEVEE-Next: Hair material flags
Add missing tags so the deferred pass can work correctly.
Fixes principled hair render tests.
2024-01-29 17:03:39 +01:00