Commit Graph

152363 Commits

Author SHA1 Message Date
Jonas Holzman
08e5f315dd Build: Ignore old macOS x64 submodule directory
Prevent accidental staging of this directory on macOS x64 machines due
to the recent removal of the submodule.

Pull Request: https://projects.blender.org/blender/blender/pulls/143132
2025-07-25 11:28:20 +02:00
Omar Emara
92d5c2078e Render: Add Media Type option
This patch adds a new Media Type option to image format settings, which
is used in the Render Output panel, File Output node, and Image Saving
operation. The option does not provide any new functionality, but
improves the UX of selecting file types by categorizing the existing file
type option into:

- Image.
- Multi-Layer EXR.
- Video.

Each option would then list only the file types that fit that media
type. For Multi-Layer and Video, the file type option is no longer drawn
for now since only one option exist for now, OpenEXR Multi-Layer and
FFMPEG respectively. This also improves the experience by not listing
technical terms like FFMPEG in the UI, but rather use "Video" instead.

The original motivation for introducing this option is the recent
redesign of the File Output node. The problem is that the distinction
between images and multi-layers images is not at all clear, while the
behavior of the node changes quite a bit when multi-layer is chosen.
While now with the new option, the distinction is quite clear.

Implementation-wise, the new option is mostly a UI layer that controls
the available enum items for the file format and callbacks to set a
default format if the existing format doesn't match the media type.
However, core code is unaffected and still transparently reads the image
format only.

Pull Request: https://projects.blender.org/blender/blender/pulls/142955
2025-07-25 11:15:28 +02:00
Mohamed Hassan
c1f52b8e91 Compositor: Improve Fog Glow glare realism
This patch improves the realism of the Fog Glow mode of the Glare node
based on the Photopic model described in:

  Physically-Based Glare Effects for Digital Images" by G. Spencer, P.
  Shirley, K. Zimmerman, and D. P. Greenberg.

This is a breaking change that can't be versioned, but it is worth it
for the superior realism of the new model.

Pull Request: https://projects.blender.org/blender/blender/pulls/140646
2025-07-25 10:09:32 +02:00
tariqsulley
f4b5cbd31b Fix #135908: Extrude Individual Faces "Offset Even" does nothing
Logically a NOP for individual faces, hide the property.

Ref !136275
2025-07-25 16:43:01 +10:00
tariqsulley
9dae336482 Fix #140548: Shift to extend fails in the "Hide Other Collection" menu
Use the invoke operator context so the event is passed to the operator.

Ref !141817
2025-07-25 16:32:49 +10:00
YimingWu
2def8c8b67 Fix #120885: Ensure EXR view_format selection in stereo
When stereoscopy is enabled, OpenEXR and OpenEXR Multilayer supports
different stereoscopy view format, ensure the view format selection
when selecting the output file format, so the value is always valid
when saving the image.

Pull Request: https://projects.blender.org/blender/blender/pulls/120904
2025-07-25 08:26:31 +02:00
Mohamed Hassan
2927388682 Compositor: Add Glare Sun Beams gizmos
Add gizmo for the Sun Beams mode in the Glare node.

Pull Request: https://projects.blender.org/blender/blender/pulls/142685
2025-07-25 08:05:08 +02:00
Campbell Barton
19b59ccaab Fix #143161: Armature select crashes with over 65k objects
Add null check to resolve crash when a "base" can't be retrieved
from the GPU selection index.
2025-07-25 15:58:32 +10:00
Omar Emara
b92b47f628 Refactor: Reduce compositor context pure virtual methods
The compositor context has a number of pure virtual methods that could
be optional or removed altogether, so this patch refactors that by
reducing unnecessary pure virtual methods.

Pull Request: https://projects.blender.org/blender/blender/pulls/143091
2025-07-25 07:50:52 +02:00
Aaron Carlisle
3e63312823 UI: Rename "HDRI Preview Size" to "Reference Spheres Size"
This is a follow up to 8404228aeb
2025-07-24 20:48:03 -04:00
John Kiril Swenson
8c744aa1d5 Fix: VSE: Cannot ignore connected strips' handles with alt if already selected
PR #139075 introduced a regression where holding alt to move strip
handles without other connected strips would not work if the handle was
already selected. Fix by only copying handles to selected strips if alt
is not held.

This also builds on #142916, using `find_neighboring_strip` to simplify
logic and consider other cases too. We now avoid copying handles if it
would interfere with *any* dual handle point, not just those present in
the selection.

