Commit Graph

153073 Commits

Author SHA1 Message Date
Campbell Barton
ebfa7edeb1 Cleanup: use snake case, replace "m_" prefix with "_" suffix
Follow our own C++ conventions for GHOST.
2025-08-16 16:14:18 +10:00
Campbell Barton
c888bc55e7 Cleanup: quiet GCC warning 2025-08-16 16:14:18 +10:00
Harley Acheson
9a3f80b8f2 UI: Generalized Alert and Popup Block Error Indication
This PR adds an optional block alert level, defaulting to none. Then
for error-level alerts only it adds a red line and a color icon.
Dialogs with other alert types do not change at all. This also adds
a UI_alert function to create such dialogs.

Pull Request: https://projects.blender.org/blender/blender/pulls/134084
2025-08-16 02:45:36 +02:00
Sean Kim
d3712a16db Cleanup: Adjust recently added RadialControl comment
Pull Request: https://projects.blender.org/blender/blender/pulls/144596
2025-08-15 22:54:35 +02:00
илья _
0f97bbf944 Refactor: Improve packaging of curve edit draw segments in memory
Right after #143858 this refactor aim to fix issue with bezier
curve handle segments location in index buffer object.
Before there were a lot of unused segments.
Now there is no any unused bit of memory.

Pull Request: https://projects.blender.org/blender/blender/pulls/143966
2025-08-15 21:51:49 +02:00
Guillermo Venegas
ead9643fe4 Cleanup: UI: Remove uiItem::flag_ public access
Follow up from recent UI refactors.
Part of: #117604

Pull Request: https://projects.blender.org/blender/blender/pulls/143724
2025-08-15 21:50:39 +02:00
Nika Kutsniashvili
7d2b024151 UI: Theme: Move curve handle properties in common
Continuing #140360, after 39c066ee53

Moving curve handle colors & size from space editors into common theme properties.

They are now shared by 3D Viewport, Image Editor, Graph Editor, and Movie Clip Editor,
instead of each of them having their own properties.

(Video in PR)

---

Details:
- NURB U/V lines, active spline, and last selected point colors were defined
in `rna_def_userdef_theme_spaces_curves` but were optional and only called by
3D viewport. Since no other editor calls that function anymore, I removed it and
moved those properties directly inside `rna_def_userdef_theme_space_view3d`.
- In Image Editor & Movie Clip Editor (Mask mode), curves don't ever show
selection colors, and Vector handles are generally never visible, that is
bug/missing in Blender in general, not a result of this PR.
- Handle vertex size were included in Dope Sheet and NLA, where handles don't
exist. Now as a side effect they're removed as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/143762
2025-08-15 21:40:56 +02:00
Casey Bianco-Davis
a767671c56 Grease Pencil: Edit Mode Pen Tool
This adds the `Pen` tool to Grease Pencil Edit Mode.

With the pen tool you can:
- Extrude points by `Left Click`.
- Move the handles by dragging the mouse.
- Snap handles to 45 degree increments with `Shift`.
- Cycle through the handle types by `Double Clicking`.
- Add new point on segments by `Ctrl Clicking`.
- Remove existing point by `Ctrl Clicking`.
- Close a curve by clicking on one end while having the other selected.
- Move existing segment by clicking and dragging on the edge.
- Move points by clicking and dragging the mouse.

Some changes have been made compared to the legacy
curve object's pen tool:
- `Angle locking` with `Alt` was replaced with `Angle Snapping`
   using `Shift`. This was done to match the behavior of Grease Pencil
   primitive tools.
- `Move Entire Point` was changed from the `Space` key to `Alt`. This
   was done because some laptops can't move the mouse while
  `Space` is held.
- `Link Handles` and `Free Align Toggle` were not implemented.
- `Toggle Vector` and `Close Spline Method` were removed.
- `Close Spline` was removed and set to always be true.
- `Extrude Handle` type was removed as a option and was replaced
   by the `shift` modifier key when clicking.
- Newly created points are placed on the drawing plane, instead of
  the view plane.

When a new curve is created, the material will be the active material
and the radius will be set from the `radius` property.

