Commit Graph

120055 Commits

Author SHA1 Message Date
Philipp Oeser
93585602a1 Fix #100164: Alembic import: Ensure mesh normals are normalized
Similar to !124267 and !124261

This normal data is eventually passed into `BKE_mesh_set_custom_normals`
and through to `mesh_normals_corner_custom_set` which expects normals to
actually be normalized per its documentation.

Not doing so would yield meshes with incorrect "sharp" data for affected
edges.

Thx @OmarEmaraDev for the initial patch

Pull Request: https://projects.blender.org/blender/blender/pulls/124336
2024-07-08 16:03:52 +02:00
Miguel Pozo
6c8e14bb30 Merge branch 'blender-v4.2-release' 2024-07-08 15:25:12 +02:00
Miguel Pozo
a7e24222cf EEVEE: Show compilation subprocesses information
Inform the user when EEVEE is compiling materials and parallel
compilation is disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/124249
2024-07-08 15:23:58 +02:00
Hans Goudey
47dada536d Merge branch 'blender-v4.2-release' 2024-07-08 09:23:49 -04:00
Hans Goudey
80a0c4237a Fix #121696: Use after free with static asset caches when opening new file
The cause of the crash was that asset libraries are freed, but the filtered
trees used for things like node tool menus weren't marked dirty, so we
continued to use the freed asset data. On a design level this is quite
concerning because it means the lifetimes of the asset tree caches and
the asset system's asset libraries are connected tenuously.

Eventually there should be a better solution, but I found the simplest
fix for now is just to add a notifier when opening a new file that causes
the asset tree caches to be tagged dirty.

Pull Request: https://projects.blender.org/blender/blender/pulls/124254
2024-07-08 15:10:42 +02:00
Lukas Tönne
996520960b Merge branch 'blender-v4.2-release' 2024-07-08 15:05:42 +02:00
Lukas Tönne
d14478c747 Fix #124310: Add override flag to prevent infinite recursion
The `enum_definition` property was changed by #121234 and now returns
the node itself. This creates an infinite recursion in the override
system that must be avoided by adding this flag.

Pull Request: https://projects.blender.org/blender/blender/pulls/124347
2024-07-08 15:04:49 +02:00
Lukas Stockner
26b6c2b94d Fix #124211: FCurve generates NaNs with Vector handles
The issue here was that the left handle of the first point was calculated
incorrectly (set to the position of the point itself), which caused a
NaN when attempting to normalize a zero vector when computing extrapolation
vectors.

Pull Request: https://projects.blender.org/blender/blender/pulls/124239
2024-07-08 15:01:18 +02:00
Sergey Sharybin
2925e84e15 Merge branch 'blender-v4.2-release' 2024-07-08 14:38:33 +02:00
Alaska
a0869d2ca6 Shader: Update Principled BSDF node description
Update the description to mention the node is now based on the OpenPBR
model rather than the Disney Principled Model. This has been the
case since Blender 4.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/124209
2024-07-08 14:38:07 +02:00
Campbell Barton
c859ae0f93 Merge branch 'blender-v4.2-release' 2024-07-08 22:36:19 +10:00
Campbell Barton
6ed97d7bd6 Merge branch 'blender-v4.2-release' 2024-07-08 22:36:16 +10:00
Campbell Barton
5eef5454fa Fix #124250: enabling add-ons from command line broken
Excluding add-ons caused an `_bpy_internal.addons` not to install.
2024-07-08 22:27:47 +10:00
Jeroen Bakker
6471b715b2 Vulkan: Remove performance warning about depth clearing
When clearing depth attachment the write depth state should be enabled.
When this isn't the case a clear texture is being performed. Before
the render graph this used to be a performance issue as the rendering
would be suspended.

The render graph currently reorders these texture clears before of
the rendering context and therefore isn't seen as a performance issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/124340
2024-07-08 14:00:40 +02:00
Falk David
065219b6fa Fix: GPv3: Draw Tool creates wrong curve type
The draw tool was creating catmull-rom curves because the
curve type attribute was being reset to the default (0) which
happens to be the catmull-rom type.

The fix makes sure to skip over the `curve_type` attribute when
initializing the other attributes to their default.
2024-07-08 13:59:01 +02:00
Bastien Montagne
5270d72426 Fix (unreported) yet another MEM_new/MEM_freeN mismatch... 2024-07-08 13:54:15 +02:00
Bastien Montagne
9f90594db7 UI: Support non-C-allocated data for buttons and blocks func_argN data.
This change allows to pass optional freeing and copy callbacks to
functions setting the `func_argN` member of the `uiBut` and `uiBlock`
structs. These callbacks are used to free or duplicate the data stored
in these void pointers.