Pull Request: https://projects.blender.org/blender/blender/pulls/143149
2025-07-25 02:36:57 +02:00
Harley Acheson
89e5129741 UI: Changes to the Platform Support Warning Message
Some small tweaks to the messagebox shown when users have graphics
hardware or driver that might not work.  The phrase "Your graphics card
or driver has limited support" changed to "Your graphics card or driver
version has limited support" to better indicate the driver has
versioning. "Newer graphics drivers may be available to improve Blender
support." changed to "Newer graphics drivers might be available with
better Blender compatibility." The message saying "Blender will now
close" only shown if Blender will close.

Pull Request: https://projects.blender.org/blender/blender/pulls/142999
2025-07-24 22:44:08 +02:00
Sean Kim
7bab7155ad Fix #142151: Scrape brush 'Plane Offset' not versioned correctly
The general Plane brush is a replacement for the Flatten, Fill, and
Scrape brushes that formerly existed. When the old brush types were
converted to the new type, the 'Plane Offset' usecase was missed due to
the field not being used for the bundled essential brushes.

To preserve brush behavior across 4.4 and 4.5, Scrape brushes with a
given 'Plane Offset' need to have this signed distance inverted.

Unfortunately, as this was discovered after 4.5 was officially released,
and the versioning having no clear indicators that can be used to fix
this with a subsequent version bump, this commit cannot address users
who have already started using 4.5. The best we can do in this case is
fix the incorrect versioning and make a note of the issue in the release
notes so that future users will not continue to experience this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/143020
2025-07-24 21:59:38 +02:00
Alaska
121e9464f5 Fix: Weekly report error when a user has a commit to a parent repo
With the recent Gitea update, parent repos (E.g. `blender/blender`) do
not have "parents" listed in the information gathered by API anymore.

This has lead to the weekly report script encountering errors if the
user has committed directly to a parent repo. This commit fixes that.

Pull Request: https://projects.blender.org/blender/blender/pulls/142701
2025-07-24 21:59:09 +02:00
Sean Kim
ab09dec8fb Fix #142186: Mask Filter smoothing produces artifacts
When we perform the Smooth operation in the Mask filter, we have
historically only applied a raw average of the neighbor values. This can
lead to artifacts in the mesh due to the topology of the affected
vertices.

To ensure a smoother transition at the boundary of the mask, this commit
applies a linear blending between the old and new values.

Pull Request: https://projects.blender.org/blender/blender/pulls/142793
2025-07-24 21:56:25 +02:00
Aras Pranckevicius
bedf19f1ca Cleanup: No longer require VSE Strip struct memory layout to never change
Previously code that was reading Strip data assumed that seqbasep
and channels members would stay at fixed offsets within a struct,
forever into the future. Fix this by inferring their offsets from
the file SDNA data where needed.

Actual Strip DNA layout is not changed in this commit yet.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/142940
2025-07-24 20:37:16 +02:00
Harley Acheson
d6573097eb UI: ARM Win GL Qualcomm driver Error Message Change
When using GPU_DEVICE_QUALCOMM video drivers on Win32 with OpenGL (just
ARM) if the driver is too old a console message says that the driver is
not capable of running "Blender 4.0". This PR just adds "or later".

Pull Request: https://projects.blender.org/blender/blender/pulls/143108
2025-07-24 20:26:26 +02:00
John Kiril Swenson
28ff392b19 Fix: VSE: Copy to selected would interfere with dual handles
After #139075, since dual handle translation always selects two strips
at a time, any later handle movement on one of the strips would affect
both, which is unintuitive and likely not what the user intended.

We can fix this for now by checking for strips that directly border one
another and removing them from the `copy_to` list.

But in the future, if we change selection logic so that strip and handle
selection states are mutually incompatible, we could also fix this by
making sure that dual handle tweaking only selects the handles and not
the strips themselves.

Pull Request: https://projects.blender.org/blender/blender/pulls/142916
2025-07-24 20:12:03 +02:00
Clément Foucault
1611dc2fb3 GPU: Rever mass renaming removing GPUTexture type from python
This was accidentaly commited in 32d64d35bb
2025-07-24 18:19:59 +02:00
Brecht Van Lommel
47f9b7a98e Fix #142022: Cycles undisplaced normal not available
Previously with adaptive subdivision this happened to work with the N
attribute, but that was not meant to be undisplaced. This adds a new
undisplaced_N attribute specifically for this purpose.

