Commit Graph

110741 Commits

Author SHA1 Message Date
Miguel Pozo
42e015e77c Merge branch 'blender-v4.2-release' 2024-06-25 17:59:08 +02:00
Miguel Pozo
9b61673b46 Fix: EEVEE: Add missing view bind
Seems to fix #123413
2024-06-25 17:58:21 +02:00
Bastien Montagne
fa2c7ccdda Fix (unreported) memleak in some BKE tests in multi-binaries case.
Some tests would access system paths somehow, which implicitely creates
the static `m_systemPaths` variable, but would not explicitely call
`GHOST_DisposeSystemPaths` at the end to release it.

Noticeable when disabling the `WITH_TESTS_SINGLE_BINARY` option.
2024-06-25 17:51:31 +02:00
Bastien Montagne
b53ae4745c Merge branch 'blender-v4.2-release' 2024-06-25 16:43:23 +02:00
Bastien Montagne
fccdfa2b06 Fix (unreported) missing IDTypes init in lib_remapper tests.
This is usualy hidden it'd seem by the `WITH_TESTS_SINGLE_BINARY`
option.
2024-06-25 16:42:30 +02:00
Miguel Pozo
17ba53f605 Merge branch 'blender-v4.2-release' 2024-06-25 16:10:51 +02:00
Miguel Pozo
b8587c96ec Fix #120628: Transfer mode overlay flickering artifacts
Clear depth from Workbench when overlays are disabled.
Disable alpha blend and enable depth testing in the transfer mode
overlay so it works without a previously rendered depth buffer.

Pull Request: https://projects.blender.org/blender/blender/pulls/123729
2024-06-25 16:09:06 +02:00
Falk David
451212a4fb Fix: Error when building without experimental features
The `rna_grease_pencil.cc` file should now always be in `DEFSRC`
even if `WITH_EXPERIMENTAL_FEATURES` is not set.
2024-06-25 16:03:41 +02:00
Miguel Pozo
b855cd7bb0 Merge branch 'blender-v4.2-release' 2024-06-25 15:57:11 +02:00
Miguel Pozo
f16cf49c8a Cleanup: EEVEE: Clarify Jitter Camera tooltip 2024-06-25 15:56:51 +02:00
Omar Emara
f1134ce0b7 Merge branch 'blender-v4.2-release' 2024-06-25 16:40:44 +03:00
Omar Emara
f19a9e9b4d Fix #123607: Plane Track Deform produces wrong output
The Plane Track Deform node produces wrong outputs in the GPU compositor
in case the input size was different from the movie size. That's because
the coordinates were normalized based on the input size, while they
should be normalized based on the output size, which is what this
patches does.
2024-06-25 16:37:18 +03:00
Jeroen Bakker
ee0b7b9a95 Vulken: Mix array aspect of image views
The image views type can change depending based on how they are bound
to shaders. When a shader accesses a view without array operations,
the image view should not be an array. This was previously ignored.

Pull Request: https://projects.blender.org/blender/blender/pulls/123726
2024-06-25 15:15:18 +02:00
Dalai Felinto
583ad3460a UI: Extensions: Changes on the Preferences Tabs
The goal of these changes was to make the distinction between Extensions
and add-ons more clear.

* Extensions -> Get Extensions
* Separate Get Extensions from Add-ons and Themes
* Add Tooltip for Get Extensions, Add-ons and Themes

Co-authors:
* Pablo Vazquez <pablo@blender.org>
* Brecht Van Lommel <brecht@blender.org>
2024-06-25 15:14:04 +02:00
Dalai Felinto
8ee43f34be UI: Simplify tooltip for the preferences active section 2024-06-25 15:13:50 +02:00
Falk David
56566515d4 GPv3: Update default brush settings
This updates the settings in `BKE_gpencil_brush_preset_set`
to better match the behavior of the brushes in GPv2.

Changes:
* Use a default spacing of 100%. Only the airbrush and the rough pencil need a lower spacing (higher density).
* Use the pen pressure setting for the radius.
* Update the `draw_angle_factor` for the marker chisel.
2024-06-25 14:34:50 +02:00
Sybren A. Stüvel
e067b11c3c Anim: add non-const version of animrig::fcurves_all(action)
To avoid code duplication between the const and non-const versions, use
a static function with lotsa template arguments.

