Commit Graph

154161 Commits

Author SHA1 Message Date
Nika Kutsniashvili
eca7056cfe UI: Remove paint curve theme colors, use gizmo colors instead
3D Viewport and Image Editor had theme colors for paint curve handle and pivot.
Paint curves are one of the stroke methods for brushes, and are generally not
widely used. To simplify theming it's best to remove those four properties and
use other shared colors instead.

We could use common curve colors for them, but they don't have point color
and handle point color is black, so we would need to add one more property
anyway and it would look bad as well.

Instead, use gizmo primary and secondary colors. Technically, paint curves
can be treated as gizmos, because they're interactive widgets in the viewport.

Pull Request: https://projects.blender.org/blender/blender/pulls/146777
2025-09-26 13:03:55 +02:00
Brecht Van Lommel
712c507519 Logging: Do not print Python API errors that will throw an exception
Python API functions would both report an error through CLOG and throw an
exception. However this is a problem when --debug-exit-on-error is used,
as tests and other scripts will not have the opportunity to catch the exception
before Blender exits.

Now don't print such reports through CLOG. Note that these usages of
BKE_reports_init have their print level set to error, so were already not
printing info and warning reports (which is not something we generally
want Python API calls to do, they should be silent).

Ref #146256

Pull Request: https://projects.blender.org/blender/blender/pulls/146801
2025-09-26 12:57:39 +02:00
Jeroen Bakker
8409f81f9f Workbench: Use strip curve rendering during rendertests
This PR enables strip curve drawing when performing the workbench
rendertests. On Intel/vulkan the lines are to far off. Using strip will
reduce platform differences. Downside is that (basic) line rendering is not
covered anymore by a render test.

Pull Request: https://projects.blender.org/blender/blender/pulls/146820
2025-09-26 12:38:47 +02:00
Sean Kim
6375b10039 Cleanup: Remove unnecessary conditional when restoring the mesh
The `SCULPT_BRUSH_TYPE_GRAB` and `SCULPT_BRUSH_TYPE_ELASTIC_DEFORM`
types are already handled above the removed lines, generically, without
checking for size pressure. This check of the if statement was
effectively always false as it would never be encountered.

Pull Request: https://projects.blender.org/blender/blender/pulls/146826
2025-09-26 12:24:30 +02:00
Weizhen Huang
2b0a1cae06 Cycles: Add an option to use ray marching for volume rendering
Null Scattering currently has performance and noise issues, and it will
take time to address them. For now add the previous Ray Marching back as
an option.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146317
2025-09-26 12:14:45 +02:00
Raiko
1aee66bfa4 Fix: Partially Fix #146759 by Adding Missing Library Include to Radial Tiling Node
Node code was missing and include directive.

Pull Request: https://projects.blender.org/blender/blender/pulls/146810
2025-09-26 11:59:57 +02:00
Brady Johnston
75c2dd5e3a Cleanup: Geometry Nodes: use node_geo_exec_with_missing_openvdb
Use `node_geo_exec_with_missing_openvdb` in final location for Grid Info.

Pull Request: https://projects.blender.org/blender/blender/pulls/146827
2025-09-26 11:50:22 +02:00
Julian Eisel
90f723bdd4 UI: Follow HIG for view item selecting/activating
Makes selecting/activating view items (tree and grid view items) behave
as wanted by the guidelines, consistent with many other editors:
https://developer.blender.org/docs/features/interface/human_interface_guidelines/selection/#select-tweaking

Noteworthy:
- View items activate on press again, not on release
- Pose library still only activates poses on click (releasing mouse
  before moving cursor), so dragging can be used to blend poses
- New: Clicking on empty space in a view deselects all
- Redundant activation in interface handlers code is removed

Pull Request: https://projects.blender.org/blender/blender/pulls/146569
2025-09-26 11:26:34 +02:00
Wayne Dixon
ebb843846d Fix: Camera marker selection logic in animation editors
Fix camera marker selection logic in the Dope Sheet (and other editors
that show camera markers).

It is now once again possible to select the camera that is bound to a
marker by CTRL-clicking the marker. SHIFT CTRL will extend this
selection.

