Commit Graph

118328 Commits

Author SHA1 Message Date
Campbell Barton
729b317061 Merge branch 'blender-v4.4-release' 2025-03-11 16:22:55 +11:00
Jesse Yurkovich
a5b80c06bc Fix #134764: Increase range of allowed node locations
The bug was caused because the new node's location was being clamped to
the [-100000, 100000] range. Expand this by 10x further.

Pull Request: https://projects.blender.org/blender/blender/pulls/134887
2025-03-11 06:22:34 +01:00
Campbell Barton
90e47e6bc9 Fix error saving a new imbuf from the Python API
Correct the argument for the number of planes.
2025-03-11 16:18:36 +11:00
YimingWu
df346a1b6b Fix #135229: Soft light blending mode for 8 bit colors is wrong
It appears that 8 bit `blend_color_softlight_byte` call used a wrong
blending routing (overlay), while `blend_color_softlight_float` is
correct. Seems that this was never caught. The correct fomula should be
`dst = 2ab + a^2 * (1 - 2b)`.

Pull Request: https://projects.blender.org/blender/blender/pulls/135382
2025-03-11 05:34:21 +01:00
Campbell Barton
19e8fe18ff Cleanup: remove use of WM_global_report for screen operators 2025-03-11 14:39:28 +11:00
Campbell Barton
cdea7c32ec Fix incorrect reporting for the quadreflow operator
- When called from Python, the operator would always return
  success even on failure.
- Errors are now reported to the operator or to the job-systems
  wmJobWorkerStatus::reports.
- Failure now returns OPERATOR_CANCELLED;
- Replace magic numbers with an enum.
2025-03-11 14:07:19 +11:00
Campbell Barton
f36a3bba81 Merge branch 'blender-v4.4-release' 2025-03-11 13:55:15 +11:00
Campbell Barton
53c8672284 Fix QuadriFlow sometimes failing when called from Python
When the QuadriFlow was called with immediate execution `G.is_break`,
if the user had pressed Escape, the value could be set to true and the
operator would immediately exit reporting the operation was canceled.
2025-03-11 13:51:49 +11:00
Campbell Barton
bd06baf6e6 WM: rename WM_report* to WM_global_report*, note it's often bad practice
WM_report was originally added for special cases however new code
has been using this in operators for example, where reports should be
sent to the operator via BKE_report, so the caller can handle,
and so Python can catch the errors.

Rename the functions to make them less easily confused with BKE_report
and add a code-comment on why their use should be avoided.
2025-03-11 12:36:17 +11:00
Harley Acheson
a064c23de5 Merge branch 'blender-v4.4-release' 2025-03-10 18:17:10 -07:00
John Kiril Swenson
58c29625b2 Fix: UI: Action/info/console scrollbar padding/hiding state
Properly pad the action scrollbar by calling
`ED_time_scrub_clamp_scroller_mask` which was overlooked. Also hide it
when the entire view is visible. Adds versioning code to hide console
and info scrollbars as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/135142
2025-03-11 02:10:49 +01:00
Harley Acheson
1a6eb39fed Merge branch 'blender-v4.4-release' 2025-03-10 17:11:59 -07:00
John Kiril Swenson
d8f3f8cc61 Fix: UI: Improve scrollbar hotspot region
Mouse and action zone interaction for scrollbars depend on `v2d->vert`
and `v2d->hor`, which are updated through `view2d_masks`. However,
scrollbar drawing through `UI_view2d_scrollers_draw` calls
`view2d_scrollers_calc`, which pads these sizes further, meaning that
drawn scrollbars are slightly out of sync with their hotspots. This is
noticeable at track edges for shrinking scrollers or when tracks are
opaque. Fix by moving the extra (noticeable) padding code from
`view2d_scrollers_calc` to `view2d_masks`.

Pull Request: https://projects.blender.org/blender/blender/pulls/135021
2025-03-11 01:10:48 +01:00
Jason Fielder
ff4b6c033d Metal: Fix framebuffers being cleared during subpasses.
Stops clearing the framebuffer when we split the scene into multiple renders.

Fixes default cube rendering as black on some Mac systems.

Authored by Apple: James McCarthy"