Defaults are set respectively to `MEM_freeN` and `MEM_dupallocN`, to
match previous hard-coded behavior.

Utils template functions are added to easily generate callbacks to
types that are managed with the `MEM_new`/`MEM_delete` C++-style
allocation, as long as they provide a copy constructor.

Note that this change should be considered as a temporary, transitional
solution. A more robust and future-proof solution is to move towards
more usage of `std::function` for these callbacks, which can then own
and manage their custom data themselves.
2024-07-08 13:54:15 +02:00
Damien Picard
9a0b5ac0c6 I18n: Translate sequencer channel and metastrip names
Both the metastrips and sequencer channels are user-editable data, so
translation of their names uses DATA_().

Issues reported by Gabriel Gazzàn.

Pull Request: https://projects.blender.org/blender/blender/pulls/124314
2024-07-08 13:00:09 +02:00
Jeroen Bakker
180a257eef Cleanup: Vulkan: Use stamp in stead of version
Pull Request: https://projects.blender.org/blender/blender/pulls/124339
2024-07-08 12:56:21 +02:00
Casey Bianco-Davis
18b5f510d4 Fix #122536: GPv3: Render cyclic stroke with 2 point break next fills.
The issue was that parts of the code considered cyclic strokes with less than 3
points to also have a fill.

Pull Request: https://projects.blender.org/blender/blender/pulls/124266
2024-07-08 12:48:45 +02:00
Jeroen Bakker
08d365b810 Vulkan: Cleanup barrier state
Try to reduce the barrier state so we can be more flexible when adding
support for sub resource tracking.

Pull Request: https://projects.blender.org/blender/blender/pulls/124237
2024-07-08 12:28:11 +02:00
YimingWu
0fbb83ef85 Fix #124296: Lower case name in Multistroke modifier
Just a typo in Grease Pencil Multistroke modifier.

Pull Request: https://projects.blender.org/blender/blender/pulls/124327
2024-07-08 06:09:50 +02:00
Jesse Yurkovich
74c282f532 Merge branch 'blender-v4.2-release' 2024-07-07 12:28:30 -07:00
Jesse Yurkovich
f49780b888 Fix #120590: USD: Ensure mesh normals are actually normalized
This normal data is eventually passed into `BKE_mesh_set_custom_normals`
and through to `mesh_normals_corner_custom_set` which expects normals to
actually be normalized per its documentation.

Not doing so would yield meshes with incorrect "sharp" data for affected
edges.