Pull Request: https://projects.blender.org/blender/blender/pulls/123722
2024-06-25 14:26:11 +02:00
Nathan Vegdahl
fb0f409237 Fix #123716: autokeying Shape Key fields does not work
The issue had essentially the same origin as #123538 (fixed
in #123719), but in the autokeying code. The autokeying code was
already fully resolving the RNA path to be relative to the owning
ID, but the RNA pointer getting passed with that fully-resolved path
to the keying code was the struct for the not-fully-resolved path.

This fixes it by simply passing the RNA pointer for the owning ID
rather than the struct being keyed.

Pull Request: https://projects.blender.org/blender/blender/pulls/123721
2024-06-25 14:21:02 +02:00
Nathan Vegdahl
38f889d07a Fix #123538: Crossfade sounds sets volume to 0
The issue was that the Python keyframing code was already resolving the
RNA path fully to the owning ID, but then erroneously passing the
non-ID RNA pointer (in this case the sound sequence pointer) to the
keyframing code with that fully resolved path.

Notably, it wasn't just the VSE keyframing that was broken: keying any
non-ID structs via the Python API was broken. A good example is pose
bones: the Python keyframing code was resolving e.g. "location" on
the bone to "pose.bones["Bone"].location", but then passing that
path along with the pose bone struct to the keyframing code.  Since
that fully resolved path of course doesn't exist on the bone itself,
keying would fail.

This fixes it by simply passing the owning ID's RNA pointer instead,
which it should have been doing in the first place.

Pull Request: https://projects.blender.org/blender/blender/pulls/123719
2024-06-25 14:16:55 +02:00
Nathan Vegdahl
2034884a81 Anim: make auto-keying in shapekey anim editor work for layered actions
It previously used duplicated, bespoke code to do the keyframing, and therefore
still only worked with legacy actions.

This makes it use the same keyframing function as everything else, making it
naturally work with layered actions as well.  There should be no functional
changes for legacy actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/123673
2024-06-25 14:15:23 +02:00
Falk David
5685ec5952 GPv3: Draw Tool: Use brush strength for fill opacity
Makes sure the the brush strength is used to write to
the fill opacity.

The conditions for what attribute to skip when copying
previous data from the curves geometry was getting a bit
complicated so this part got refactored.
2024-06-25 14:02:38 +02:00
Campbell Barton
4915e6dc83 Merge branch 'blender-v4.2-release' 2024-06-25 21:54:09 +10:00
Falk David
88387e3a82 GPv3: Draw Tool: Randomize radius and opacity
This adds the randomization options for radius and opacity (strength).

Instead of pure white noise (like in GPv2) this uses perlin noise to make
the effect less jagged. The scale of the noise (in screen space) is
hardcoded to roughly fit GPv2. It could be exposed as a setting in the
future to get noise that changes slower/faster along the stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/123715
2024-06-25 12:13:21 +02:00
Jeroen Bakker
fa39948602 Fix #123583: Facesets not visible in EEVEE
Facesets overlay used a depth equal test, which isn't supported by
EEVEE.

Pull Request: https://projects.blender.org/blender/blender/pulls/123714
2024-06-25 11:17:19 +02:00
Campbell Barton
a142a7a538 Merge branch 'blender-v4.2-release' 2024-06-25 19:16:33 +10:00
Jeroen Bakker
78f37fe331 Vulkan: Fix incorrect image aspect
When clearing only the depth of a depth/stencil only the depth
part of the image aspect was stored in the node. This is invalid
when the image needed to be transitioned.

Pull Request: https://projects.blender.org/blender/blender/pulls/123713
2024-06-25 11:05:24 +02:00
Jeroen Bakker
f5b173188e Vulkan: Fix incorrect read image barrier
When having a sequential read image barriers for the same resource
and the second one requires an image layout transition the incorrect
barriers where generated.

This was fixed by aligning the implementation with write image barriers.

