Commit graph

137498 commits

Author SHA1 Message Date
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
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
65e5db1f95 Windows_x64: OIDN 2.3.0 2024-06-24 10:02:35 -06: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
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
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
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
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
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
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
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
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
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
Campbell Barton
d8fafad704 Extensions: clarify installing multiple files is supported 2024-06-24 12:27:22 +10:00
Campbell Barton
2eaf70a4ed Extensions: adjust the error about failure to sync when offline
- Suppress the warning entirely when the "first time" message
  requesting online access is shown as it adds unnecessary noise.

- Otherwise, when offline, show a message suggesting to allow online
  access or disable the repository.
2024-06-24 12:24:32 +10:00
Campbell Barton
e48a9fc5ed Extensions: add missing update callbacks for repository flags
Enabling/disabling a repository wasn't redrawing when it should.
2024-06-24 12:14:48 +10:00
Campbell Barton
9b7f2c9976 Extensions: don't reuse the last remote repository when dropping files
Installing a file into a remote repository is an exceptional case,
don't default to the remote repository when dropping afterwards.
2024-06-24 11:25:38 +10:00
Campbell Barton
25fc66f472 Extensions: use case insensitive sort for the repositories enum 2024-06-24 11:02:56 +10:00
Campbell Barton
ef1e538693 Extensions: prioritize the remote website over the local data
Add code-comments rationalizing use of remote/local fields.
2024-06-24 11:02:54 +10:00
Campbell Barton
efa1f5847e Extensions: don't attempt to sync after adding a repo in background mode 2024-06-24 11:02:52 +10:00
Campbell Barton
3ef073ed1d Cleanup: use variable to access extensions private directory 2024-06-24 11:02:46 +10:00
Campbell Barton
b1287ad6d4 Cleanup: remove unused extensions.repo_add_from_drop operator 2024-06-23 22:47:06 +10:00
Campbell Barton
7298ed6c83 Extensions: don't lock the UI when syncing before handling a dropped URL
The sync with remote repositories would lock-up the interface with no
way to cancel. This could be a problem especially on slow connections.

The operator dialog is now shows the state of syncing which can
be canceled by pressing Escape or clicking away from the dialog.
2024-06-23 22:40:57 +10:00
Campbell Barton
485a4dbf0f Extensions: order "System" repositories last
The default "System" repository which was ordered before "User Default",
order system repositories last as these are a special case many users
won't touch.
2024-06-23 14:43:31 +10:00
Campbell Barton
52b63777a1 Extensions: use the full path for remote "file://" repositories
The logic to use a domain name was being applied to file:// paths,
causing only the first directory to be used.
2024-06-23 14:35:06 +10:00
Campbell Barton
84b1c50dc9 Extension: improve server-generate help text 2024-06-23 13:33:02 +10:00
Campbell Barton
c78adfc698 Extensions: use str.casefold for case insensitive search
`str.casefold` is intended for case insensitive string matching and
finds more matches with some unicode characters.
2024-06-23 12:57:08 +10:00
Campbell Barton
6019aa304b Extensions: Improve "server-generate" site, group by type, include links 2024-06-23 12:50:35 +10:00
Campbell Barton
f646956149 Cleanup: spelling in comments 2024-06-23 12:25:22 +10:00
Campbell Barton
7632c528de Docs: remove references to "above" in code comments & corrections
Reference identifiers instead of "above" in code comments as these
tends to become outdated. Even when declarations are removed it's at
least clear that the reference no longer exists instead of referring to
whatever is currently above the declaration.
It's also straightforward to search history for a removed identifier.

Corrected 4 cases of references to things that were no longer above
the doc-strings. Noticed other references which look to be incorrect
but need further investigation.
2024-06-23 12:14:19 +10:00
Lukas Stockner
4bde68cdd6 Cycles: Compress GPU kernels to reduce file size
Precompiled Cycles kernels make up a considerable fraction of the total size of
Blender builds nowadays. As we add more features and support for more
architectures, this will only continue to increase.

However, since these kernels tend to be quite compressible, we can save a lot
of storage by storing them in compressed form and decompressing the required
kernel(s) during loading.

By using Zstandard compression with a high level, we can get decent compression
ratios (~5x for the current kernels) while keeping decompression time low
(about 30ms in the worse case in my tests). And since we already require zstd
for Blender, this doesn't introduce a new dependency.

While the main improvement is to the size of the extracted Blender installation
(which is reduced by ~400-500MB currently), this also shrinks the download on
Windows, since .zip's deflate compression is less effective. It doesn't help on
Linux since we're already using .tar.xz there, but the smaller installed size
is still a good thing.

See #123522 for initial discussion.

Pull Request: https://projects.blender.org/blender/blender/pulls/123557
2024-06-23 00:52:30 +02:00
Campbell Barton
cf73897690 Extensions: add HTML generation to the "server-generate" command
- Optionally generate a simple HTML page (using --html).
- Links include repository, blender_versnon_* & platform information,
  so the information can be used by blender when links are dropped
  into Blender.
- Support using a template as the default HTML is primitive.
2024-06-22 23:48:00 +10:00
Campbell Barton
fc3e0507cc Extensions: development functionality to mark all & clear marks
- Disable enabling on install when installing marked.
  This simplifies installing many packages from a repository which can
  be useful for testing.
