Commit Graph

124380 Commits

Author SHA1 Message Date
Jacques Lucke
571aaa0e92 Fix: zero interior band width leads to no volume output
The input only determines the gradient of the volume density at its surface.
Using zero there should not break it.

Pull Request: https://projects.blender.org/blender/blender/pulls/109208
2023-06-21 16:05:47 +02:00
Iliya Katueshenock
ff528626f4 Fix #108344: default result buffer must be initially contain values
Caused by 15f464019a.

Now make sure that the `result_buffer` is properly initialized, because
it may be used when trying to blur on an unsupported attribute domain.

Pull Request: https://projects.blender.org/blender/blender/pulls/108347
2023-06-21 16:04:12 +02:00
Brecht Van Lommel
97ab330a77 Build: update Python, OpenSSL, libtiff, libxml2 to new versions for security
Ref #104895

Pull Request: https://projects.blender.org/blender/blender/pulls/109133
2023-06-21 15:14:44 +02:00
Brecht Van Lommel
17fa168a3d Linux: add launcher script to fix issue launching on Steam
The steam environment sets LD_LIBRARY_PATH with a libtbb.so.2 that is
incompatible with our own. This wrapper scripts gives our own library
priority.

There is a more modern "Steam Linux Runtime" that can be used instead of
the "LD_LIBRARY_PATH Steam Runtime" and which launches Blender, but it
fails to detect GPU compute libraries. So that was not an option.

Ref #107385

Pull Request: https://projects.blender.org/blender/blender/pulls/109169
2023-06-21 14:49:27 +02:00
Jacques Lucke
9f30555faf Fix: geometry nodes modifier property not working after changing it in Python
This affected only vector and color inputs. The issue was that those were
expected to be stored as float-array properties. However, when setting them
from python using `modifier["Input_X"] = [1, 2, 3]` the array type becomes
either `int` or `double`, but not `float`. A workaround was to use
`modifier["Input_X"][:] = [1, 2, 3]` as this changes the property inplace.

Now `int` and `double` arrays are also understood by the modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/109203
2023-06-21 14:00:41 +02:00
Joseph Eagar
1347640e38 Sculpt: Fix #109112: Connected island code broken for multires 2023-06-21 02:19:48 -07:00
Pratik Borhade
3d3569852f Animation: Change channel selection key preferences in IC keymap
Missed in 80feb13665. Include changes in key
preferences of `extend` and `extend_range` in Industry Compatible keymap.

Pull Request: https://projects.blender.org/blender/blender/pulls/108790
2023-06-21 08:14:56 +02:00
Iliya Katueshenock
fa505d7c18 Fix #109171: Delete curve instead of creating empty result
If accumulated amount of points is zero, next offsets
will be empty too. Instead to expand offsets to create
empty curve, just delete source curve and skip any next steps.

Pull Request: https://projects.blender.org/blender/blender/pulls/109172
2023-06-21 02:27:58 +02:00
Hans Goudey
2ef27684c5 Fix #108930: Mirror modifier handles custom normals incorrectly
Before 17d161f565, the "vec_lnor" stored the automatically
computed normal without any influence from custom normals. But after,
the normals were used from the final output corner normals array, which
did have the custom normal data factored in at the end. This fix is to
revert part of that commit, storing the automatically computed normal
per space like before.
2023-06-20 16:32:15 -04:00
Jesse Yurkovich
66a6ef0163 Fix #109045: Allow images with more than 4 channels to load
Align behavior to what Cycles does in such cases which is to drop the
additional channels that are not supported.

This was a regression from aa3bdfd76a

Pull Request: https://projects.blender.org/blender/blender/pulls/109063
2023-06-20 21:32:54 +02:00
salipourto
b84d4dd16d Fix various HIP RT issues
* Motion blur issues due to missing ray time
* Wrong bitcode path for runtime compilation
* Quiet logging

Pull Request: https://projects.blender.org/blender/blender/pulls/109170
2023-06-20 20:47:10 +02:00
Thomas Dinges
4b0dc9eb29 License: Update THIRD-PARTY-LICENSES doc for 3.6. 2023-06-20 17:00:11 +02:00
Martijn Versteegh
77c37fb01d Fix #108053: Make the Collada UV sets enumerated from zero
The UV sets incorrectly used the CustomData layer index instead of the
count within the FLOAT2 layers.