For backwards compatibility in Blender 4.5, this also keeps N undisplaced.
But that will be changed in 5.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/142090
2025-07-24 18:16:25 +02:00
Sean Kim
97a5e2ea1b Fix #142963: Crash when using Texture Paint sample color
Introduced in d0b749beb8

Pull Request: https://projects.blender.org/blender/blender/pulls/143015
2025-07-24 16:35:05 +02:00
Germano Cavalcante
cb51fc5471 Fix #141741: Combed particles are affected by occlusion of other particles
Caused by 7688677e29, which replaced `DRW_draw_depth_object` with
`DRW_draw_depth_loop`.

`DRW_draw_depth_object` simply rendered the object without actually
using the DRW manager capabilities.

Now, with `DRW_draw_depth_loop`, the depth is rendered based on what
the engine sees with overlays disabled, which doesn't hide the
particles.

The solution to this issue is to skip particle rendering in the overlay
engine in `DRW_draw_depth_loop`.

Co-authored-by: Miguel Pozo <pragma37@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/141981
2025-07-24 16:24:19 +02:00
Hans Goudey
4f372d64d4 Geometry Nodes: Initial very basic list support
This includes a new list structure type and socket shape, a node
to create lists, a node to retrieve values from lists, and a node to
retrieve the length of lists. It also implements multi-function support
so that function nodes work on lists.

There are three nodes included in this PR.
- **List** Creates a list of elements with a given size. The values
  are computed with a field that can use the index as an input.
- **Get List Item** A field node that retrieves an element from a
  a list at a given index. The index input is dynamic, so if the input
  is a list, the output will be a list too.
- **List Length** Just gives the length of a list.

When a function node is used with multiple list inputs, the shorter
lists are repeated to extend it to the length of the longest.

The list nodes and structure type are hidden behind an experimental
feature until we can be sure they're useful for an actual use case.

Pull Request: https://projects.blender.org/blender/blender/pulls/140679
2025-07-24 16:16:40 +02:00
Brecht Van Lommel
ba46217b51 Fix: GPU shader error logging doesn't show shader name or stage
This was relying on the souce file and line printing which is now disabled
by default. Also log the shader source without indent for readability.

Pull Request: https://projects.blender.org/blender/blender/pulls/142882
2025-07-24 16:10:19 +02:00
Hans Goudey
9c9695b103 Refactor: Move ReportList definition from DNA to blenkernel
Ever since [0], ReportList is not actually used in any DNA structs.
That makes sense, since reports are conceptually only necessary
at runtime. Move the definition of the struct to BKE_report.hh, and
fix a bunch of include errors where types were previously available
transitively. Besides adding some clarity, theoretically this change
could reduce compile times because of less header parsing.

[0]: 1bf6d8b0b9

Pull Request: https://projects.blender.org/blender/blender/pulls/138872
2025-07-24 15:59:52 +02:00
Hans Goudey
623d3c04e2 Fix: Set Mesh Normal "Tangent" mode fails with free normals
If free normals already exist, the `custom_normal` attribute already
exists with a different type, so the attribute writer is not created
properly in `mesh_set_custom_normals` and the process fails. Instead,
setting tangent space custom normals should clear existing free normals.

Pull Request: https://projects.blender.org/blender/blender/pulls/142961
2025-07-24 15:50:40 +02:00
Brecht Van Lommel
264669fc03 Fix #142953: Cycles renders world lightgroup wrong
Pull Request: https://projects.blender.org/blender/blender/pulls/143003
2025-07-24 15:24:03 +02:00
Campbell Barton
9a6d95600d Cleanup: use define for action group name size 2025-07-24 22:18:15 +10:00
Campbell Barton
9b05a00b50 Cleanup: use UTF8 string copy for bActionGroup::name
Avoid potential incomplete UTF8 byte sequences.
2025-07-24 22:18:15 +10:00
Campbell Barton
bc69b25382 Cleanup: use UNLIKELY(..) for integer overflow checks 2025-07-24 22:18:15 +10:00
Campbell Barton
21d431d214 Cleanup: minor clarifications for View2D struct members
Avoid including multiple members in one doc-string.
2025-07-24 22:18:14 +10:00
Clément Foucault
475b20fc5d Refactor: GPU: Use macros for TextureFormat conversions
This reduces the risk of errors and code duplication.

Rel #130632