- Fix an error installing marked when a local-only package was marked.
2024-06-22 23:03:52 +10:00
Campbell Barton
1ba06956e7 Extensions: support platform & version from URL parameters
Improve errors when dropping incompatible extensions, where previously
the extension would report as being unknown.
2024-06-22 19:13:45 +10:00
Harley Acheson
3229bde954 UI: Fix Minimum File Type Icon Size in File Browser
File browser can now show thumbnail view in a larger range of sizes.
Unfortunately there is a lower bound currently set on the icon that is
shown in the middle of the "document" that assumes 64 is the smallest
(the old minimum). This causes these icons to overflow below 64. Just
something that was missed when we allowed smaller sizes. This small
change supports down to 16.

Pull Request: https://projects.blender.org/blender/blender/pulls/122811
2024-06-22 01:30:49 +02:00
Jesse Yurkovich
9d8a90d53c Fix: Disable collection export for linked collections
If a non-instanced collection is linked, any collection exporters on the
linked collection would be active and invokable. This is probably not
desired as it could inadvertently overwrite files from the original.
Disable the operators in this case.

See PR for how each of the various append/link scenarios behave.

Pull Request: https://projects.blender.org/blender/blender/pulls/123149
2024-06-21 20:52:18 +02:00
Clément Foucault
2adb9762fa Fix: EEVEE: Shadow: Wrong tilemap corners
This is the root cause of broken updates
on local lights.

The same local frustum was used for all of the
tilemap (up to 6) of a light. This made the
`intersect(frustum, box)` call buggy which
would return true only if the object would
intersect with the first tilemap of the light.
This lead to improper updates when the object
would hit this path.

Fix #122533
2024-06-21 19:48:38 +02:00
Miguel Pozo
685817888e Fix #121629: EEVEE : Transparent shadow tagging performance in ortho view 2024-06-21 18:32:53 +02:00
Xavier Hallade
368d6edc3c Cycles: Update ocloc to 101.5518 on Windows
We've seen a ~15% performance regression on Meteor Lake iGPUs since
17f2cdd104, this new compiler version
restores it.
No need to bump the minimum supported driver version as it was already
at 101.5518.

Pull Request: https://projects.blender.org/blender/blender/pulls/123562
2024-06-21 18:01:54 +02:00
Brecht Van Lommel
2950098012 Fix: Issue in openimagedenoise cmake config harvest 2024-06-21 17:20:04 +02:00
Brecht Van Lommel
3b4d03968b Build: Fix various issue for 4.2 macOS library update
* Auto patch MaterialX cmake config for stripping version from dylib
* Add x265 library
* Fix harvest of OIDN cmake config

Ref #123348
2024-06-21 17:17:21 +02:00
Jacques Lucke
e72730d763 Fix: assert when switching to sculpt mode
This is an alternative fix to #123524.

This is necessary, because `sculpt_update_object` is run after
the mesh is evaluated, but before the geometry depsgraph operation
is done. Only after this depsgraph node is done, `DEG_object_geometry_is_evaluated`
will return true.

This approach of `unchecked` methods has been preferred for now
over moving the call to `BKE_sculpt_update_object_after_eval`
to a separate depsgraph node or after depsgraph evaluation.
2024-06-21 15:19:10 +02:00
Weizhen Huang
23e497d1af Fix: Memory leak in volume with packed file
Pull Request: https://projects.blender.org/blender/blender/pulls/123556
2024-06-21 15:08:55 +02:00
Alaska
47158e1606 Fix #123528: Cycles viewport denoiser not using GPU for CPU render
Cycles automatic denoiser picker assumed that OIDN could not be
run on the GPU while the CPU was the render device. So if the user was
using their CPU for rendering, the automatic denoiser picker would
"fallback" to a different denoiser (OptiX or CPU OIDN). This was true
in Blender 4.1, but changed in 4.2. The UI assumed that OIDN could run
on the GPU if there was a compatible OIDN GPU device.

This lead to a issue on systems using the CPU for rendering
while having a NVIDIA GPU installed in the system. The
UI suggested that OIDN would be used, and would switch between
CPU and GPU depending on user preferences. But the automatic
denoiser picker in Cycle's backend said OIDN could not run on
the GPU in this situation and would always "fallback" to the
OptiX denoiser running on the NVIDIA GPU.
This created a mismatch between the UI and what Cycles was
acutally doing. This issue did not effect other GPU vendors because
their "fallback" was the OIDN denoiser.

This commit fixes this issue by aligning the Cycles automatic
denoiser picker in the backend with the UI. Using OIDN if a GPU
is supported, falling back to OptiX if it's not supported,
falling back to OIDN CPU if OptiX isn't supported,
then falling back to no denoiser if that's not supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/123530
2024-06-21 14:06:50 +02:00
Jacques Lucke
046a8f92eb Fix #123539: Object Info node incorrectly reports dependency cycle
Previously, the node checked for all possible missing evaluations first.
However, some of the outputs may still work even if using another one
could cause a dependency cycle.
2024-06-21 12:58:15 +02:00