Pull Request: https://projects.blender.org/blender/blender/pulls/109056
2023-06-20 16:24:33 +02:00
Campbell Barton
e2dbc4779e UI: change the UV packing pin option into a toggle & drop-down
Exposing both the option not to use pinned islands and to skip pinned
islands in the same drop-down was confusing.

Now there is a checkbox "Pin", when disabled, pinned UV's don't
have any impact on the packed result.

When enabled, the pin-method selects how pinned islands are handled.

Also remove the "ignore" option from the UI as this didn't fit well with
other methods of handling pinned islands. Instead, islands to be ignored
can be de-selected by the user.

Ref !108733.
2023-06-20 21:08:59 +10:00
Michael Kowalski
a6f3afe995 Fix: USD export: wrong emissive color in viewport material
When a Blender material has no nodes, its viewport color,
roughness and metallic values are saved as inputs to a simple
USD Preview Surface.  This pull request fixes a bug where
the Blender material's viewport color is also saved as
the USD Preview Surface emissiveColor attribute.

This bug was accidentally introduced in #107947.

To reproduce the issue, open the default Blender scene,
turn off nodes on the material and set the material's viewport
color.  Export to USDA and notice that the color is incorrectly
set as the emissiveColor input in the USD shader.

Pull Request: https://projects.blender.org/blender/blender/pulls/109138
2023-06-20 12:35:39 +02:00
Sergey Sharybin
954c262a96 Fix #108778: Crash when rendering multiple view layers
The rendering pipeline will re-use dependency graph and request
for re-building its relations for every new view layer, and try
to re-use as much evaluation as possible.

This could potentially run into situation when a content of
collection is changed: due to the difference in the per-view
layer visibility. If the evaluated collection has an object cache
this will make the cache to get out-of-sync with the actual
content. The cache on the evaluated collection might be created
when instancing system iterates over the collection.

This change makes it so the cache is freed when the dependency
graph relations are updated. This might be a bit too intrusive.
There might be ways to somehow ensure the content of the collection
is still the same as it was before the relations update, but this
is much more complicated task. Perhaps the performance is already
good enough.

This is a collaboration with Jacques Lucke, who was looking into
the same report, bouncing some ideas back and forth, and helped
testing the patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/108816
2023-06-20 11:39:38 +02:00
Jacques Lucke
e40f993a70 Fix #108704: scrubbing timeline does not to proper sampling like normal frame change
This was broken in 037b3f87bd.
This fix brings the original problem back a bit in that there will be an additional
frame update now, but really only a redraw should be necessary without a
depsgraph update.

The depsgraph update is caused by the `NC_SCENE | ND_FRAME` notifier,
which is checked for in `wm_event_do_notifiers`. Changing that in more depth
is a bit risky for 3.6 now unfortunately.
2023-06-20 10:51:11 +02:00
Jeroen Bakker
58b5d38824 Metal: Fix operator precedence bug
Backporting commit 31c986998b to 3.6 release branch

Pull Request: https://projects.blender.org/blender/blender/pulls/109147
2023-06-20 08:09:35 +02:00
Hans Goudey
e516f25e8f Fix #109060: Crash with mask modifier smooth option
A mistake similar to the one fixed in 17aaff69c6.
Also remove the DNA deprecated define added in the last fix.
2023-06-19 22:27:47 -04:00
Campbell Barton
a474fdece5 Fix every call to Mesh.shade_flat(..) adding a new layer
Also avoid exception handling for checking if the layer exists.
2023-06-20 12:11:38 +10:00
Campbell Barton
1d4ce828e5 PyAPI: require a unique_id for bl_ui.generic_ui_list
An empty unique_id would generate a warning when drawing.
2023-06-20 11:50:30 +10:00
Campbell Barton
75ac92ed85 Fix #109061: UI list generic template fails with error 2023-06-20 11:50:30 +10:00
Hans Goudey
ee352c968f Fix #109070: Creating mesh from Python skips setting faces sharp
The default value of the "sharp_face" attribute is False like other
boolean attributes. That mistakenly changed behavior in addons
that created meshes with `Mesh.from_pydata`. To fix, add an
argument with a default value that maintains the behavior
from before, and add convenience, `shade_smooth` and
`shade_flat` methods.
2023-06-19 21:40:59 -04:00
Hans Goudey
c3a12704de Fix: Torus primitive shaded smooth after mesh refactor
See #109070 (full fix will contain a more general change).
2023-06-19 21:33:14 -04:00
Jason Fielder
53cb09357e Fix #108792: Ensure Metal buffers correctly freed on exit
Replaces vector of allocations with dynamic linked list.
Bug caused by previously freed buffers still having been in the
list. Linked list enables fast removal of already-released buffers.