(SHIFT+) click still (range-)selects the markers, but not the cameras
themselves. This hasn't changed.

Pull Request: https://projects.blender.org/blender/blender/pulls/145324
2025-09-26 11:25:45 +02:00
luz paz
e3fdc6e408 Cleanup: Fix typo in blender/blendthumb/src/thumbnail_provider.mm
Fixes user-facing typo

Pull Request: https://projects.blender.org/blender/blender/pulls/146765
2025-09-26 11:15:04 +02:00
Hans Goudey
ae56ac2cea UI: Nodes: Indicate packed status in node editor context path
Ref:
- e6a3328da7
- 4e4976804e
2025-09-26 11:11:22 +02:00
Jacques Lucke
4e4976804e Core: Add packed linked data-blocks
This adds support for packed linked data. This is a key part of an improved
asset workflow in Blender.

Packed IDs remain considered as linked data (i.e. they cannot be edited),
but they are stored in the current blendfile. This means that they:
* Are not lost in case the library data becomes unavailable.
* Are not changed in case the library data is updated.

These packed IDs are de-duplicated across blend-files, so e.g. if a shot
file and several of its dependencies all use the same util geometry node,
there will be a single copy of that geometry node in the shot file.

In case there are several versions of a same ID (e.g. linked at different
moments from a same library, which has been modified in-between), there
will be several packed IDs.

Name collisions are averted by storing these packed IDs into a new type of
'archive' libraries (and their namespaces). These libraries:
* Only contain packed IDs.
* Are owned and managed by their 'real' library data-block, called an
  'archive parent'.

For more in-depth, technical design: #132167
UI/UX design: #140870

Co-authored-by: Bastien Montagne <bastien@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133801
2025-09-26 10:53:40 +02:00
Jeroen Bakker
44194579a5 Cleanup: Silence compilation warning
This change silences a compilation warning on non windows/x64 systems.
2025-09-26 10:03:39 +02:00
Jeroen Bakker
be4a34d103 Refactor: Vulkan: Move memory allocator ownership to GHOST.
This PR moves the ownership of vulkan memory allocator from gpu/device
to GHOST/context/device. This will allow in the future a cleaner control
flow between OpenXR and Vulkan. Currently as the ownership is in the gpu
module many objects would need to pass from GHOST to the GPU module to be
shared between the 2 allocators. Moving both (OpenXR/Context) allocator
to GHOST would reduce the complexity.

Pull Request: https://projects.blender.org/blender/blender/pulls/146819
2025-09-26 09:34:48 +02:00
Omar Emara
73fcbaf7c4 VSE: Add Compositor modifier
This patch adds a new Compositor modifier that applies a compositing
node group on a sequencer strip. This patch also introduces the concept
of a compositor node tree space subtype, where we now have a Scene and a
Sequencer subtypes. Practically, this just means that node like the
Render Layers node will not be available in the node editor in the
Sequencer subtype.

Future improvements includes:

- The compositor context is recreated on every modifier application,
  while it should ideally be persistent somehow to make use of the
  compositor static cache. This might require work from the compositor
  side by moving the static cache outside of the context and make it
  thread safe if needed. See `Render.compositor` for an example on
  persistent context.
- GPU execution is not supported. This just needs a GPU context to be
  bound before execution, but the tricky part is getting a GPU context.
  See `render::Compositor::execute` for an example on bounding a GPU
  context and why it is less straight forward.
- Node inputs are not exposed on the sequencer modifier interface. An
  approach similar to Geometry Nodes modifier could be used, look at
  `update_input_properties_from_node_tree` for reference, but notice
  that Geometry Nodes naturally exempt the main Geometry socket because
  Geometry inputs can't be exposed, but for the compositor, we will have
  to exempt the main Color and Mask sockets manually. !145971

Co-authored-by: Aras Pranckevicius <aras@nesnausk.org>
Co-authored-by: Falk David <falk@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/139634
2025-09-26 08:40:42 +02:00
Campbell Barton
9c5fda87a5 Cleanup: use format specifier, full sentences 2025-09-26 05:10:23 +00:00
Campbell Barton
945590c1d9 Fix: un-escaped strings for node operators/UI
Correct error [0] constructing data paths without escaping.

