Commit Graph

153166 Commits

Author SHA1 Message Date
Campbell Barton
1070d6b64e Cleanup: use SPDX header in CMakeLists.txt generator 2025-08-21 12:02:33 +10:00
Campbell Barton
6361cedd62 Cleanup: remove tools/utils_build/cmake-flags
Since it's inclusion, we have more convenient ways to enable features
such as ASAN. Remove the script since this hasn't been updated in a long
time and would be better off as a 3rd party tool.
2025-08-21 12:02:33 +10:00
Sean Kim
e648f1fcbc Cleanup: Various changes for calc_area_normal_and_center
* Remove `_r` suffix from internal variable
* Use bitflag instead of two booleans for function parameter

Pull Request: https://projects.blender.org/blender/blender/pulls/144597
2025-08-21 03:36:52 +02:00
Sean Kim
884ab7beb6 Fix: Use correct callback for unified paint setting updates
Introduced in bf7c8f1ef3

Pull Request: https://projects.blender.org/blender/blender/pulls/144830
2025-08-20 23:29:37 +02:00
Colin Basnett
ee43c4c782 Fix #144335: Collection asset drag-and-drop creates two undo operations
This fixes https://projects.blender.org/blender/blender/issues/144335 by surrounding the drag-and-drop handling functionality in an undo group.

<video src="attachments/b8ddcb80-cda2-4f5e-83dd-4736dbe7eddd" title="Screencast_20250815_161525.webm" controls></video>

Pull Request: https://projects.blender.org/blender/blender/pulls/144630
2025-08-20 23:24:51 +02:00
Brecht Van Lommel
1d9bd460fc Fix #144814: Cycles OSL crash accessing geom:name string attribute
This should be a ustring hash now, not a ustring.

Pull Request: https://projects.blender.org/blender/blender/pulls/144881
2025-08-20 21:00:12 +02:00
Sean Kim
abe1b9d895 Cleanup: Rename BKE_paint_brush_poll to BKE_paint_can_use_brush
The prior naming is a bit confusing given that it returns `true` if
`brush` is `nullptr`. My initial expectation on reading the old name is
that it would only return true if both are non-null.

Pull Request: https://projects.blender.org/blender/blender/pulls/144822
2025-08-20 20:59:28 +02:00
Brecht Van Lommel
98e9dd1aa2 Revert "Cycles: Simplify Metal backend with direct bindless resource encoding"
This reverts commit b4be954856.

It is causing render artifacts in the barbershop benchmark. There were some
conflicts to resolve when reverting this, mainly related to the removal of
3D textures.

Fix #144713
Ref #140671, #144712

Pull Request: https://projects.blender.org/blender/blender/pulls/144880
2025-08-20 20:53:40 +02:00
Maxime-Cots
7a01f736a5 Nodes: Make context path breadcrumbs interactive
Make it possible to navigate in/out node groups through the breacrumbs
context path overlay.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/141292
2025-08-20 17:53:34 +02:00
Hans Goudey
8b9e667eab Revert "Sequencer: Avoid storing un-tracked pointers in blend files"
This reverts commit 58554964e4.
Caused unexpected test failures, may need more review.
2025-08-20 11:31:02 -04:00
Aaron Carlisle
4560e60670 UI: Add Scene/ViewLayer selectors to Properties tabs
Add Scene and View Layer selectors to the Scene and View Layer tabs
in the Properties Editor, matching the existing controls in the topbar.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/143266
2025-08-20 17:12:46 +02:00
Alaska
41d4b945d3 Fix: Missing space in Unbiased volume tooltip
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/144871
2025-08-20 16:51:02 +02:00
Hans Goudey
58554964e4 Sequencer: Avoid storing un-tracked pointers in blend files
Currently, sequencer structs contain several pointers to data within
other structs. These pointers need to be remapped as the structs are
reallocated when reading from blend files. That has worked so far
because the pointers are exactly the values from the Blender session
that saved the file. WIth the implementation of #127706, the pointers
in the file aren't "real" anymore, and we can't offset them to get the
struct that contained the data.