Also ensured that the memory manager classes are included in
memory tracking.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/108940
2023-06-19 20:28:51 +02:00
Julian Eisel
232e065a17 Fix #109053: File Append with recursions leads to crash
In this specific code path (recursive reading inside .blend files
containing assets), reading datablocks marked as asset would move
ownership over the asset metadata without indicating that in the source
that owned it previously. This would cause a double free attempt.
2023-06-19 16:39:37 +02:00
Sietse Brouwer
f758c4a6b1 Fix #108935: Auto-Normalize glitches in GPencil weight painting
There where glitches while weight painting in Grease Pencil with
auto-normalize enabled. This resulted in incorrect weights on vertices.
And sometimes a vertex group not deformed by bones was also affected
by auto-normalize (which should never happen).

This was due to:
- An erroneous line in the auto-normalize function which led to an
index out of bounds (and screwing up the vertex weights).
- An edge case where the active vertex group was de facto the only
group to be normalized.

Also in this patch:
- Removal of unreachable code
- Better names for the auto-normalize functions

Pull Request: https://projects.blender.org/blender/blender/pulls/109036
2023-06-19 15:49:57 +02:00
Hans Goudey
30bf4c0945 Fix: Creating sharp_face attribute skipped with smooth set
There is an optimization to avoid creating the attribute if we only
set faces smooth. But since "use_smooth" and "sharp_face" are
inverted, the check for that case needs to be invertex compared
to other similar attribute setters.
2023-06-19 09:46:07 -04:00
Campbell Barton
a6a32a8279 Quiet compiler warning from b68b66d29e 2023-06-19 12:36:18 +10:00
Campbell Barton
b68b66d29e Fix buffer overflow in AVI file writing
`strcpy` could overflow the destination buffer by 768 bytes,
use FILE_MAX for the filepath buffer size.

Also include the size in the functions signature to avoid similar
errors in the future.
2023-06-19 12:32:25 +10:00
Campbell Barton
78f5d9d599 Fix buffer overflow in an_stringdec (ANIM_SEQUENCE type loading)
`strcpy` could overflow the destination buffer by 768 bytes.
Match the source/destination buffer sizes & use BLI_strncpy.
2023-06-19 09:41:11 +10:00
Campbell Barton
25aa510adb Fix potential buffer overflow in BLI_path_sequence_decode
Clamp the by the buffer destination size.
2023-06-19 09:39:27 +10:00
Philipp Oeser
9bba52debd Fix #108049: Nodes pasting can leave multiple active nodes
Clear active flag on pasted nodes (this is in line with how objects are
pasted).