Co-authored-by: James McCarthy <jamesmccarthy@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/135099
2025-03-11 00:10:33 +01:00
Harley Acheson
b28a75d7ac Merge branch 'blender-v4.4-release' 2025-03-10 14:23:31 -07:00
Harley Acheson
d29f631b18 Refactor: Avoid Copying with Std::String in #135593
Commit 5ea6ffef68 used std::string in cases where StringRef or
StringRefNull could be used instead. This PR just changes those uses,
and therefore avoids some unnecessary string copying.

Pull Request: https://projects.blender.org/blender/blender/pulls/135756
2025-03-10 22:22:30 +01:00
Sean Kim
791b0745fd Fix: ID_CHECK_UNDO macro has operator precedence issues
Introduced in 0dd326592a

As written, the macro was not actually filtering out changes for the
Brush ID type when used inside `ed_undo.cc` due to operator precedence
issues.

This commit simplifies the macro by using `ELEM` to avoid similar errors
in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/135754
2025-03-10 22:05:42 +01:00
Jesse Yurkovich
467df7a66c Merge branch 'blender-v4.4-release' 2025-03-10 14:02:16 -07:00
Jesse Yurkovich
5b26ae10a6 Fix: Integer overflow when saving large EXR images
Various intermediate calculations would overflow inside both
`imb_save_openexr_float` and `imb_save_openexr_half`.

Additionally, use a raw array for the half conversion since `vector`
will perform an unnecessary zero-initialize on a large amount of memory.

Refer to: #135648

Pull Request: https://projects.blender.org/blender/blender/pulls/135678
2025-03-10 22:01:33 +01:00
Jesse Yurkovich
3fe61d1b22 Fix: Use higher default OIIO file size limit
Increase the default OIIO limit for uncompressed image buffers. Without
this Cycles could, among some other operations, encounter the following
type of error:
```
E0307 19:21:38.489921  2588 tile.cpp:634] Error opening tile file t:\temp\blender_a26776\cycles-tile-buffer-34740-2157603138768-0-0.exr
OpenImageIO exited with a pending error message that was never
retrieved via OIIO::geterror(). This was the error message:
Uncompressed image size 33645.6 MB exceeds the 32768 MB limit.
Image claimed to be 42000x42000, 5-channel float. Possible corrupt input?
If this is a valid file, raise the OIIO attribute "limits:imagesize_MB".
```

Users are able to bypass this themselves in two different ways if
the limit does not meet their needs.

The primary downside of this change is that it increases the memory
consumed if the file is actually malicious. Perhaps well beyond what
most consumer devices have available with physical+swap.

An alternate design would be to expose a System-level preference
for this limit and keep the default 32gb.

Refer to: #135648

Pull Request: https://projects.blender.org/blender/blender/pulls/135676
2025-03-10 22:01:03 +01:00
Harley Acheson
8ded9a8350 Merge branch 'blender-v4.4-release' 2025-03-10 12:29:11 -07:00
Harley Acheson
5ea6ffef68 Fix #135134: Do Not Show Full Path to Built-In Assets
We are showing full paths to the library file on some tooltips, like
for brush assets. This PR checks to see if the asset is in the
BLENDER_SYSTEM_DATAFILES/assets folder. If so it just shows it as
"Built-in Asset:" and with the last portion of the path.

Pull Request: https://projects.blender.org/blender/blender/pulls/135593
2025-03-10 20:28:00 +01:00
Sean Kim
45ff1619f3 Fix: Editor changes to tool-settings push unnecessary undo steps
When users make changes to certain settings from the editor (e.g.
changing the Proportional Edit or Snapping settings), an undo step is
created in the undo stack that has no effect when undone. These steps
should not be created, therefore this commit clears the `STRUCT_UNDO`
tag from the `ToolSettings` struct and any structs that it contains.
A prior commit, 0dd326592a, introduced filtering on the `STRUCT_UNDO`
flag for changes being applied from the UI.

Pull Request: https://projects.blender.org/blender/blender/pulls/134836
2025-03-10 18:11:37 +01:00
илья _
fd9ac90395 Fix #135581: node tree incorrect evaluation
Instances attributes are propagated by default by `Curve Fill`, but this
is not mentioned in a declaration.

Pull Request: https://projects.blender.org/blender/blender/pulls/135597
2025-03-10 18:10:28 +01:00
Sean Kim
96d9619935 Cleanup: Add NonCopyable to Paint BVH Node class
When working with the Paint BVH, we mostly want to operate on the
existing set of nodes stored in the Tree, even when parititioning and
creating new nodes. Adding `NonCopyable` to the base `Node` class
prevents a subtle class of errors early where a copy is made instead of
acquiring a reference.