[0]: 2a1a658492
2025-09-26 14:40:43 +10:00
Campbell Barton
b4fbc0c32d Cleanup: remove f-strings use, use double quotes, quiet pylint warnings 2025-09-26 14:31:05 +10:00
tariqsulley
0cf6c32ffd Fix #121129: Crash in bmesh.ops.create_uvsphere if U/V unspecified
Prevent zero U/V segments which caused a crash in
sin_cos_from_fraction from integer divide-by-zero.

Ref !146811
2025-09-26 13:45:14 +10:00
Pablo Vazquez
06b13c8fb4 UI: Splash: Adjust layout and add icons
Small layout and links adjustments to the splash screen.

- Extend list of templates to fit the new Storyboarding template.
- Extend the list of recent files by one row, so it matches templates.
- Add icons to templates.
- Rename `Donate` to `Donate to Blender`.
- Move donate link down so it's more prominent.
- Make separator visible.
- Add "Get Involved" link.
- Remove "Tutorials" link. The Support link already provides help, and
it's been a while since we no longer promote tutorials on blender.org.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/146730
2025-09-26 00:45:10 +02:00
Brecht Van Lommel
e91c8300a6 OpenEXR: Write colorspace metadata for multilayer EXR
Previously it was only working for the single layer case. For multipart
we write the colorspace in each part. For single part we write the first
non-data colorspace, and hope data passes will be identified based on channel
name like Blender does (e.g. XYZ instead of RGB).

Reading is unchanged and still the same as before, in that it only reads the
colorspace from the first part. There is only one color space per image
datablock, so we can not store anything more currently. In practice it
would be unusual for all passes in a file not to either have the same
colorspace or be data.

All the compositor file output test images were updated to include the
metadata, so that the test will check if the metadata is there.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146809
2025-09-25 23:27:14 +02:00
Brecht Van Lommel
be1619f4ad OpenEXR: Multi-part writing
New "Interleave" option in image format settings, enabled by default in old
files and disabled by default in new files to write multi-part files.

By not storing all channels interleaved, it is possible for other applications
to load individual passes more efficiently. This might also work better with
compression.

We follow the OpenEXR docs in that the channel name is the full
Layer.Pass.Channel rather than just Channel. Some other renderers
(e.g. Houdini Karma) write just the channel and that is what our reading
code assumed so far.

I've verified that Nuke can read the multipart EXR files produced by Blender,
including multiview and cryptomatte.

Fix #123727

Pull Request: https://projects.blender.org/blender/blender/pulls/146650
2025-09-25 22:58:11 +02:00
Brecht Van Lommel
9851e34c71 Refactor: OpenEXR: Simplify multi layer read and write implementation
* Read directly into ExrChannel, eliminate intermediate MultiViewChannelName
* Pass multiple channels to EXR writer together in IMB_exr_add_channels
* Avoid various channel name parsing by passing components separately
* Simplify logic for writing multichannel and multiview metadata
* Remove unused global EXR handle storage
* No longer use void pointer for EXR handle.
* Use blender::Vector and std::string.
* Slightly reshuffle code so multipart support will have smaller diff.
* Add various comments.

Pull Request: https://projects.blender.org/blender/blender/pulls/146650
2025-09-25 22:58:09 +02:00
Brecht Van Lommel
662dc95a50 OpenEXR: Support reading multipart files with full channel names
The reading code currently assumes that the part name may be for example
"ViewLayer.Combined" and then the channel within the part may be "R". For
example Houdini writes files like this.

However according to the docs the part name should be ignored and the
channel name in each part should be complete like "ViewLayer.Combined.R".
https://openexr.com/en/latest/MultiViewOpenEXR.html

To support both cases we now only prepend the part name if it's not already
there.

Pull Request: https://projects.blender.org/blender/blender/pulls/146650
2025-09-25 22:57:59 +02:00
Pavel Ševeček
08d95785c5 Alembic: Support import of additional point cloud attribute types
Adds support for importing arbitrary 32-bit float properties on Alembic
point clouds.