Pull Request: https://projects.blender.org/blender/blender/pulls/108535
2023-06-18 12:22:15 +02:00
Iliya Katueshenock
4e7ee5d9ac Fix #108141: Group Insert operator creates invalid links
Just avoid creating links to outside the group. The original
version worked a little more accurately. But still she was just
making up links (because the inline version of the graph wasn't the same anyway).
For now, this is just a workaround to work around the
problem in the new behavior caused by fa3ca9afdb .

Pull Request: https://projects.blender.org/blender/blender/pulls/108332
2023-06-16 20:24:31 +02:00
Hans Goudey
a6931db38b Fix: Build error without OpenEXR
See d5781c2a61
2023-06-16 13:59:35 -04:00
Hans Goudey
17aaff69c6 Fix #109043: Mask modifier smooth option broken
Caused by two mistakes in 16fbadde36.
Fix the naming too, which was confusing and
non-standard before.
2023-06-16 13:38:00 -04:00
Brecht Van Lommel
d5781c2a61 Fix #109048: RenderLayer.load_from_file does not support multilayer EXR
This was never implemented, only for the entire RenderResult.
2023-06-16 18:53:08 +02:00
Brecht Van Lommel
770616446b Fix #108966: multires UDIM bake progress bar exceeds 100% 2023-06-16 18:42:48 +02:00
Hans Goudey
05190a5a23 Fix: Add missing header used by recent backport fix
This was added in main by 2cfcb8b0b8, and used by
6a05e5161b which was cherry-picked from main
to the release branch.
2023-06-16 09:18:44 -04:00
Hans Goudey
6a05e5161b Fix: Quadratic performance of simulation state frame lookup
Searching for a simulation state at a particular frame was implemented
with a linear loop. The timeline did that for every visible frame,
giving quadratic performance overall when zoomed out. Since the
states are already assumed to be sorted by frame, we can use binary
search instead giving logarithmic performance for each lookup instead.

In the test file from #108097, instead of dropping to 20-30 FPS
after about 4000 frames, I observed the original 70 FPS.

Pull Request: https://projects.blender.org/blender/blender/pulls/109037
2023-06-16 08:23:24 -04:00
Philipp Oeser
23eef18b65 Fix #109047: Screw modifier's smooth shading option does not work
Caused by 5876573e14

Seems like a copy/paste mistake in above commit, now corrected.

Pull Request: https://projects.blender.org/blender/blender/pulls/109052
2023-06-16 14:22:50 +02:00
Dalai Felinto
57c3c68ffb Cleanup: make format 2023-06-16 12:18:40 +02:00
Lukas Tönne
406a1f9bce Fix #108263: Show warning when cache baking wants to overwrite data
Modifiers can use the same bake directory now. If multiple modifiers
using conflicting paths are baked at the same time there is now an
error popup.

Modifiers can also bake to directories that already contain data
(including their own). To give users a heads-up there is now a
confirmation popup in that case. It only comes up once per bake operator
invoke to strike a balance between silently overwriting data and not
being too obnoxious when users want to rebake the same simulation many
times.

Pull Request: https://projects.blender.org/blender/blender/pulls/108288
2023-06-16 10:10:20 +02:00
Germano Cavalcante
1c5201b23a Fix bvhtree utilities ignoring empty masks
Fixed an issue where meshes without loose elements or hidden triangle
faces were not taking into account the relevant masks.

From the user's perspective, this might not have seemed like a
significant problem. However, hidden faces in edit mode were
occasionally still snappable.
2023-06-15 16:52:40 -03:00
Lukas Tönne
8fa56a4d19 Clear the cache bake directory when duplicating a modifier
Duplicating will otherwise keep the same bake directory, which causes
a path conflict and requires manual fixing by users. Clearing the path
on copy makes it so the default path is generated on baking.

This does not change the path when doing internal copies, like
- Depsgraph "evaluated" object vs "original"
- Appending or linking objects
- Making a linked object local

Pull Request: https://projects.blender.org/blender/blender/pulls/109014
2023-06-15 17:40:38 +02:00
Brecht Van Lommel
0ab58864f3 Fix Cycles Metal AMD crash with shadow caustics, by disabling it
Better to disable than crashing, as we are not expecting a quick fix. The cause
is likely similar to issues with the light tree, which was already disabled.

Ref #104013
2023-06-15 16:33:21 +02:00
Nate Rupsis
f78aa6c034 Fix #108527: Fixing Vertex Group operators to default back to Active Vertex Group
Reverting changes made in [D14961](https://archive.blender.org/developer/D14961) to default to `Deform Bone` for objects with armatures. Instead explicitly update RNA enum to set default subset for just the normalize all operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/108902
2023-06-15 15:36:00 +02:00
Sergey Sharybin
7fca0ee76a Cycles: Increase the compute model for the PTX kernel
Keep the PTX compute capability at the same level as the latest
architecture-optimized CUDA kernel.

Should help performance of the future cards when running older
Blender, and maybe will allow to perform JIT optimization faster.

Pull Request: https://projects.blender.org/blender/blender/pulls/109007
2023-06-15 14:44:57 +02:00
Kévin Dietrich
61efaec173 Fix Alembic crash when importing a SubD mesh
The counters for polygons count and face corners count were inverted,
leading to various out of bounds accesses due to wrong data size
allocation.

Not sure where the bug comes from, whether it's original, or a typo from
some refactor.
2023-06-15 14:00:24 +02:00
Sergey Sharybin
2d3c9bcee8 Benchmark: Pack python expression into a single line
There should be no functional changes for the typical usecase,
but it allows to have more tricky setups like pointing to a
BAT script to override some configuration.

The issue is that BAT scripts do not support new lines in the
command line arguments. That's where single-line python expression
helps.

For example, it is possible to point benchmark script to a blender.bat
which contains

    blender.exe --python-expr "import bpy; bpy.context.preferences.addons['cycles'].preferences.use_oneapirt = False" %*

to have side-by-side numbers of oneAPI with and without HW RT.

Without this change the %* is which did not work: the BAT
script did not "see" part of the command line past the new line.

Pull Request: https://projects.blender.org/blender/blender/pulls/109006
2023-06-15 13:40:17 +02:00