Note: This tool is added to edit mode because it uses handle selection
and bézier overlays which currently don't exist in draw mode.
A future PR will implement a draw mode version.

Pull Request: https://projects.blender.org/blender/blender/pulls/142646
2025-08-15 18:17:09 +02:00
Weizhen Huang
3dc73a3fda Tests: update GPU volume tests
New files are added since 5646d9a5ca

Pull Request: https://projects.blender.org/blender/blender/pulls/144622
2025-08-15 18:15:34 +02:00
Pablo Vazquez
4c2169267a UI: Widen Preferences Window
The default size of the Preferences window is often not wide enough
to fit some strings under System, Keymap, and others.

Make Preferences window slightly wider, but still a conservative width
so it doesn't cover up much of the screen at the smallest recommended
screen size (1920x1080).

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/144497
2025-08-15 18:01:20 +02:00
Aras Pranckevicius
e5cc7ce59b Fix: VSE preview draw was not caching the OCIO GPU shader
IMB_colormanagement_setup_glsl_draw_to_scene_linear (only used by
VSE preview rendering) inside GPUShaderBinder::to_scene_linear_bind
was trying to cache the created OCIO GPU shader, but failed to actually
do it: it was querying scene_linear_cache, but putting the shader
into display_cache.

This lack of caching was costing around 1ms on each VSE preview draw.

Pull Request: https://projects.blender.org/blender/blender/pulls/144617
2025-08-15 15:15:08 +02:00
Clément Foucault
3c3f21ec00 GPU: Shader: Replace template macro implementation by copy paste
Use the lately introduced parser for that.

This allows to use preprocessor directive inside them.
By extension, it alows having resource accessors inside
templates.
Also error report is less confusing on most shader compilers.

The counterpart is that the shader files that are shipped
with blender are inflated.

Pull Request: https://projects.blender.org/blender/blender/pulls/144588
2025-08-15 15:13:54 +02:00
Oxicid
b1d9a91647 FBX: Add material name collision mode
Introduces the Material Name Collision option, similar to how
USD / OBJ importers have it.

Pull Request: https://projects.blender.org/blender/blender/pulls/144375
2025-08-15 15:04:36 +02:00
Thomas Hope
da46eed108 IO: Add Apply Transforms option to obj exporter
When enabled (default), exported OBJ files have the object transform
applied to their vertices. This is the previous default behaviour.

When disabled, exported vertices use their local object coordinates.

Pull Request: https://projects.blender.org/blender/blender/pulls/139436
2025-08-15 15:03:44 +02:00
Jeroen Bakker
f4103acb3f Refactor: Vulkan: Swapchain submission fence
First advance to the next frame and use the same index for all
resources. Previous implementation used a fence of the next frame, what
added confusion why that was actually needed.

Should not make a change in functionality or performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/144615
2025-08-15 13:46:42 +02:00
Aras Pranckevicius
e8f1c6ee4d Fix: VSE cache limits not handled properly when there's way more final frames than source images
Not a common scenario, but if you had very few source images (e.g.
long image strips with one frame) and many final frames cached,
the full cache eviction policy was not handling that well, since it
was always removing at least one source image for each final frame.
Resulting in effectively the cache only being full of final frames.

Change that so:
1) evict_caches_if_full has a loop that tries to evict until the caches
  are not full (i.e. not necessarily just one image), and
2) only evict source image per final frame, if there are more source
  images cached.

Pull Request: https://projects.blender.org/blender/blender/pulls/144612
2025-08-15 12:48:11 +02:00
Bastien Montagne
780b8ee415 Fix #144592: FBX exporter: Invalid memory access when exporting tangents.
Since the tangent attributes are now recomputed inside the loop over uv
layers, looping directly over this mesh data is dangerous, as computing
the tangents attributes might trigger some re-allocations, leading to
invalid memory accesses when accessing the next uv layer.

Solved by caching uv layers' names in a list beforehand, the uvlayers
themselves are not even needed for tangent data handling.

Regression from e0a9e98cbd.
2025-08-15 12:29:28 +02:00
Casey Bianco-Davis
18da9cc777 Fix #142644: Grease Pencil: Subdivide Modifier not smoothing first point when cyclical
The problem was that the `Subdivide Modifier` would not apply catmull clark
smoothing to the first and last points when a curve was cyclical.