This includes the following Alembic property types (with their imported
Geometry Nodes attribute types):
 - `IFloatArrayProperty` -> `Float`
 - `IV2fArrayProperty` -> `2D Vector`
 - `IV3fArrayProperty`, `IN3fArrayProperty` -> `Vector`
 - `IC3fArrayProperty` -> `Color`

See PR for further details.

Co-authored-by: pavel <sevecek@sirrah.troja.mff.cuni.cz>
Pull Request: https://projects.blender.org/blender/blender/pulls/145946
2025-09-25 21:21:19 +02:00
Bastien Montagne
fbf3b46530 Fix (harmless) mistake in enabling blendfile compression commit.
Commit 00dbb53131 was wrongly setting the blendfile compression
flag on the default values for the `bUserAssetLibrary` data.
2025-09-25 20:31:18 +02:00
Clément Foucault
aebf5fa5e4 Fix #145993: Edit Mesh: Can't select behind wire objects with retopology
This was a logic mistake in #134940.

Candidate for backporting to 4.5 LTS.

Pull Request: https://projects.blender.org/blender/blender/pulls/146766
2025-09-25 19:07:25 +02:00
Hans Goudey
4ba47d6df1 Fix: Build error in lite builds after recent commit
Missing WITH_OPENVDB check
2025-09-25 18:34:30 +02:00
Brecht Van Lommel
78ae7ec392 Render: Rename render passes for clarity
In very old OpenEXR version there was a limit on the channel names, which meant
the pass names needed to be short like "DiffDir". Change them to be longer like
"Diffuse Direct".

* This breaks forward compatibility. Old Blender version will lose links when
  reading compositing node setups with such passes, but #146571 will fix it
  for 4.5 LTS.
* Add-ons, scripts and compositing setups in other applications that rely on these
  names will also break.
* The find_by_type function for render passes has also been removed, as this was
  already deprecated and replaced by find_by_name.
* We assume spaces in the name are ok, since we have passes with them already
  and have not seen reports about compatibility issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/142731
2025-09-25 18:04:14 +02:00
Bastien Montagne
00dbb53131 UserPreferences: Enable Blendfile Compression By Default.
IMPORTANT: This will force-enable this option in user preferences, as
part of the 5.0 versioning process. Users that do want to keep saving
uncompressed blendfiles will have to edit their user preferences
accordingly, and re-save them.

This commit does _not_ change the setting for an existing blendfile:
uncompressed blendfiles will keep being saved as uncompressed.

Implements #135735.

Pull Request: https://projects.blender.org/blender/blender/pulls/146172
2025-09-25 17:57:31 +02:00
Brecht Van Lommel
57342a51f8 Fix: Cycles: Ubsan warnings with new voronoi texture hashing
Signed integer overflow is undefined, but works reliably enough for us
anyway, so just silence it like the Blender implementation already does.

This also caused some tests like cycles_displacement_cpu to run much slower
(3s -> 42s) due to the overhead of detecting and ignoring repeated warnings.

Pull Request: https://projects.blender.org/blender/blender/pulls/146783
2025-09-25 17:48:22 +02:00
Pablo Vazquez
b74e696acc UI: Theme: Add Curve widget theme settings
Add theme settings for the Curve and CurveProfile widgets.

Even though the curve widget is used all over Blender, it never had its
own theme settings. It was using a mix of colors from the “regular”
toggle widget with text colors inherited from the editor.

Thanks to the recent cleanup and removal of so many redundant theme
options, we can now add new/missing settings without overwhelming
the theme.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/146274
2025-09-25 17:44:33 +02:00
Brady Johnston
79c1198770 Fix: Geometry Nodes: Properly expose supported grid socket types
The Grid Info node was not exposing the other supported socket types
(`Integer` and `Boolean`). The other Sample Grid, Sample Grid Index and
Get Named Grid nodes were updated to use the same enum filtering as the
Grid Info node and ensured tooltips were consistent.

