Commit Graph

138746 Commits

Author SHA1 Message Date
Bastien Montagne
4195e9e1a7 MEM_guarded: Improve error reporting usefulness.
The main change from this commit is the usage of ASAN poisoning (if
available) to trigger an ASAN report on the erroring memory block.

The main benefit is the report of the allocation backtrace of that
faulty memory block.

Pull Request: https://projects.blender.org/blender/blender/pulls/124231
2024-07-08 12:10:37 +02:00
Campbell Barton
cdb61375fe Merge branch 'blender-v4.2-release' 2024-07-08 18:27:52 +10:00
Campbell Barton
386d6f098a AUTHORS: correct invalid de-duplication 2024-07-08 18:20:53 +10:00
Campbell Barton
e52783033d Merge branch 'blender-v4.2-release' 2024-07-08 15:31:44 +10:00
Campbell Barton
9bbf269fe3 Extensions: suppress all pylint warnings & handle add-on errors
- Suppress pylint warnings via comments or be minor changes.
- Any errors disabling add-ons before upgrading or uninstalling are now
  reported to the operators.
- Disable cyclic import warning is it's impractical to resolve.
- Enable useless-suppression warning.
2024-07-08 15:29:27 +10: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
Campbell Barton
817efe4aef Merge branch 'blender-v4.2-release' 2024-07-08 13:33:34 +10:00
Campbell Barton
05feac04fa Extensions: minor changes to error handling & uninstalling
- Any change that cases validate to fail reports a fatal_error.
- If removing a package fails, attempt to the remove cache.
2024-07-08 13:27:58 +10:00
Campbell Barton
bae1d3311f Merge branch 'blender-v4.2-release' 2024-07-08 13:05:49 +10:00
Campbell Barton
ac6e216b26 Merge branch 'blender-v4.2-release' 2024-07-08 13:05:45 +10:00
Campbell Barton
74f8ac15f5 Extensions: "build --split-platform" now includes it's own wheels
The `[build.generated]` section now includes a filtered list of wheels
to simplify checking existing wheels on the server.

Also disallow quotes & control characters in wheel paths because they
already shouldn't be used and doing so would cause escaping issues in
the generated TOML.

Implements #124242.
2024-07-08 12:50:43 +10:00
Campbell Barton
f3630777f6 Extensions: show add-on errors in the add-ons panel
Restore the UI from 4.1. Also correct an error when extensions are
disabled.
2024-07-08 11:36:52 +10: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
a515da841b Merge branch 'blender-v4.2-release' 2024-07-07 17:51:42 +10:00
Campbell Barton
5877efbec3 Extensions: add missing checks for errors in IO, JSON & TOML data
Exceptions need be caught and forwarded so they show it in Blender's
interface. While most common errors where accounted for, various IO
errors & malformed JSON/TOML could cause internal operations to fail
with unhandled exceptions.
2024-07-07 17:43:33 +10: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
Julian Eisel
8e8160283e Assets: Update asset repository has to include bundled brush assets
See blender/blender-assets@c02a78249c.

The essentials asset library now features the bundled brushes as brush assets.
This is in preparation for the brush assets project merge, see #116337.

There's no real reason to wait with merging these, even if merging the rest of
the assets project may take a few days still. These brush assets will not show
up in the asset browser yet, since brush assets are still considered an
experimental feature in the main branch.
2024-07-06 12:02:45 +02:00
Campbell Barton
08bf742302 Merge branch 'blender-v4.2-release' 2024-07-06 15:00:43 +10: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
11b1919bcf Extensions: resolve popup glitches when dropping URL's
Use UILayout::template_popup_confirm to replace workarounds that didn't
work very well.

- Resolve "Add Repository..." button in the dialog not closing the
  popup when pressed.
- Add a "Cancel" button while the remote resository data is
  downloading.
- Remove the hack to scale the UILayout to hide the existing
  confirm/cancel buttons.

Resolves #124098.
2024-07-06 14:49:41 +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 df98aa61bba9ad3b800ad1c77da4c1eb4548340a.
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 da2a262658a396 and 57e925b38feb19b and fixes a
merge conflict in `action.cc`.
2024-07-05 18:16:08 +02:00
Jacques Lucke
57e925b38f Fix: don't show grease pencil domain in Domain Size node
This fixes part of #123935. The change has to be reverted
in the `main` branch.
2024-07-05 18:09:38 +02:00
Jacques Lucke
da2a262658 Fix: don't show layer domain in viewer node
This fixes part of #123935.
2024-07-05 18:09:38 +02:00
Miguel Pozo
b20bacf657 Fix #123758: Viewport Render Animation doesn't track World updates
Viewport instances created by the Viewport Render Animation operator
don't get `view_updated` notifications.
Fix update detection by implementing a `last_update` timestamp for
`World`, similar to the ones added in #115196.

Pull Request: https://projects.blender.org/blender/blender/pulls/124114
2024-07-05 18:05:27 +02:00
Christoph Lendenfeld
c446813dd3 Fix #123943: manual channel ordering no longer works
The issue was that the function `animfilter_action` got a new
code segment at the start which checked `if (action.is_empty())`.
That function didn't check if the `groups` list of the action is empty
though. Regular keyframe animation is usually sorted into
keyframe groups, which means it is not stored under `curves` of the action.
However in the anim filtering code, the function `split_groups_action_temp`
moves the fcurves to their groups under the `groups` listbase.

Pull Request: https://projects.blender.org/blender/blender/pulls/124172
2024-07-05 17:56:45 +02:00
Jacques Lucke
e4c9b73051 Fix #124160: crash when trying to load unavailable grid
The openvdb API was used incorrectly before. I didn't notice that this is
a static function and requires the type to be passed in.

Note that this does not solve the cache invalidation issue yet. Instead
it handles the case more gracefully when the stored .vdb file changes
when Blender doesn't expect it to change.
2024-07-05 17:55:04 +02:00