This also fixes a mistake were the smoothing would read from the same data
as writing, leading to the shape to be skewed.

Pull Request: https://projects.blender.org/blender/blender/pulls/144529
2025-08-15 12:19:41 +02:00
Jeroen Bakker
731d257cf4 Fix #144542: Workbench DoF crash when using Vulkan
The depth of field shader create info contained a resource that wasn't
used in the shader or fulfilled. In the Vulkan backend the shader resource
list is used in the outer loop to find out which resources needs to be
requested. As this resource didn't exist it asserted in the Vulkan backend
for incorrect usage.

Pull Request: https://projects.blender.org/blender/blender/pulls/144606
2025-08-15 11:50:38 +02:00
Campbell Barton
3be9f89ad3 Cleanup: quiet unused warning & correct typo 2025-08-15 18:55:52 +10:00
Jeroen Bakker
ea633b930f Fix #143989: Vulkan: Text drawing performance
Text drawing can be improved. At this moment a vertex buffer is
allocated for 2048 chars. When drawing a string the vertex buffer is
filled from the beginning with the string to draw. The next string will
replace the chars of the previous string. This locks up GPUs as the data
can only be overwritten when the buffer isn't used anymore.

Vulkan backend had an issue that uploading the new data would always
send over 2048 chars even when some chars were only used. By fixing this
the scene in the report went from 0.6 fps to 2.6 fps. OpenGL is 6 fps as
vulkan has to manage a rendergraph with 100.000 of nodes.

Text drawing performance can be improved by continue using the space of
the vertex buffers. In this case more drawing calls can be done, before
the vertex buffer needs to be updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/144604
2025-08-15 10:36:27 +02:00
Julian Eisel
17f1c055da WM: Add message type for remote downloader messages to message bus
We plan on using this for online assets (see blender/blender!130543), to
send status updates with a URL to identify the online library remote.
In future this can be expanded for multiple kinds of messages with
differing data, like progress reports, sub-resource download messages
(e.g. individual assets), etc.

While this will only be used for online assets for the start, I imagine
we'd want these same kind of status messages for other remote
resources. Hence the name `WM_MSG_TYPE_REMOTE_IO`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144567
2025-08-15 10:30:33 +02:00
Jeroen Bakker
1f1098c498 Vulkan: Remove MoltenVK
Blender had some support for using MoltenVK. However there are some key
issues why MotlenVK cannot be used. Bugs have been reported up-stream.
As it doesn't work and holds back regular developments it will be removed
from the main branch.

Any efforts on making Vulkan run on Apple (including KosmicKrisp)
is considered a community effort and can be done in a development
branch.

Pull Request: https://projects.blender.org/blender/blender/pulls/144602
2025-08-15 09:36:38 +02:00
Ramon Klauck
d388b807a3 VSE: Clear Strip Keyframes from Preview
This PR makes it easier to clear keyframes from strips in preview.
It is the similar to the feature in 3D viewport. Just navigate to
"Strip" -> "Animation" -> "Clear Keyframes...". This then deletes
all keyframes form the selected strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/141106
2025-08-15 05:37:39 +02:00
Richard Antalik
bd4a7ef577 Fix #144332: VSE solo preview does not work
`render_give_ibuf_direct()` just called `seq_render_strip()`, which
tried to get image from intra frame cache. This always succeeded,
because the intra frame cache does not accept timeline frame argument.