Pull Request: https://projects.blender.org/blender/blender/pulls/135547
2025-03-10 17:55:53 +01:00
Julian Eisel
1e55035b55 Merge branch 'blender-v4.4-release' 2025-03-10 17:17:10 +01:00
Bastien Montagne
1d76cbab64 Cleanup: sequencer: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.

Pull Request: https://projects.blender.org/blender/blender/pulls/135747
2025-03-10 17:16:43 +01:00
Julian Eisel
2b92b0d6d8 Fix #135664: Crash deleting pose asset from saved current file
Rather new code to build the asset library reference from a library
didn't cover the case where the current file library is saved to disk,
and as such implemented as on-disk library.
2025-03-10 17:10:43 +01:00
Hans Goudey
9104cc3406 Merge branch 'blender-v4.4-release' 2025-03-10 11:58:51 -04:00
Hans Goudey
6eb5566104 Fix: Allow RNA functions to return collection properties
Possibly broken by acd1b0b7f9.
Though returning a collection property from an RNA function doesn't
seem to have been used before. The mistakes are relatively obvious.
The RNA parameter list data isn't initialized so placement new and
calling the CollectionVector destructor manually are necessary.

This fix is necessary for #135734 which is targeted at 4.4.

Pull Request: https://projects.blender.org/blender/blender/pulls/135746
2025-03-10 16:57:13 +01:00
Bastien Montagne
83a2e34654 Cleanup: shader_fx & simulation: Replace 'void' MEM_[cm]allocN with templated, type-safe MEM_[cm]allocN<T>.
The main issue of 'type-less' standard C allocations is that there is no check on
allocated type possible.

This is a serious source of annoyance (and crashes) when making some
low-level structs non-trivial, as tracking down all usages of these
structs in higher-level other structs and their allocation is... really
painful.

MEM_[cm]allocN<T> templates on the other hand do check that the
given type is trivial, at build time (static assert), which makes such issue...
trivial to catch.

NOTE: New code should strive to use MEM_new (i.e. allocation and
construction) as much as possible, even for trivial PoD types.

Pull Request: https://projects.blender.org/blender/blender/pulls/135744
2025-03-10 16:39:38 +01:00
Falk David
6c0bd4ebce Merge branch 'blender-v4.4-release' 2025-03-10 16:29:26 +01:00
Sean Kim
4d50e00914 Fix #135328: Grease Pencil: Unable to set default eraser
Incorrectly changed in 9e8c037375.

The Grease Pencil `eraser_brush` property is still accessed and set
directly from Python, we cannot remove setting access to the property in
favor of the `AssetWeakReference` without first making other changes.
For now, this patch re-adds the RNA definitions for the property to make
it editable again.

Pull Request: https://projects.blender.org/blender/blender/pulls/135743
2025-03-10 16:28:50 +01:00
Jacques Lucke
c643c062a3 Merge branch 'blender-v4.4-release' 2025-03-10 16:21:47 +01:00
David Murmann
05ec635e6b Fix #135277: mark scene parameters as dirty on camera switch
Geometry nodes using the active camera did not get updated
when the camera is switched by a timeline marker.

Pull Request: https://projects.blender.org/blender/blender/pulls/135546
2025-03-10 16:21:12 +01:00
Falk David
3bbf7aed91 Merge branch 'blender-v4.4-release' 2025-03-10 16:14:37 +01:00
Philipp Oeser
1f780a5caa Fix #135711: Setting Grease Pencil modifier materials are not refcounted
When setting these materials, then removing the modifier, usercount
would be decreased, resulting in possible dataloss on reload

Affected were:
- all Grease Pencil modifiers material influence materials
- `LineartModifier` `target_material`
- `OutlineModifier`  `outline_material`

These were all using `IDWALK_CB_USER` which ends up decrementing
usercount in `modifier_free_data_id_us_cb` when the modifier is removed

So to resolve, decrement/increment material usercount in
`rna_GreasePencilModifier_material_set` appropriately

NOTE: previously, it was also doing `id_lib_extern` on the object?!
(should be on the material, no?)