This commit replaces these 4 mid-struct pointers to point to the
containing strips instead, and uses some trivial logic to access the
fallback root sequence channels and strips. This makes the pointer
remapping on file load possible again.

The downside is that this isn't strictly backward or forward compatible,
but only on a UI-level. The active meta-strip information will be lost,
and the sequencer will reset to displaying the root sequence.

Depends on #144624

Pull Request: https://projects.blender.org/blender/blender/pulls/144626
2025-08-20 16:49:41 +02:00
Bastien Montagne
9df3b1cd06 Benchmark: Fix bpy/RNA broken 'bpy props get/set' tests, add FloatVectorProperty one.
Not sure why it did not error with the other bpy prop types... It did
was slowing things a lot though, get/set logic was failry broken.
2025-08-20 16:37:52 +02:00
Hans Goudey
4d6646c91e Fix #143958: Dynamic paint crash due to thread-unsafe brush mesh writing
Alternative to #144563.
This fix adds a lock to the runtime data, and holds the lock whenever the
brush mesh is accessed. While there may be more efficient solutions,
dynamic paint is at the end of its life and guaranteeing correctness is
more important.

Pull Request: https://projects.blender.org/blender/blender/pulls/144816
2025-08-20 16:23:26 +02:00
W_Cloud
8d6c717e34 UI: Nodes: Add icons to data type menus
Add icons to more data type menus, similar to how it is done for
Switch, Index Switch, Compare, etc.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/143779
2025-08-20 16:14:32 +02:00
Hans Goudey
89c5702d12 Fix: Reference binding to null pointer in normals-calc_corner
Mistake in ca60419b3a
2025-08-20 09:56:35 -04:00
Miguel Pozo
b2b23e3619 Fix #144526: Crash on exit with Video_Editing template
The crash is caused by libepoxy GL functions pointing to nullptrs.
libepoxy "Automatically initializes as new GL functions are used.",
so to call a function without a GL context bound, the function must
have been called before with a bound context.

This PR ensures there's a valid GL context bound for the whole
`WM_exit` scope.

(4.5 backport candidate)

Pull Request: https://projects.blender.org/blender/blender/pulls/144572
2025-08-20 15:48:20 +02:00
Mohamed Hassan
b7742e6988 Compositor: Add Jitter input to Glare Sun beams
This patch introduces a new Jitter option for the Sun Beams mode of the
Glare node. If non-zero, is uses an approximation that is faster to
compute but makes the result more noisy.

Internally, this is computed by reducing the number of samples used to
integrate the results and introducing a random offset during
integration.

Pull Request: https://projects.blender.org/blender/blender/pulls/141789
2025-08-20 15:10:18 +02:00
Philipp Oeser
20d7b5563c Release: Include 4.5 LTS gitea issue in notes generator
Include the issue number so we don't have to specify this for 4.5 versions.

Pull Request: https://projects.blender.org/blender/blender/pulls/144865
2025-08-20 14:54:22 +02:00
Brecht Van Lommel
8138fa3ce3 Fix: Non-existent mask.cursor_set operator in keymap
The mask editor is using uv.cursor_set instead.

Ref #136086

Pull Request: https://projects.blender.org/blender/blender/pulls/144852
2025-08-20 13:33:45 +02:00
Campbell Barton
9cabbe074f Fix #144858: Invalid text selection in the Python console 2025-08-20 21:24:36 +10:00
Bastien Montagne
27a613d9ea Fix: BPY props: broken custom set function for strings.
Another dummy mistake in BPY accessors refactor from yesterday (134d66201a)...
We critically need more unittests in this area!
2025-08-20 12:48:47 +02:00
Clément Foucault
2f2ff44e56 GPU: Shader: Remove legacy creation API
This API is no longer used for 5.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/144819
2025-08-20 09:25:32 +02:00
Alberto12345678999
d803ee4c79 Nodes: Port shader Gamma node to Geometry Nodes
This patch unifies the Gamma node across editors:

- Compositor now uses the Shader Gamma node implementation.
- Geometry Nodes also uses the node as a new addition.
- UI-wise in the Compositor, only socket labels change to "Color".

Forward compatibility is broken for the compositor, and the python API
changed, since the node's ID name is now ShaderNodeGamma as opposed to
CompositorNodeGamma.

Pull Request: https://projects.blender.org/blender/blender/pulls/142414
2025-08-20 08:46:34 +02:00
Campbell Barton
b8ce7d419e Cleanup: use PyErr_SetString when formatting isn't needed 2025-08-20 16:10:54 +10:00
Campbell Barton
9a1af169d9 Cleanup: use bool argument for object_cacheIgnoreClear 2025-08-20 16:10:54 +10:00
Aaron Carlisle
782adf8878 Docs: Update RNA to user manual URL mapping 2025-08-20 00:42:05 -04:00
Aaron Carlisle
2725dfe3d1 Tests: Fix RNA manual look up checks
- RNA Patterns Unknown to the Manual -- only print rna_ids that do not return a URL
- Undocumented Sections -- consider the case of types that do not have props (a lot of nodes were returning as false positives)
2025-08-19 22:31:24 -04:00
Campbell Barton
c45ee0eb98 Cleanup: quiet compiler warnings
Suppressing "null-pointer-subtraction" was needed for clang
but caused a warning with GCC.
2025-08-20 11:18:29 +10:00
Campbell Barton
3a8a379ea2 Cleanup: use camel-case/pascal-case for struct names 2025-08-20 11:01:13 +10:00
Campbell Barton
96a7b37652 Cleanup: spelling in comments (make check_spelling_*) 2025-08-20 10:45:51 +10:00
Campbell Barton
d741e7a21f Docs: mention why paths aren't checked on startup
Follow up to fix for #132460, slow startup from file file-system access
has been removed as it causes problems, then added back since it seems
like a fix if we assume all file-systems are local & online.

Note why this causes problems to prevent the checks being re-introduced.
2025-08-20 10:34:15 +10:00
Sean Kim
8723bd4f58 Cleanup: Change BKE_paint_brush_set to take in const reference
Changes the overload from accepting `const AssetWeakReference *` to
`const AssetWeakReference &` to more strongly indicate proper usage. We
should not have a usecase for setting a null `AssetWeakReference`

Pull Request: https://projects.blender.org/blender/blender/pulls/144821
2025-08-20 00:01:04 +02:00
Casey Bianco-Davis
f5952fd178 Fix: Grease Pencil: Pen Tool does not work with multiple layers
The problem was that `threading::parallel_for` will return a range containing multiple elements even though the grain size is `1`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144826
2025-08-19 22:54:28 +02:00
Sean Kim
6e82e403df Fix: Image Editor can have no default active brush
Prior to this commit, determining the default brush asset used for a
particular mode was based on the object's mode. This is slightly
incorrect for the Image Editor, since it may be in Paint Mode no matter
the underlying object type. To fix this, use the runtime `PaintMode`
enum for determining these default values instead of `eObjectType` and
store the `PaintMode` on `PaintRuntime` for easy access.

Additionally, inside the toolsystem, prevent accidentally unsetting
the default brush by checking for the presence of the asset when
loading an `AssetWeakReference`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144765
2025-08-19 22:44:24 +02:00
Brecht Van Lommel
c7e2368d6c Fix #144528: Cycles renders OpenVDB grids with rotation wrong
Pull Request: https://projects.blender.org/blender/blender/pulls/144825
2025-08-19 21:39:30 +02:00
Damien Picard
abf743c380 Keymap: Consistent hotkey for Jump to Previous/Next Keyframe
Use "Up Arrow" to jump to the next keyframe, and "Down Arrow" for the
previous keyframe, to be consistent within Blender and other software.

See PR for details.

