Commit Graph

150077 Commits

Author SHA1 Message Date
Brecht Van Lommel
0f63085d9d Merge branch 'blender-v4.2-release' 2024-06-24 20:02:59 +02:00
Brecht Van Lommel
1ea70c3e3e Fix: macOS x265 libraries have wrong deployment target
Pull Request: https://projects.blender.org/blender/blender/pulls/123694
2024-06-24 20:02:20 +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
Ray Molenkamp
df76e76cda Windows: OIDN 2.3.0 2024-06-24 10:05:59 -06:00
Ray Molenkamp
65e5db1f95 Windows_x64: OIDN 2.3.0 2024-06-24 10:02:35 -06: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
Pratik Borhade
bba375c785 GPv3: Sculpt Advanced panel is displayed empty
Only smooth and randomize brush has properties in advanced panel. For
others, panel is empty. Include condition in poll function to skip
drawing of "advanced" panel for rest brushes

Resolves #123536

Pull Request: https://projects.blender.org/blender/blender/pulls/123549
2024-06-24 13:54:54 +02:00
casey bianco-davis
371e419aa4 Fix: #122183: GPv3: Primitive vertex color not working on fills
This makes vertex color for stroke and fill work properly with all primitive tools.

Pull Request: https://projects.blender.org/blender/blender/pulls/123516
2024-06-24 13:53:19 +02:00
YimingWu
8c647e7108 Fix #123396: GPencil: Show brush options for GPv3
Some brush options aren't shown in GPv3. Now fixed.

Pull Request: https://projects.blender.org/blender/blender/pulls/123412
2024-06-24 13:47:02 +02:00
casey bianco-davis
db9ce7392d GPv3: Use texture coordinates for primitive tools.
This make texture coordinates properly work with the primitive tools.

This uses the same placement logic as the draw tool.

Note: Placement is determent by the first point placed and will not be updated if that point is moved.
Pull Request: https://projects.blender.org/blender/blender/pulls/123520
2024-06-24 13:45:47 +02:00
Campbell Barton
830fb50c0a Merge branch 'blender-v4.2-release' 2024-06-24 21:41:26 +10:00
Campbell Barton
7a0f205b89 Fix #123657: setting the theme manually breaks the Extension UI
Calling os.path.samefile on a repository directory that didn't exist
was raising an exception. Resolve by comparing the directories as
strings, see code comments for details.
2024-06-24 21:39:35 +10:00
Bastien Montagne
9688462349 Merge branch 'blender-v4.2-release' 2024-06-24 13:34:48 +02:00
Bastien Montagne
a94798d31c Fix (unreported) assert in recursive 'foreach id' iterating code.
owner ID pointer needs to be reset after initial usage, for the
recursively processed 'children' IDs.
2024-06-24 13:33:21 +02:00
Philipp Oeser
a196f4276e Merge branch 'blender-v4.2-release' 2024-06-24 13:01:40 +02:00
Philipp Oeser
696848204c Fix #118148: STL/PLY: Imported object data has increased usercount
STL/PLY (also Collada) use `BKE_mesh_assign_object` to assign a mesh
(already in main, has a usercount of 1) to a fresh object.
That function does a bunch of (unneeded) things (test modifiers/
materials which is not necessary since these are fresh objects) next to
increasing usercount. Collada steers against this by reducing usercount
again. Other importers such as alembic assign the mesh directly to
object data (which is also what this PR proposes).

Pull Request: https://projects.blender.org/blender/blender/pulls/123558
2024-06-24 13:00:58 +02:00
Philipp Oeser
a09edde30d Merge branch 'blender-v4.2-release' 2024-06-24 13:00:13 +02:00
Weizhen Huang
f4afd404e5 Merge branch 'blender-v4.2-release' 2024-06-24 12:57:08 +02:00
Jeroen Bakker
e4cfa1b8ba EEVEE: Subsurface missing bindings
Bindings where bound using incorrect naming. (out_indirect_img vs out_indirect_light_img).

Pull Request: https://projects.blender.org/blender/blender/pulls/123664
2024-06-24 12:54:26 +02:00
Falk David
f51aa8a2c7 Fix: GPv3: Eraser and Tint tool use wrong radius
The eraser and the tint tool were still using the unified paint settings.
This fixes the issue by making sure to use `brush->size` instead.
2024-06-24 12:51:03 +02:00
Weizhen Huang
6fbc958e89 Fix: Cycles Light Tree gives low weight to distant lights in large volume
The original paper only considers the minimal distance of the cluster to
the ray, not the interval length, resulting in low weight for distant
lights that have large influence over a long distance.
This commit modifies the measure by considering `theta_b - theta_a` for
local lights and the ray length `t` for distant lights.