Pull Request: https://projects.blender.org/blender/blender/pulls/123712
2024-06-25 11:05:07 +02:00
Jeroen Bakker
50bda25f10 Cleanup: make format 2024-06-25 11:00:17 +02:00
Christoph Lendenfeld
34dcfb365b Fix #88208: Multi user action missing depsgraph update
The issue was a missing Dependency Graph update tag.
That usually happened in `ANIM_list_elem_update/59` but only if the action is still linked
to the `AnimData`. That isn't the case when all keys get deleted because the action is unlinked
in `animdata_fcurve_delete` if the action is empty.

Pull Request: https://projects.blender.org/blender/blender/pulls/123553
2024-06-25 09:45:12 +02:00
Campbell Barton
6fe666f773 Merge branch 'blender-v4.2-release' 2024-06-25 15:56:00 +10:00
Campbell Barton
4712aca2a8 Fix #123682: extension repo URL/access token changes don't re-sync
When changing the URL or access token, re-synchronize remote data
automatically.

This changes automatic synchronization to use a background task that
runs based on a timer instead of a modal operator since the operator
is more intrusive and not so well suited to running based on changes
to RNA.
2024-06-25 15:52:04 +10:00
Sean Kim
d863785775 Merge branch 'blender-v4.2-release' 2024-06-24 13:58:36 -07:00
Sean Kim
2cc6de8f7e Fix #123574: Automask area normal causes garbled meshes
Pull Request: https://projects.blender.org/blender/blender/pulls/123697
2024-06-24 22:57:09 +02:00
Hans Goudey
4919b5681d Merge branch 'blender-v4.2-release' 2024-06-24 15:39:02 -04:00
Hans Goudey
1b80125a67 Fix: Leak of initialized but not pushed undo step
In some cases, sculpt code currently creates undo steps that are stored
in `step_init` in the undo stack, but then skips actually pushing them.
That can happen when an operator is cancelled (like the transform
operator in #123172) or because pushes in "nested operator calls"
are currently explicitly disabled. That happens when calling the brush
operator from a script.

It turns out the undo code never freed the `step_init`, probably because
it assumed it would be pushed to be part of the stack afterwards.

Personally I'm not convinced that separating undo step creation into
two stages with `step_encode_init` and `step_encode` is a great design
or a necessary one, but I'm trying not to get into that deeper right now.

Fixes #123172

Pull Request: https://projects.blender.org/blender/blender/pulls/123331
2024-06-24 21:38:21 +02:00
Hans Goudey
59d84a4c42 Fix: Sculpt: Various issues with undo
Fixes #123612, #123611, #123621

Continue the restructuring in previous commits in this area to avoid
repeating more work for every node. The commit is large for a bug fix
but the best way to fix the issues was to continue making the area more
generally sane. Some specific changes:
- Run the switch for undo type outside of the iteration over nodes.
- Further split multires and base mesh undo so they don't go through
  the same per-node functions.
- Replace the node-tagging mechanism with specific loops per undo type.
- Properly assign the step type when pushing a single node at a time.
2024-06-24 14:32:12 -04:00
Brecht Van Lommel
0f63085d9d Merge branch 'blender-v4.2-release' 2024-06-24 20:02:59 +02:00
Clément Foucault
0b7ae0c75a EEVEE: Reduce binary size on Mesa caused by fixed size arrays
For some reasons this reduce the binary size from 11MB for
the 3 shaders to less than 1MB.
2024-06-24 19:31:33 +02:00
Bastien Montagne
65c5721c5a Fix (unreported): MEM_new/MEM_freeN mistaches.
Calling `MEM_freeN` on data allocated with `MEM_new` is bad, since it
will not call a destructor matching the one invoked as part of
`MEM_new`.

While in practice cases fixed below were 'not a problem' currently, as
they are trivial Cpp types (and therefore their destructor is doing
nothing), `MEM_freeN` has no way to ensure it is dealing with such a
trivial data type, so allowing such mismatch is dirty and dangerous.

Note that almost all fixed cases look more like unintentional mistakes
(mis-usages of `MEM_new` instead of `MEM_cnew`).

NOTE: There is one more (known!) case in the asset code, which fix is
slightly less trivial, and will go through a separate PR.

NOTE: This is a by-product of some work to detect such invalid usages of
`MEM_freeN` on memory chunks allocated with `MEM_new`.

Pull Request: https://projects.blender.org/blender/blender/pulls/123691
2024-06-24 18:42:26 +02:00
Miguel Pozo
62293d76bb Merge branch 'blender-v4.2-release' 2024-06-24 18:35:52 +02:00
Sean Kim
e140f263d0 Fix #122856: Sculpt trim and filter tools do not show brush cursor
This commit adds a new poll function specifically for determining if the
sculpt cursor should be drawn. This function whitelists a hardcoded set
of non-brush operators to display the cursor for.

In testing, this extra check has negligable performance impact. On
average it takes 0.012ms per execution.

Pull Request: https://projects.blender.org/blender/blender/pulls/123570
2024-06-24 18:33:49 +02:00
Miguel Pozo
d88150ce1f Fix: GPU: Skip binaries larger than the shared memory 2024-06-24 18:33:05 +02:00
Damien Picard
65de0db503 I18n: translate mouse and NDOF events in the keymap preferences
Mouse and NDOF events are defined in enums that are never used
directly by RNA through RNA_def_property_enum_items. As a result, they
don't get automatically extracted to the translation files and need to
be manually, through N_() macros.

The translation context used is the same as in other places related to
KeyMapItem: "UI_Events_KeyMaps".

Pull Request: https://projects.blender.org/blender/blender/pulls/116390
2024-06-24 18:10:39 +02:00
Falk David
9ffb277e01 GPv3: Draw Tool: Jitter option
This adds the `Jitter` draw tool option in the randomize panel.

To make this work in combination with the active smoothing, the jitter of the positions is applied
after active smoothing as an effect on top.
This means that the active smooth will not smooth the jittered points.

In addition, it is also now allowed to raise the `Jitter` factor above 1 for a more extreme effect.

Note: The jittering worked a bit differently in GPv2 (probably because of a bug). In GPv3 we compute the cotangent using the smoothed stroke direction (over time), which is a lot more acurate then using the previous and current position for the direction.

Pull Request: https://projects.blender.org/blender/blender/pulls/123680
2024-06-24 16:32:13 +02:00
Devashish Lal
3e28b6c7f1 Nodes: File path socket subtype for string sockets
This commit adds a new socket subtype for the string socket type
for file paths. Like other subtypes, this doesn't influence the data
stored in the socket or passed between nodes, it adds a file browser
popup operator to the socket button in the node.

From the file import nodes GSoC project:
https://devtalk.blender.org/t/gsoc-2024-geometry-nodes-file-import-nodes/34482

Pull Request: https://projects.blender.org/blender/blender/pulls/123250
2024-06-24 16:28:33 +02:00
Lukas Tönne
4bb5cd365b Curves: Remove unnecessary to_static_type in resample code
Static type resolution is redundant here because
`interpolate_to_evaluated` takes generic spans anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/123662
2024-06-24 14:58:40 +02:00
Hans Goudey
e14d153edf Cleanup: Formatting 2024-06-24 08:42:07 -04:00
Sergey Sharybin
8c430a7a67 Depsgraph: Optimize composite and render pipeline depsgraph
The idea is to skip building data-blocks referenced by ID
properties for dependency graphs used by render pipeline and
compositor preview. Those graphs do not use handlers, so it
is not required to have custom references to data-blocks
evaluated.

This solves an initial hicckup and memory usage with file
from #121188 when doing compositor. It also reduces the time
until first pixel when hitting F12 on that file.

Pull Request: https://projects.blender.org/blender/blender/pulls/123439
2024-06-24 14:22:47 +02:00
Jeroen Bakker
55ac7fd6fd Vulkan: Early exit clearing stencils
Adds an early exit when clearing stencils on textures that don't have
a stencil aspect. This is the case when rendering EEVEE planar probes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123668
2024-06-24 14:19:24 +02:00
Jeroen Bakker
30ec6ac961 EEVEE: Missing resource when tracing planar probes
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/123667
2024-06-24 14:18:26 +02:00