Commit Graph

99833 Commits

Author SHA1 Message Date
Hans Goudey
b226c115e2 Fix #109236: Split Edges node skips loose edges
With the previous fix to the node, 8a11f0f3a2, the new edge
indices are built with the changed corner vertices from a previous step
in the algorithm. That doesn't work for loose edges though, since they
aren't used by any face corners. The best solution I could come up with
was adding a second loop over the split vertices that adjusts the vertex
indices of loose edges. This can be skipped when there are none.

Pull Request: https://projects.blender.org/blender/blender/pulls/109262
2023-06-23 17:07:05 +02:00
Hans Goudey
fa1121765d Fix: Mistakenly duplicated code in previous split edges fix 2023-06-22 16:19:16 -04:00
Thomas Dinges
a07063e6a4 Release: Blender 3.6 enters Bcon4, RC. 2023-06-22 09:21:13 +02:00
Hans Goudey
00f88babed Fix #109042: Bake from multires different from previous versions
The fix is the same as d622673f4b and 85bd64ece4.
2023-06-21 13:37:25 -04:00
Brecht Van Lommel
5c240c9e29 Revert "Fix unnecessary corner edge computation in multires bake"
This reverts commit ef9d9c6856. Actually probably better to leave
this in, since it may be used by normal computation even if seemed to
work ok in tests.
2023-06-21 18:54:28 +02:00
Brecht Van Lommel
ef9d9c6856 Fix unnecessary corner edge computation in multires bake
The root of the bug was wrong edges, but it wasn't necessary to compute
corner edges at all and this was unnecessarily added in 16fbadde36.

Ref #109161
2023-06-21 18:49:46 +02:00
Hans Goudey
d622673f4b Fix #109161: Baking freeze with invalid edge array
The old subsurf DerivedMesh code creates an edge layer
without initializing it, which makes the proper lazy initialization
of the edge layer later think that it's already finished. To avoid that,
remove the edges when creating the DerivedMesh at first.

Similar to 85bd64ece4
2023-06-21 12:40:36 -04:00
Damien Picard
386c653855 I18n: translate new sequence strip names
Newly added sequence strip names can be translated as user data. This
commit adds the appropriate `DATA_()` macros.

Pull Request: https://projects.blender.org/blender/blender/pulls/109058
2023-06-21 16:41:13 +02:00
Damien Picard
037e5787a5 I18n: extract missing enum items for the Select Similar UV operator
The Select Similar UV operator defined multiple enum item arrays, and
returned one depending on current mode in the enum function
uv_select_similar_type_itemf().

The operator prop's enum items used only the vertex items, which
resulted in several items never being extracted because they were
dynamically generated instead of exposed to the RNA.

This commit groups all items in a single array so that they are
exposed, but uses the enum function to filter them.

Issue reported by Satoshi Yamasaki (@SatoshiYamasaki) in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/108994
2023-06-21 16:37:54 +02:00
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
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
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
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
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
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
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
Philipp Oeser
da052ab9f6 Fix #105942: Wrong text in MeshSequenceCache and Transform Cache
The Alembic procedural was refrenced here even if USD was loaded.

Now check the CacheFile type and let the user know Render Procedurals
are only supported for Alembic atm.

Pull Request: https://projects.blender.org/blender/blender/pulls/108701
2023-06-15 11:16:03 +02:00
Philipp Oeser
d61d2e5f59 Fix #108911: Fcurve Proportional editing circle draws wrong
Since we scale the GPU matrix a certain way (in order to draw a round
circle even for different UI x/y scaling), we have to also compensate
with GPU matrix translation (instead of drawing the raw
frame/value as coords untranslated).

There might be ways to solve this differently (e.g. manipulating the passed
coords instead of the GPU matrix or having a version of imm_drawcircball
that can do this in a way that compensates UI view scaling), but this seems
to be the most straightforward.

Thx @mano-wii hinting at the way to do this with GPU matrix alone.

Should probably go into 3.3 LTS as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/108979
2023-06-15 09:45:22 +02:00
Kévin Dietrich
f0cd966750 Fix #100485: Alembic export crash with names containing a forward slash
As Alembic stores hierarchies as paths separated by a forward slash, such
character cannot be used in a name. This resulted in an uncaught thrown
exception. To fix this, replace '/' with '_' like for other illegal
characters.
2023-06-15 05:44:09 +02:00