Pull Request: https://projects.blender.org/blender/blender/pulls/123537
2024-06-24 12:48:08 +02:00
Jeroen Bakker
3eb15247fe Merge branch 'blender-v4.2-release' 2024-06-24 11:54:01 +02:00
Jeroen Bakker
1663df0c8f EEVEE: Ray generation missing resource
During ray tracing there is a missing resource. On OpenGL this doesn't
matter as it will reuse the previous binding. But on Metal or Vulkan
each resource needs to be added to update bindings.

Pull Request: https://projects.blender.org/blender/blender/pulls/123655
2024-06-24 11:51:31 +02:00
Jeroen Bakker
34a679d19f Vulkan: Read out of bound when using many resources
Internally the image and texture resources where kept in a vector
where the elements were referenced. When using more than 16 images
this vector is reallocated and previous references become invalid.

This is a quick fix and should be changed with something more
stable.

Pull Request: https://projects.blender.org/blender/blender/pulls/123656
2024-06-24 11:50:38 +02:00
Jacques Lucke
8d8a57332a Merge branch 'blender-v4.2-release' 2024-06-24 11:40:16 +02:00
Jacques Lucke
c1c3ed0e4b Fix #123542: memory display error
`mat4x4f` is not found when loading .blend files which were written
before this struct existed. The buffer-overwrite wrote into the buffer
size of our allocator (`MemHead`).
2024-06-24 11:38:59 +02:00
Bastien Montagne
069e32b2bf Merge branch 'blender-v4.2-release' 2024-06-24 11:31:01 +02:00
Bastien Montagne
236adb9449 I18N: Updated UI translations from git/weblate repo (5a0da5c5c520b306). 2024-06-24 11:30:24 +02:00
Raul Fernandez Hernandez
33b8147678 Build: Update macOS libraries for Blender 4.2
Ref #118455

Pull Request: https://projects.blender.org/blender/blender/pulls/123348
2024-06-24 11:29:47 +02:00
Alaska
9e267bbd57 Cycles: Use denoising device info to pick automatic denoiser
Ever since the introduction of GPU OIDN denoising on CPU devices,
using the path_tracing_device info to pick the automatic denoiser has
typically led to incorrect results.

This commit fixes this issue by using the denoising device info to pick
the denoiser.

Pull Request: https://projects.blender.org/blender/blender/pulls/123593
2024-06-24 11:28:02 +02:00
Lukas Tönne
a606f2fd09 Merge branch 'blender-v4.2-release' 2024-06-24 10:28:50 +02:00
Lukas Tönne
37e2a27bdd Fix #80876: Ocean modifier "Delete Bake" button does not work
The ocean modifier uses its Bake operator for both baking and freeing
the cache, based on the `free` operator property.

There are two bugs here:
1. The "Delete Bake" variant of the button was created using the
   `WM_OP_EXEC_DEFAULT` operator context. This skips the `invoke`
   callback which is crucial for setting the operator `modifier`
   property. Without that the modifier will just exit early.
   The "Bake" button is drawn using the `uiItemO` function which uses
   the invoke context automatically, so it does not have this issue.
2. The `free` property is set for the "Delete Bake" variant, but was
   never reset to its initial `false` value. The "Bake" variant has to
   also set this property, otherwise it will always execute the "free"
   code path.

Pull Request: https://projects.blender.org/blender/blender/pulls/123506
2024-06-24 10:27:28 +02:00
Jeroen Bakker
560b36ac8d EEVEE: Fix incorrect texture usage DoF
The color textures in the DoF module are also bound in gather
framebuffer but didn't got the correct usage flags resulting in
validation errors.

Pull Request: https://projects.blender.org/blender/blender/pulls/123650
2024-06-24 10:08:10 +02:00
Jeroen Bakker
0c39a75634 Vulkan: Fix binding collision when mixing textures and images
Due to incompatible binding namespaces between Vulkan and OpenGL we
offset the images in the ubo list. In the previous implementation
this could still go wrong as the images and textures bindings where
sequential. When EEVEE binds resources it can also try to bind resources
that aren't valid for the current shader. In this case it was still
possible that the incorrect binding was chosen.

This is fixed by offsetting the images by a large number.

Pull Request: https://projects.blender.org/blender/blender/pulls/123649
2024-06-24 09:27:13 +02:00
Campbell Barton
9cb45ba6c3 Merge branch 'blender-v4.2-release' 2024-06-24 12:36:49 +10:00
Campbell Barton
99a871d2f3 Merge branch 'blender-v4.2-release' 2024-06-24 12:36:46 +10:00
Campbell Barton
4e734dc66d Merge branch 'blender-v4.2-release' 2024-06-24 12:36:44 +10:00
Campbell Barton
213a968e05 Merge branch 'blender-v4.2-release' 2024-06-24 12:36:42 +10:00
Campbell Barton
0b14da7391 Merge branch 'blender-v4.2-release' 2024-06-24 12:36:39 +10:00