Pull Request: https://projects.blender.org/blender/blender/pulls/140301
2025-08-19 21:08:57 +02:00
Brecht Van Lommel
28f93d5443 Fix #144569: Cycles NanoVDB rendering broken with oneAPI
Wrong assumption about packed_int3, and not caught because the assert was in
the wrong place.

Pull Request: https://projects.blender.org/blender/blender/pulls/144803
2025-08-19 18:41:53 +02:00
Brecht Van Lommel
b5606b5634 Fix #144599: Cycles OSL node with external script does not update
Some code got lost in the refactor for OSL cameras.

Pull Request: https://projects.blender.org/blender/blender/pulls/144808
2025-08-19 18:33:37 +02:00
Clément Foucault
869fc2cf4e GPU: Shader: Add Shared Variable in shader create info
This allows to control the type of data inside the create infos for
easy variation of the same shader.

Also this wraps the last global shader resource usage for the future
SRD.

Pull Request: https://projects.blender.org/blender/blender/pulls/144769
2025-08-19 18:27:49 +02:00
Damien Picard
ced8281c32 I18n: Allow translation of two formatted reports using dynamic types
Two formatted reports introduced in e239c7f43c used a type defined at
compile time using the PRId64 macro. Translation failed for these
messages, because the message was extracted as:

"No keyframes removed from % strip(s)"

and the type was lost at the time formatting happened.

This commit instead uses fmt to format the message, which deals with
using the proper int type depending on the platform.

Pull Request: https://projects.blender.org/blender/blender/pulls/144374
2025-08-19 18:16:18 +02:00
Bastien Montagne
59201ddc28 BPY props: Fix own mistake in recent refactor.
New code from 134d66201a was using uninitialized variable. Not sure how
I missed the compiler warning... :(
2025-08-19 17:49:46 +02:00
Bastien Montagne
134d66201a Cleanup: BPY prop: Move get/set... py callbacks into own scope.
Moving the python call itself into a dedicated sub-scope allows to
ensure local variables (arguments) do not risk leaking into the
rest of the code after being released.

Also use helper macro `PyTuple_SET_ITEMS`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144798
2025-08-19 17:16:31 +02:00
Hans Goudey
8b7a0b307b Cleanup: Make AttributeStorage method const 2025-08-19 10:23:13 -04:00
Omar Emara
fee17f40a2 Nodes: Lower main socket priority of menu sockets
This patch lowers the priority of menu sockets from the maximum priority
to the lowest priority. That's because menu sockets are nearly never the
main socket.

The current state is blocking the adoption of menu sockets in the
compositor, since most of the compositor nodes have color and float main
sockets, which currently have lower priority than menu sockets, making
node link insertion fail.

Pull Request: https://projects.blender.org/blender/blender/pulls/144779
2025-08-19 16:18:58 +02:00
Weizhen Huang
c672aa9ef4 Cleanup: Cycles: Check if background light is enabled in one place.
`world_use_portal` is not needed anymore, now that we always add world
as object (b20b4218d5).
We now check if background light is enabled only in
`test_enabled_lights()`, depending on the sample settings.

Pull Request: https://projects.blender.org/blender/blender/pulls/144710
2025-08-19 15:58:19 +02:00
Weizhen Huang
d866517708 Fix #144639: light missing update because it was disabled
the `light->is_enabled` check was only intended for background light,
for other light types we need to recompute the contribution at each
update.
2025-08-19 15:58:17 +02:00
Miguel Pozo
da7bcfc642 Fix #144441: EEVEE: Wrong projection matrix with Walk Navigation + Overscan
Disable overscan if we need to use the v3d winmat as-is.

Pull Request: https://projects.blender.org/blender/blender/pulls/144724
2025-08-19 15:12:54 +02:00
Weizhen Huang
83dcaf0501 Fix #144610: Cycles: do not convert open volume mesh to sdf
because we can't determine the interior. Sample densities in the whole
bounding box instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/144732
2025-08-19 13:26:11 +02:00