Pull Request: https://projects.blender.org/blender/blender/pulls/142898
2025-07-24 13:56:41 +02:00
Jesse Yurkovich
e739f99468 Fix #110334: int overflow in rna_iterator_array_begin
The calculation for `endptr` would overflow when multiplying `length`
and `itemsize`. A similar issue was spotted for `rna_array_lookup_int`.

Ref !141061
2025-07-24 21:46:14 +10:00
Omar Emara
e34e6373b6 Compositor: Replace Composite node with Group Output node
This patch replaces the Composite node with the Group Output node as the
primary compositor output. The old node was removed and versioned. This
was done for consistency with Geometry Nodes and in preparation for more
generic use of the compositor in VSE modifiers, layered compositing, NPR
multi-stage compositing, and more.

The Group Output node relies on the node tree interface, so we now have
a default interface of a single input and a single output. For now, only
the first input is considered while the rest are ignored, just like the
Geometry Nodes design. Furthermore, the input is required to be of type
color. Warnings and errors are issues if any of those are not met, also
similar to Geometry Nodes.

This introduces a new limitation: Composite outputs can no longer exist
in node groups, since they obviously then act as their respective group
outputs.

A refactor for the compositor scheduler is needed to simplify the logic
after this change, but this will be done in a separate patch.

Pull Request: https://projects.blender.org/blender/blender/pulls/142232
2025-07-24 13:41:56 +02:00
Jonas Holzman
d95c2bc406 GHOST: Rename Metal Context from ContextCGL to ContextMTL
This commit renames the GHOST Metal graphic context class and related
files / references from `GHOST_ContextCGL` to `GHOST_ContextMTL`. When
the Metal backend was first introduced, this context file contained
both the old OpenGL context (CGL, for macOS Core OpenGL API), and the
newer Metal context. Since #110185 all CGL related code was removed
from the class, making it Metal only, and thus rendering the old class
name outdated and potentially misleading. In addition to the rename,
unused OpenGL related forward declarations and old TODOs were also
removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/142519
2025-07-24 13:28:44 +02:00
Michael Jones
f3485cc925 Cycles: MetalRT: Only use extended limits if needed (revisited)
Currently MetalRT renders always use extended limits, which is needed to correctly render scenes where the max primitive count can exceed 2^28 or the instance count can exceed 2^24. This patch adopts Metal best practices of only enabling this flag if it is needed.

This PR is similar to #133364, but there are some notable differences:

1) The old PR made an overly optimistic assumption that all the relevant visibility bits could be squeezed into 8 bits. This new PR adopts the same approach that Optix takes of using 8 bits as a primary HW filter, and checking the full 32 bit mask inside the SW intersection handler.

~~2) I moved the scene scanning check from Scene into MetalDevice. This avoids platform specific details leaking into platform agnostic areas.~~

~~3) In live viewport mode, we always use extended limits in case we tip over the threshold.~~

_EDIT:_
2) The limits are scanned in `Scene::update_kernel_features`, and given to the device by a new `set_bvh_limits` method which returns true if the BVH and kernels need to be reloaded.

Pull Request: https://projects.blender.org/blender/blender/pulls/142401
2025-07-24 13:27:20 +02:00
Omar Emara
dffb8366e0 Fix #142954: Crash when opening file with undefined Translate node
Blender crashes when opening a file with undefined Translate nodes due
to a missing storage. The crash happens during versioning, as the nodes
are not yet undefined at this point. To fix this, we make the versioning
code more corruption proof and skip versioning nodes with no storage.

Pull Request: https://projects.blender.org/blender/blender/pulls/143055
2025-07-24 12:53:55 +02:00
Thomas Dinges
e85de7a26b Builds: Remove macos_x64 submodule from git 2025-07-24 12:52:05 +02:00
Clément Foucault
b6076e4d80 GPU: Add procedural drawcall in gpu::Batch
This allows to store a number of vertex to draw
per batch without specifying any attribute.

This allows to create batches that are empty but
still holds the amount of geometry to produce.

Needed for new curve drawing #142969.

Pull Request: https://projects.blender.org/blender/blender/pulls/143052
2025-07-24 12:27:10 +02:00
Christoph Lendenfeld
614b6508d4 Anim: Add copy to selected for shapekeys
This adds copy to selected support for Shape Keys.
That means Alt+drag on a property influences all selected.
Also the copy to selected operator is now available in the context menu.

Part of #136838

Pull Request: https://projects.blender.org/blender/blender/pulls/138611
2025-07-24 12:20:10 +02:00
Clément Foucault
50e876f21d EEVEE: Add correct volumetric support for point clouds
Since 4.5 the point clouds are out of experimental.