Using intra frame cache here is incorrect. Source cache must be used.
If source cache lookup fails, intra frame cache must be invalidated
before calling `seq_render_strip()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144396
2025-08-15 03:44:38 +02:00
Campbell Barton
a111a258b5 Fix: add ThemeCommonAnim to XML secure types
Follow up to !144580.
2025-08-15 11:01:32 +10:00
Nika Kutsniashvili
6526f83fed Fix #144579: "Commons" theme settings fail to load from XML
Add common theme panel in XML secure types.

Ref !144580
2025-08-15 00:51:34 +00:00
Hans Goudey
814d04aaf9 Attributes: Reset various runtime data for writing files
These fields are always reset at runtime. Writing zeros should be easier
to compress since a lot of other data is zeroed, and it also makes it
easier for developers to filter out noise when looking at data buffers.

Pull Request: https://projects.blender.org/blender/blender/pulls/144582
2025-08-14 23:39:16 +02:00
Sean Kim
3846f0e0b0 Cleanup: Rename and add comment for RadialControl#initial_mouse
Attempt to clarify that this value is not the raw initial event so that
usage is more clear during operator processing.

Pull Request: https://projects.blender.org/blender/blender/pulls/144519
2025-08-14 21:13:40 +02:00
Clément Foucault
13d25a5cfc GPU: Shader: Fix parser not being consistent
Using `std::sort` does not garantee the initial
order is kept for items with the same ranking value.

Using `std::stable_sort` fixes the issue.
2025-08-14 20:43:25 +02:00
Bart van der Braak
0c69fb5f9f GitHub: Add copy of README with GitHub mirror info
Pull Request: https://projects.blender.org/blender/blender/pulls/144539
2025-08-14 20:02:48 +02:00
Julian Eisel
ea9e390f69 Cleanup: Improve & correct comment for asset system file flag 2025-08-14 18:18:47 +02:00
Bastien Montagne
45fadf8297 UI: Prevent 'liboverride' 'decorator' button to control keyframes.
AFAIR, originally the decorator widget was supposed to be also usable to
control overrides.

However, this was never finished (even design wise, not sure how this would
have worked and not conflicted with the animation part of it).

So for now, apply the same behavior as with driven properties: when a
property is liboverridden (but not animated), do not allow to define or
remove keyframes.

This commit also refactors the handling of decorator action, to
deduplicate the logic deciding whether a decorators is 'active' and can
control keyframes, or not.

Pull Request: https://projects.blender.org/blender/blender/pulls/140872
2025-08-14 18:09:38 +02:00
Bastien Montagne
1e2f16c4aa UI: Remove liboverride UI dead code, improve UI messages.
The various operations of liboverride have never been effectively
exposed, remove them from the UI code at least.

Also rename related operator and UI messages to use the typical `Add`
naming (`Add Override` etc.).
2025-08-14 18:09:37 +02:00
Falk David
d50c0b7942 Cleanup: Fix compiler warning
This was caused by 8c3e81bd9b.
2025-08-14 18:08:20 +02:00
Bastien Montagne
6db4f0eb7d Fix unused warning in release builds. 2025-08-14 18:02:57 +02:00
Sergey Sharybin
cfd04172c9 Fix #144521: Unable to fetch LFS objects on make update with Glthub mirror
The setting is called `lfs.remote.searchall`, the `remote` part of it being
an exact string, it is not to be expanded with the name of the remote.

Whenever name of the remote is to be used Git documentation uses `<remote>`
syntax.

Tested by triggering the original issue (clone the Github mirror, make update,
wait for a new LFS object appear in the upstream, make update again). Before
this change the LFS object will not be fetched, and based on the Git Curl's
log only the github origin was used to fetch LFS object, none other remotes
were tried.

Also confirmed by checking the Git-LFS code:
https://github.com/git-lfs/git-lfs/blob/v3.7.0/config/config.go#L232

Pull Request: https://projects.blender.org/blender/blender/pulls/144574
2025-08-14 17:51:52 +02:00
Christoph Neuhauser
7c7af11b9b Tests: Turn VSync off for performance tests
To avoid timings being capped at the display refresh rate.

Ref #143049

Pull Request: https://projects.blender.org/blender/blender/pulls/144555
2025-08-14 16:39:29 +02:00
Weizhen Huang
df496eb894 Cycles: use one-tap stochastic interpolation for volume
It has ~1.2x speed-up on CPU and ~1.5x speed-up on GPU (tested on Metal
M2 Ultra).

Individual samples are noisier, but equal time renders are mostly
better.

Note that volume emission renders differently than before.

Pull Request: https://projects.blender.org/blender/blender/pulls/144451
2025-08-14 15:22:44 +02:00
Weizhen Huang
0c371ca3c5 Cycles: use deterministic linear interpolation for velocity
Cubic is too costly, stochastic interpolation is inaccurate.
2025-08-14 15:22:43 +02:00
Christoph Lendenfeld
bc93123461 Refactor: Use function overload for bone_is_visible
No functional changes intended.

This brings `bone_is_visible` in line with `bone_is_selected`,
by using function overloading instead of suffixing with either
`pchan` or `editbone`.

Pull Request: https://projects.blender.org/blender/blender/pulls/144558
2025-08-14 14:50:28 +02:00
Pratik Borhade
46ed83c386 Cleanup: Use event parameter
Mistake in a559fb833c after moving code from exec to invoke callback

Pull Request: https://projects.blender.org/blender/blender/pulls/144549
2025-08-14 14:45:38 +02:00
Casey Bianco-Davis
b056d3c85c Grease Pencil: Export other curve types to SVG
This adds support for bézier, NURBS and catmull rom curve
types in SVG exporting.

Note: strokes without uniform width will still be exported as
polylines. This is because the outline code currently does not
support bézier curves.

Pull Request: https://projects.blender.org/blender/blender/pulls/141594
2025-08-14 13:51:27 +02:00
Casey Bianco-Davis
8c3e81bd9b Fix: Grease Pencil: SVG and PDF bounding box size bug
Some times when exporting, the bounding box would have a size of zero.
This made it so that no points were visible.

This PR fixes the bounding size by using the already existing
`ed::greasepencil::retrieve_visible_strokes` function.

Pull Request: https://projects.blender.org/blender/blender/pulls/144516
2025-08-14 13:46:33 +02:00
Jeroen Bakker
7286885789 Vulkan: Update VMA to 3.3.0
Updated to latest release. Has some fixes and a new API for easy
integration with Volk.

Pull Request: https://projects.blender.org/blender/blender/pulls/144434
2025-08-14 13:20:45 +02:00
Bastien Montagne
1adb07200c Fix (unreported) assert issue in memfile undo code.
Embedded IDs never get tagged as 'unchanged', since this status is
always the same as for their owner ID.

So far, this assert was never reached, which would indicate that IDs
using embedded data are never detected as unchanged. Hopefully work like
the 'pointer stability' on blendfile writing (!127729) will improve this
situation.

The problem was triggered in upcoming packed data code, where packed IDs
are managed like regular local ones on memfile undo (and not like
regular linked ones). But in that case it looks like packed materials
and such are properly detected as unchanged...
2025-08-14 13:09:25 +02:00
Casey Bianco-Davis
44a2708c0e Fix #139094: Grease Pencil: Primitive Tools not initializing u_scale attribute
The `Primitive Tools` would not initializes the `u_scale` attribute,
making it so that the attribute would default to `0.0f` when new
strokes were drawn the the draw tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/144524
2025-08-14 12:29:20 +02:00
Casey Bianco-Davis
fd7bb7f9c3 Fix: Grease Pencil: Bézier handles not effected by Snap To Grid
This makes it so that bézier handles will be snapped to the grid,
same as the control points.

Pull Request: https://projects.blender.org/blender/blender/pulls/144517
2025-08-14 12:27:21 +02:00
Casey Bianco-Davis
baaa180ba1 Fix #131108: Reproject Strokes Operator does not project bézier handles
This makes it so that bézier handles are projected correctly when
using the `Reproject Strokes` operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/144518
2025-08-14 12:20:08 +02:00
Nikita Sirgienko
21cba7024c Cycles: oneAPI: Disable L0 copy optimization for several dGPUs
Currently, it was discovered that in the case of several different
Intel dGPUs being present in the system, the experimental L0 copy
optimization does not work correctly in the Intel Driver, which is
causing crashes in the driver and Blender application. So, to avoid
this situation and restore functionality on these platforms,
a workaround was added to disable this extension from being used if
such a configuration is detected. In the future, when this problem is
fully fixed in all Intel Drivers, this workaround can be removed from
the Blender source code to restore some performance that was lost on
configurations of several dGPUs because of this workaround.

Pull Request: https://projects.blender.org/blender/blender/pulls/144262
2025-08-14 12:14:51 +02:00