Pull Request: https://projects.blender.org/blender/blender/pulls/124267
2024-07-07 21:27:01 +02:00
Julian Eisel
7ef0c37bef Fix MEM_new/MEM_freeN mistach
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`.

Would crash with the guarded allocator, which detects such mismatches now.
2024-07-07 19:08:13 +02:00
Jacques Lucke
d58f1f614e Merge branch 'blender-v4.2-release' 2024-07-07 11:17:41 +02:00
Jacques Lucke
bdb444bc2b Fix #124290: frames disappear when an invalid link exists 2024-07-07 11:16:50 +02:00
Campbell Barton
cd1dbab348 Cleanup: spelling in comments 2024-07-07 00:29:39 +10:00
Campbell Barton
48383cf20e Cleanup: avoid shadowing, redundant assignment & minor changes
Quiet cppecheck warnings, use const pointers, ELEM(..) macro,
replace NULL -> nullptr, unsigned int -> uint.
2024-07-07 00:18:00 +10:00
Jacques Lucke
7bce839e25 Geometry Nodes: simplify retrieving data of instance reference
Specifically it's now easier to get the name, geometry set and icon.
2024-07-06 15:38:12 +02:00
John Kiril Swenson
406554c11e VSE: Add snapping in preview area
Adds snapping in the VSE preview area.

Source points are the four corners and origins of all selected, visible
image quads. Targets can be preview borders, preview center, or
corners/origins of other strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/122759
2024-07-06 15:24:52 +02:00
Campbell Barton
04b7e8fe1d Merge branch 'blender-v4.2-release' 2024-07-06 15:00:40 +10:00
Campbell Barton
c3c69c8956 Merge branch 'blender-v4.2-release' 2024-07-06 15:00:38 +10:00
Campbell Barton
60be3d1aeb Merge branch 'blender-v4.2-release' 2024-07-06 15:00:34 +10:00
Campbell Barton
850e715682 UI: add UILayout.template_popup_confirm(..) function
This makes it possible for popups to have their confirm & cancel buttons
defined in the operator's draw callback.

When used with popups created by: `WindowManager::invoke_props_dialog()`
to override the default confirm/cancel buttons.

In the case of `WindowManager::popover(..)` & `bpy.ops.wm.call_panel()`
this can be used to add confirm/cancel buttons.

Details:

- When the confirm or cancel text argument is a blank string the button
  isn't shown, making it possible to only show a single button.
- The template is similar to UILayout::operator in that it returns the
  operator properties for the confirm action.
- MS-Windows alternate ordering of Confirm/Cancel is followed.

Needed to resolve #124098.

Ref !124139
2024-07-06 14:49:39 +10:00
Campbell Barton
bdf06e6d82 Cleanup: spelling in comments 2024-07-06 14:21:24 +10:00
Campbell Barton
c4ab17ab79 Cleanup: quiet compiler warnings 2024-07-06 13:37:16 +10:00
Jesse Yurkovich
b2dbf54929 Fix: MEM_new/MEM_freeN mismatch for CustomDataTransferLayerMap
Pull Request: https://projects.blender.org/blender/blender/pulls/124265
2024-07-06 02:43:03 +02:00
Jesse Yurkovich
8d26b2b80d Merge branch 'blender-v4.2-release' 2024-07-05 11:21:12 -07:00
Charles Wardlaw
5224b1cab2 Fix #124206: USD: Always export animation transforms, even when identity
Now the export only skips identity transforms on static exports, to save
space.

Co-authored-by: Charles Wardlaw <cwardlaw@nvidia.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/124251
2024-07-05 20:19:47 +02:00
Hans Goudey
bc1c4f7f1d Fix #124256: Socket value hidden for string sockets
Mistake in df98aa61bb.
2024-07-05 14:03:32 -04:00
Harley Acheson
c89400dcfb Merge branch 'blender-v4.2-release' 2024-07-05 10:37:58 -07:00
Harley Acheson
938f50e1f7 Fix #124168: Allow File Browser Layout Initialization While Minimized
If you change an area to a File Browser while it is vertically
minimized we get an assert on layout initialization since there
are no visible rows. But this state is valid and it works great
without this assert. This PR removes the assert and adds a comment.

Pull Request: https://projects.blender.org/blender/blender/pulls/124253
2024-07-05 19:36:49 +02:00
Harley Acheson
87687d08c1 Merge branch 'blender-v4.2-release' 2024-07-05 10:35:05 -07:00
Hans Goudey
b9edd2e02e Fix #124216: "Remove Hook" operator causes crash with geometry nodes
It looks like the "user edited flag propagation" node built for the geometry
nodes modifier is unchanged after modifiers are removed. My guess is this
is now a more general problem when modifiers are removed-- I guess the
depsgraph nodes for an object have to be rebuilt when that happens now.

Maybe there is a more general fix, but to fix the crash mentioned in the
report, I tagged the depsgraph for a relations update, which rebuilds the
problematic modifier node.

Pull Request: https://projects.blender.org/blender/blender/pulls/124252
2024-07-05 19:35:03 +02:00
Harley Acheson
fd06a407e1 Fix #124163: Update SO_DATA_API Outliner When Windows are Removed
On Window close send NC_WINDOW | NA_REMOVED notification. If Outliner
is in SO_DATA_API mode with this message then refresh.

Pull Request: https://projects.blender.org/blender/blender/pulls/124205
2024-07-05 19:33:27 +02:00
Philipp Oeser
c69b7e71a3 Merge branch 'blender-v4.2-release' 2024-07-05 18:56:39 +02:00
Philipp Oeser
4b168dd645 Fix #124166: Assetbrowser crash on quick Editor change (from py)
FileList can still be uninitialized while loading, so simple nullptr
check.

Pull Request: https://projects.blender.org/blender/blender/pulls/124243
2024-07-05 18:56:11 +02:00
Falk David
f23ade5ac4 Refactor: Replace BKE_attributes_supported with C++ API
This removes `BKE_attributes_supported`.
Instead, a static method `from_id`
is added to the `AttributeAccessor` class that constructs
the accessor from the given ID. If this fails, `std::nullopt`
is returned.

Pull Request: https://projects.blender.org/blender/blender/pulls/124245
2024-07-05 18:41:49 +02:00
Jacques Lucke
5360722449 Merge branch 'blender-v4.2-release'
This also reverts da2a262658 and 57e925b38f and fixes a
merge conflict in `action.cc`.
2024-07-05 18:16:08 +02:00