NOTE: still not 100% sure where we actually use refcounting (esp. in
modifiers) and where we dont, another alternative is to just drop it and
use IDWALK_CB_NOP` (instead of `IDWALK_CB_USER`) for these materials.

Pull Request: https://projects.blender.org/blender/blender/pulls/135729
2025-03-10 16:12:32 +01:00
илья _
b0dfc90368 Cleanup: Geometry Nodes: Better use of BLI functions
There is a `mod_periodic` function which is equivalent to
`apply_offset_in_cyclic_range` but more general.
Also there is a side cleanup of the naming.

Pull Request: https://projects.blender.org/blender/blender/pulls/135667
2025-03-10 16:10:12 +01:00
Anthony Roberts
5a029fdf1f Merge branch 'blender-v4.4-release' 2025-03-10 14:42:18 +00:00
Pratik Borhade
07c38e5612 Fix #135290: NLA move channel crash when Grease Pencil object data animation is present
Crash occurs due to channeltype ANIMTYPE_GREASE_PENCIL_DATABLOCK added
to the filtered list when rearranging nla strips. This channel seems
unnecessary, it has caused crashes in past as well (d943c9f128). Animation data
on object other than drawing-keys are already handled by `animfilter_block_data`.

Pull Request: https://projects.blender.org/blender/blender/pulls/135375
2025-03-10 14:56:11 +01:00
Falk David
15d71a02ff Merge branch 'blender-v4.4-release' 2025-03-10 14:55:02 +01:00
YimingWu
d443932c73 Fix #135728: Grease Pencil: Correct point count in length modifier
In Grease Pencil length modifier, if a stroke is not filtered, it
may not have a valid point count/offset. This fix ensures that we
get valid point count by copying it beforehand.

Pull Request: https://projects.blender.org/blender/blender/pulls/135733
2025-03-10 14:54:28 +01:00
Sybren A. Stüvel
657f9e45f7 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-10 14:52:14 +01:00
Sybren A. Stüvel
955e02c90d Fix: Duplicating a Scene does not remove animation from slotted actions
When duplicating a scene in any way other than Full Copy, the VSE data
is (apparently) not copied along. To prevent dangling F-Curves, any
animation of sequencer strips is removed. This is now done correctly for
slotted Actions, instead of looping over the legacy `action->curves`
field.

Also the F-Curve RNA path that's being tested for is updated. Instead of
deleting all F-Curves with `sequences` in the name, the code now
correctly looks for `sequence_editor.strips_all`.

Pull Request: https://projects.blender.org/blender/blender/pulls/135576
2025-03-10 14:49:12 +01:00
Sybren A. Stüvel
216964c697 Fix: Crash when scene has F-Curves for VSE sequencer strips, but no VSE
Fix a crash when the Scene's Action has F-Curves targeting the VSE
sequencer strips, but the scene has no VSE data at all.

This issue occurs in the following way:

- Scene uses VSE, with an animated strip.
- Duplicate the scene using Linked Copy. This does _not_ copy the VSE
  into the duplicate scene, but does include its animation (due to a bug
  for which a fix is coming).
- Ensure the Dope Sheet is visible & showing the scene animation.

Pull Request: https://projects.blender.org/blender/blender/pulls/135576
2025-03-10 14:49:03 +01:00
Hans Goudey
0c19528199 Merge branch 'blender-v4.4-release' 2025-03-10 09:33:08 -04:00
Hans Goudey
c52da69dfb Fix #135643: Node ungroup operator doesn't move frame nodes
Caused by 4bf34d9591.

Nodes within frames were ignored because previously their location was
relative to the frame, so moving both the frame and the node would cause
"double" movement. Now each node location is independent.
2025-03-10 09:32:12 -04:00
Clément Foucault
92df5ba10f Fix #135650: Workbench: Missing update changing shading pop-over settings
This was previously taken care of by the `view_update` callback.
Nowadays, the best way is to manually check for changes inside
the engine.
2025-03-10 13:34:41 +01:00
Clément Foucault
86d7f1bcee Merge branch 'blender-v4.4-release' 2025-03-10 13:07:47 +01:00
Clément Foucault
690a165630 Fix #135652: Overlay: Overlays draw in front of mesh in Paint modes
This was caused by a missing prepass.
Only early out if drawing the prepass, otherwise, run all checks.
This is much safer.
2025-03-10 13:07:35 +01:00