The drawing of pointcloud did not allow for correct volume
estimation as the shape are not rendered as closed objects
(i.e. the backfaces were not rendered).

This patch renders the backfaces for the volume occupancy
pass by rendering the pointcloud twice and flipping the
shape alignment matrix. This reverse the winding and
does a backface hit as it would do for a sphere primitive.

This solution even if not perfect avoids adding more
geometry in the Index Buffer. The geometry approach might
be preferable in the future if we find a way to render
the spheres without an IBO or with a JIT generated IBO.

Rel  #141490

Pull Request: https://projects.blender.org/blender/blender/pulls/142095
2025-07-24 12:05:29 +02:00
Clément Foucault
34e176d255 Fix #138191: EEVEE: Bump is incorrect with pixel size greater than 1x
This was caused by the hardware derivatives output being affected
by render resolution. Scaling them back to the full resolution
value fixes the issue.

This also fixes the Wireframe node that also relies on derivatives.

Pull Request: https://projects.blender.org/blender/blender/pulls/142101
2025-07-24 12:04:15 +02:00
Omar Emara
b0db491f24 Fix: Crash when versioning Translate node
Blender crashes when versioning the Translate node due to a nullptr
storage. This happens due to an inverted nullptr check.

Additionally, we remove redundant assignments from other versioning code
for safety.

Pull Request: https://projects.blender.org/blender/blender/pulls/143046
2025-07-24 11:56:07 +02:00
Habib Gahbiche
25d4ac38b1 Tests: Compositor: add UI test case for undo
Support the compositor in UI tests and add an undo test case involving
a compositing node tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/140595
2025-07-24 11:41:46 +02:00
Philipp Oeser
c1df8404e7 Fix #142839: Asset Browser: Copy to Selected on MetaData broken
It was not taking into account actual selection in the asset browser
("selected_assets"), thus failing in bringing things over.
To resolve, add a case for `RNA_AssetMetaData` in
`UI_context_copy_to_selected_list`.
Since "selected_assets" will give us `AssetRepresentation`, we need to
remap to `AssetMetaData` to get this working.

Pull Request: https://projects.blender.org/blender/blender/pulls/142862
2025-07-24 11:32:16 +02:00
Jacques Lucke
70b956ba53 Fix: Nodes: memory leak in extra info tooltips
The issue was that the tooltip function arguments were sometimes allocated but
not freed. The solution is to handle the lifetime of the argument better. The
code now makes a copy of the argument when it's passed to a layout function. In
an idea world, one could just use something like `std::function` instead of
manual memory management, but the API does not support it yet.

This was caused by f3a1d8fad5.

Pull Request: https://projects.blender.org/blender/blender/pulls/143043
2025-07-24 10:35:47 +02:00
Campbell Barton
0442a9fe0a Extensions: clarify the identifiers must "Python" id's in the error
Without this, it's not clear what a "valid identifier" means,
ref: #136517.
2025-07-24 18:29:36 +10:00
Brady Johnston
6f2988f0af Nodes: support interface items lookup by Identifier
Currently, the `NodeTreeInterface` only allows lookup via the item names, and not
their identifiers. This is problematic when there are multiple items with the
same name, they can only be selected via index and not name / identifier.

The following examples are done on a default Geometry Nodes tree that just has a
`Geometry` input and `Geometry` output.

Pull Request: https://projects.blender.org/blender/blender/pulls/140196
2025-07-24 10:25:35 +02:00
Jacques Lucke
6ca5c0fa92 Fix #142290: crash pasting linked ID in its source library
The core issue here seems to be that the pasted object is turned into an Empty
but it still has all the modifiers. Later when the object is copied by the
depsgraph, the modifiers are not copied along, confusing some code.

Right now, this patch is rather defensive, so it solves the specific crash and
maybe similar cases that could come up in the future. One could separately also
clear all modifiers when turning the object into an Empty.

Pull Request: https://projects.blender.org/blender/blender/pulls/143029
2025-07-24 10:22:47 +02:00
Jacques Lucke
df625835c4 Fix #142202: missing anonymous attribute propagation when using some field nodes
Some fields were missing `for_each_field_input_recursive` implementations which
are required for anonymous attribute propagation to work.

Pull Request: https://projects.blender.org/blender/blender/pulls/143031
2025-07-24 10:16:46 +02:00