Pull Request: https://projects.blender.org/blender/blender/pulls/146785
2025-09-25 17:25:10 +02:00
Jeroen Bakker
8111fe2369 Fix #146655: GPU: Call of deprecated function
There are deprecation usages in the gpu presets and custom
shapes python module. This PR uses the correct calls to remove the
deprecation warnings.

Pull Request: https://projects.blender.org/blender/blender/pulls/146746
2025-09-25 17:22:35 +02:00
Hans Goudey
5ccbfbb4bc Geometry Nodes: Support grid inputs to viewer node
Display the grid in the 3D viewport (internally just create a volume
geometry so this case doesn't spread into any rendering code), and add
very basic data in the spreadsheet for the grid. I had to store the geometry
in the viewer node log as a cache so the lifetime of the temporary volume
grid was long enough.

Pull Request: https://projects.blender.org/blender/blender/pulls/146780
2025-09-25 16:51:31 +02:00
Brecht Van Lommel
689f182792 Cycles: Make adaptive subdivision a non-experimental feature
* Add adaptive subdivision properties natively on the subdivision surface
  modifier, so that other engines may reuse them in the future. This also
  resolve issues where they would not get copied properly.
* Remove "Feature Set" option in the render properties, this was the last
  experimental one.
* Add space choice between "Pixel" and "Object". The latter is new and can
  be used for object space dicing that works with instances. Instead of
  a pixel size an object space edge length is specified.
* Add object space subdivision test.

Ref #53901

Pull Request: https://projects.blender.org/blender/blender/pulls/146723
2025-09-25 16:18:50 +02:00
quackarooni
2a1a658492 Nodes: Swap Node Operator
Implement a native method to swap between different node and zone types.

This implementation repurposes the existing menu definitions as base
classes, from which both an "Add" and a "Swap" version would be generated
from. This allows both menus to have the same layout, but use their own
operators for handling the different node/zone types.

In this PR, support for all node editors has been implemented.

Invoking the menu is currently bound to `Shift + S`, same as the old
implementation in Node Wrangler. Since "Swap" is implemented as a
regular menu, features that menus already have such as type-to-search
and adding to Quick Favorites don't require any extra caveats to
consider.

Resolves #133452

Pull Request: https://projects.blender.org/blender/blender/pulls/143997
2025-09-25 16:12:02 +02:00
Hans Goudey
fc4fc2d16c Geometry Nodes: Make displaying "Manage" panel optional
Often displaying the "Manage" panel is not very useful, or at least it
isn't worth taking up the screen real-estate. This commit adds an option
for showing the panel in the modifier, and adds an option to the node
group which is used to initialize the modifier option when creating a
modifier for a node group asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/146775
2025-09-25 16:00:07 +02:00
vbeckham
901835a2c7 Fix: Failure to pass the full PATH to Blender ctests on Windows
Due to this bug only the first item in the current PATH on the system
is used when running Blender.

The PATH is appended to a string type variable, which is then used as
one element of a list in build_files\cmake\testing.cmake line 24. Since
in cmake the semicolon is a list element delimiter, we need to escape
all the semicolons in our PATH string if we want to use the variable as
a single entry in the list.

Pull Request: https://projects.blender.org/blender/blender/pulls/146770
2025-09-25 15:27:33 +02:00
Brecht Van Lommel
fd9edf5b89 Color Management: Support for HDR PNG read and write
### Color Management: Support image CICP read/write

The CICP support will enable reading and writing HDR PNGs, following
the recently released PNG spec:
https://www.w3.org/TR/png-3/#cICP-chunk

More useful for exporting to the web with reasonable file size would
be AVIF support, but that will have to wait for the next library update
in Blender 5.1 to add libheif.

Note this will only starting working once the 5.0 libraries have landed,
which should happen somewhere in the next week.

Pull Request: https://projects.blender.org/blender/blender/pulls/145612
2025-09-25 15:16:11 +02:00
Brecht Van Lommel
488ff26d35 Tests: Update multilayer image tests for 5.0 changes
The frame number is no longer included on F12.

Pull Request: https://projects.blender.org/blender/blender/pulls/146725
2025-09-25 15:08:30 +02:00
Brecht Van Lommel
ab644f2ecb Tests: Compare all subimages in compositor file output tests
For multilayer files it was only comparing the first pass, so any issues
with other passes would be missed.

Also don't clear the filename for multilayer file output nodes, as that
doesn't work when there are multiple such nodes all writing to the same
file name. This will be used in an upcoming EXR multipart writing test.

Ref #146650

Pull Request: https://projects.blender.org/blender/blender/pulls/146726
2025-09-25 15:02:13 +02:00
Brecht Van Lommel
59eebc8654 Color Management: Add "Working Space" as a color space choice in the enum
And make it the default in the compositing Convert Color Space node. This is
useful to create compositing nodes that give the same result regardless of
the working space, particularly for node group assets. For example you might
convert from the working space to a log space, do some color correction
operations and convert back.

I'm less certain about including this also for images. I can imagine use
cases for that too, for example with an Image node in the compositor that is
known to read back the EXR sequence written from the current scene. But it's
a bit more obscure and there is some potential for using this when it's not
appropriate. Still there is nothing that automatically selects it, so it seems
fine.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146598
2025-09-25 15:00:02 +02:00
Damien Picard
da92614fd2 Fix: Node Wrangler: Error in Merge Nodes when only one node selected
Running Node Wrangler's Merge Nodes operator on only one node
resulted in an error. It was introduced in commit db39daf9e7.

That commit assumed that `l[len(l)-2]` and `l[-2]` were the same, but
they are not when `len(l) == 1`. In that case, the former is valid but
the latter is not.

This commit fixes the error by checking how many nodes are selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/146361
2025-09-25 14:52:47 +02:00
Brady Johnston
e869ae360c Nodes: Reroute becomes active if singular
When using Shift + RMB drag to create a reroute, the newly created
reroute does not become active. If you then rename it will rename the
previously active node.

This PR sets the newly created reroute to be active if only one is
created. If more than one is created the order is not well defined
and also unclear whether it would be first or last to become active.

Pull Request: https://projects.blender.org/blender/blender/pulls/146774
2025-09-25 14:47:50 +02:00
Nika Kutsniashvili
28b97afda2 UI: Theme: Generalize geometry attribute properties
This PR generalizes properties for geometry (currently mesh only) attributes
found in 3D Viewport theme, namely:

- Combine "Edge Bevel" and "Vertex Bevel" into one "Bevel" property.
- Combine "Freestyle Edge Mark" and "Freestyle Face Mark" into one "Freestyle" property.
- Remove word "Edge" from Crease, Sharp, and Seam properties, to match others.
- Group all of the above together in the UI.

This is a breaking change (that will be handled with others in migration),
but doesn't introduce any visual changes in the default theme (and almost any theme).

Pull Request: https://projects.blender.org/blender/blender/pulls/146732
2025-09-25 14:02:46 +02:00
Jeroen Bakker
1a0a35ac93 Fix #146559: Vulkan: Wide lines not working in custom PyGPU shaders
For wide line rendering it is preferred to use polyline shaders. However
creating a custom shader is complicated and a stone to far for many
scriptors.

This PR allows using line_width_set when wide line rendering is
supported by the platform.

Pull Request: https://projects.blender.org/blender/blender/pulls/146762
2025-09-25 14:02:11 +02:00
Brecht Van Lommel
ca2a13991e Color Management: Reduce reliance on untonemapped view
No longer use it for display of images without View as Render, color swatches
and color picker, and 3D viewport in solid mode. Instead go directly to extended
sRGB matching the system graphics buffer.

We still use it for setting the image colorspace after Save as Render, and for
color value inspection in the image editor and tooltips.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146487
2025-09-25 13:50:20 +02:00
Brecht Van Lommel
d290ff16c8 Color Management: Simplify image format initialization
No need to have a not for render case, these settings are only used when
Save as Render or Override are on and in that case it make sense to match
the default render view transform.

Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146487
2025-09-25 13:50:20 +02:00
Brecht Van Lommel
059a3f3568 Color Management: Log added displays, views and color spaces
Ref #144911

Pull Request: https://projects.blender.org/blender/blender/pulls/146487
2025-09-25 13:50:20 +02:00