Commit Graph

153850 Commits

Author SHA1 Message Date
Nika Kutsniashvili
7f62d5d85e UI: Theme: Common colors for animation channels
Continuation of #140360

New common properties for Channel and Channel Selected,
used in animation editors.
Previously Dope Sheet, Graph Editor, NLA, and Movie Clip Editor
had separate properties for them.

Video and images inside the PR.

---

> [!important]

- Channels looked different in Dope Sheet and Graph Editor. In the former,
they were same color as the background, so only labels and icons were visible,
in the latter they had a darker color, so their outline was visible. We need to pick
which design we go for now that they're combined. I chose color from Graph
Editor for now, with alpha from Dope Sheet, since only that editor uses alpha.

---

There is a confusion with names of channel colors. In 4.5 there is:
- - "Channel" (singular, blue color) which refers to objects, actions,
and action slots that hold/combine channels.
- - "Channels" (plural, black color) which refers to individual channels.

This goes against how we name things. In theme, especially, we refer to object
colors as "Object", singular, not Objects, plular. Same goes for all elements except
this one, where individual elements are referred in plural.

To lessen the confusion, and also avoid unnecessary breaking changes in the
future (in case we want to rename blue things, which seems likely), in this PR
I swap those names. Main reason is that black color marks individual channels,
so it should be singular, and blue colors are combination of many channels,
so they should be plural. Otherwise even talking about them is awkward.

Note that renaming isn't a breaking change, because we already "broke" them
by moving them to common path from individual editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/146091
2025-09-12 14:49:27 +02:00
Sergey Sharybin
15fd8ad7a1 Fix: Cycles linear curves on Metal-RT
Metal-RT implementation for curve intersect has an additional self
intersection check happening in curve_ribbon_accept(). It is done
for all curve types that has PRIMITIVE_CURVE_RIBBON bit set on them,
including Thick Linear curves. However, the logic in the function is
hardcoded to handle flat ribbon curves with the Catmull Rom basis.

This change makes it so curve_ribbon_accept() is only called for the
ribbon curve type, not when type has ribbon bit set.

Additionally, other places where curve type was checked as a bitmask
were fixed.

Ref #146072

Pull Request: https://projects.blender.org/blender/blender/pulls/146140
2025-09-12 14:16:09 +02:00
Clément Foucault
e19e9e57ee EEVEE: Split eevee_shader_shared.hh into multiple files
The goal of this patch is to reduce final shader code footprint to
hopefully reduce shader compile time (see #145347).

This also contains a pass over most shader file to remove unused
include or use more granular ones to reduce final shader code
length.

Testing with the same setup as #145347:
|          | main (ms) |  PR (ms) |   Delta (ms) |
| -------- | ----------- | ------------ |------------ |
| Nvidia   |         257 |  207 (1.24x) |         50 |
| Mesa AMD |         323 |  295 (1.09x)    |        28 |

In barbershop test scene however the saving are not so noticeable:
|          | main (s) |  PR (s) |   Delta (s) |
| -------- | ----------- | ------------ |------------ |
| Nvidia (OpenGL)  |         40 |  39 (1.02x) |         1 |
| Nvidia (Vulkan)   |         29 |  29 (1.0x) |         0 |

Pull Request: https://projects.blender.org/blender/blender/pulls/145803
2025-09-12 14:09:35 +02:00
Namit Bhutani
2110391058 PyAPI: rename undo memory usage method, improve doc-string
Ref !146095
2025-09-12 22:05:53 +10:00
Campbell Barton
1e2ed785f7 Cleanup: use assume attribute to quiet array bounds warning for GCC 15
Ref !146150
2025-09-12 22:03:35 +10:00
Aras Pranckevicius
4adc81b306 Tests: add VSE mask ID modifier render test
Pull Request: https://projects.blender.org/blender/blender/pulls/146146
2025-09-12 14:01:52 +02:00
Campbell Barton
1f80345242 Cleanup: quiet some array-bounds warnings with GCC 15
Warnings remain but suppression is not as simple, see: !146150.
2025-09-12 21:48:43 +10:00
Nika Kutsniashvili
534b5f1f4f UI: Theme: Shared regions
Continuing recent attempts to combine theme settings
and reduce complexity. part of #140360
This PR adds new root panel in theme called "Regions" which for now
includes two subpanels:

# Asset Shelf
This is just moving asset shelf from root to regions, where
it's more appropriate and less noisy.
No functional changes. (alternative to #144267)

# Channels
Previously known as "Theme Space List", or "Source List",
but in user interface we refer this region as "Channels".
This region is shared by all animation/video editors, and each had
a separate panel for theme properties. Now they're combined, and all
editors follow settings defined in Regions -> Channels.

Additionally, "Source List Title" property, which was never used is removed.
Properties are also renamed to be more intuitive and shorter.

# Toolbar / Sidebar
Previously was registered separately on every single editor. This allowed
for some extra customization, but in 5.0 need for this is reduced very much,
because elements drawn in those regions (tabs & tools) are also generalized,
so it makes sense to want same background color for them as well.

> This replaces 46 properties with 5, reducing the total by 41.
> Videos in PR

Pull Request: https://projects.blender.org/blender/blender/pulls/145609
2025-09-12 13:22:50 +02:00
Thomas Dinges
1a666b5722 Authors: de-duplicate 2025-09-12 12:37:45 +02:00
Bastien Montagne
619a9ff580 Silence DNA deprecated warning in versioning_260.cc.
DNA-related defines (like `DNA_DEPRECATED_ALLOW`) should be defined
before any Blender include, as some non-DNA Blender header may
indirectly include some DNA ones.
2025-09-12 12:08:42 +02:00
Bastien Montagne
8d985f38de Fix broken build.
Broken by 6cb2226f13, due to very recent refactor in 84511b8509...
2025-09-12 12:05:21 +02:00
Jacques Lucke
6cb2226f13 Refactor: IDProperty: accelerate looking up properties by name
Currently, `IDP_GetPropertyFromGroup` is a common bottleneck because it has to
iterate over all properties to find the one with the right name.

This patch adds a hash table to id property groups that finding properties by
name in O(1) instead of O(n). The main tricky aspect is to find all the places
where this needs to be created/updated/freed. I tried to find all places but if
I missed some place, it should be easy to fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/140907
2025-09-12 11:34:38 +02:00
Pratik Borhade
e246838639 Fix #145957: Outliner Indirect Only option is greyed out on sub collections
Unlike other properties, "indirect only" restriction toggle doesn't
depend on parent. Meaning, when parent has the value disabled, it is
still possible to control the sub-collection value. That said, we don't
want to grey out the property when parent has the value `OFF`. To fix
this, remove the if condition which checks the parent value before
obtaining the value of current tree element. This  `layer_collection_indirect_only`
is later used inside drawing code to set/unset the `UI_BUT_INACTIVE`
flag

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/146010
2025-09-12 11:04:17 +02:00
Jeroen Bakker
429854363e Vulkan: Disable Stencil Export when Forcing Workarounds
When forcing workarounds stencil export was not disabled. This PR
disables this GPU feature when running blender with `--debug-gpu-force-workarounds` .

Pull Request: https://projects.blender.org/blender/blender/pulls/146130
2025-09-12 09:28:17 +02:00
Guillermo Venegas
4c0114b94e Cleanup: UI: Remove unused interface_align code
The spatial align method has by now 10 years, this removes the old
alignment code since it has not been actively maintained.

-----
This was agreed to be removed in #145051

Pull Request: https://projects.blender.org/blender/blender/pulls/145362
2025-09-12 09:11:13 +02:00
Omar Emara
b10d767c4e Fix #134920: File Output writes frame for single render
The File Output node always appends the frame number even if the render
is not an animation. This patch makes it such that the frame number is
only written if the render is an animation. The user can use a frame
variable to manually append the frame number if needed.

The command line rendering interface already uses animation rendering in
all cases, so it should not be affected. However, rendering using the
render.render() operator with animation=False will see the behavior
change, however, setting animation=False and start_frame and end_frame
to the same frame number should be sufficient to restore the old
behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/141209
2025-09-12 09:01:31 +02:00
Campbell Barton
320092d0e2 Cleanup: quiet array-bounds compiler warning for GCC 2025-09-12 16:43:41 +10:00
luz paz
353e9178a2 Cleanup: Fix the misspelling of "anisotropy" in some variable names
Mistake in d4915b35988dcde9da540800f72a45e7a08d8fa9

Pull Request: https://projects.blender.org/blender/blender/pulls/146085
2025-09-12 08:39:53 +02:00
Campbell Barton
84511b8509 Core: add type checks to ID property accessors
Since moving the C++ ID property access macros cast "const" away,
replace with get/set accessors and add asserts that correct types
are used.
2025-09-12 06:29:42 +00:00
luz paz
f29382bd7b Cleanup: Fix typos in source/blender/animrig
Fixes user-facing and non-user-facing typos.

Pull Request: https://projects.blender.org/blender/blender/pulls/146098
2025-09-12 07:19:27 +02:00
Guillermo Venegas
ad50ee6bf6 Refactor: UI: Make layout estimate functions as virtual methods
Following the uiLayout refactor, this converts each layout estimate
function as virtuals methods, so w_ and y_ properties can become
protected. This includes missing structs for each layout type in
`uiItemType`, but without the `ui` prefix (they eventually will be
moved to the to the `blender::ui` namespace instead)

Pull Request: https://projects.blender.org/blender/blender/pulls/146049
2025-09-12 03:40:17 +02:00
Pratik Borhade
080d996501 Fix #146122: Grease Pencil: Duplicate cursor panel in draw mode
Caused by cc5d111078
Same parent panel being used for brush panel in sculpt, draw modes.
Add poll function that checks the current mode to avoid duplicate generation.

Pull Request: https://projects.blender.org/blender/blender/pulls/145916
2025-09-12 03:06:14 +02:00
Campbell Barton
134110b87f Cleanup: sort file lists 2025-09-12 10:20:40 +10:00
Campbell Barton
975f42b7b2 Cleanup: use doxygen comments to end groups 2025-09-12 10:19:56 +10:00
Casey Bianco-Davis
1dd536e24f Grease Pencil: Support Bézier and Catmull Rom for interpolation tool
This adds support for `Bézier` and `Catmull Rom` curve types to the
interpolation tool.

When interpolating between to curves of different types, a priority
system is used.
The priorities from highest for lowest are in the order
`NURB`, `Bézier`, `Catmull Rom` and `Polyline`.

The reasoning for this order is that:
- `NURBs` can be degree order 5 or greater, were as `Bézier` is only
order 4.
- `Bézier` can match the form of both `Catmull Rom` and `Polyline`, so
should be higher priority.
-  `Catmull Rom` is continuous.
- `Polyline` is the simplest and is not smooth, so it should be last.

Note: This does add some simple `NURBs` interpolation, but proper
handling is more complicated and will be save for a future PR.

Resolves: #141178, #143377, #133948 and #136087
Pull Request: https://projects.blender.org/blender/blender/pulls/145683
2025-09-12 01:59:03 +02:00
Sean Kim
a426e70bf6 Fix: Use new USER_DEVELOPER_TOOL_TEST macro where appropriate
Missed in fb91e576ca

Changes all of the non-sanitized, always available options to use the
new macro to match previous behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/146118
2025-09-12 01:42:52 +02:00
Sean Kim
fb91e576ca Preferences: Update macros for experimental feature checks
* Removes `USER_DEVELOPER_UI` conditional check for
  `USER_EXPERIMENTAL_TEST` since the options are always exposed in alpha
  builds.
* Adds `USER_DEVELOPER_TOOL_TEST` as a helper macro for developer
  options.`

Pull Request: https://projects.blender.org/blender/blender/pulls/146116
2025-09-12 00:48:28 +02:00
Sean Kim
4c2ea47aec UI: Add 'Developer Tools' section to user preferences
This PR introduces a 'Developer Tools' section of the user preferences,
enabled when the `Developer Extras` option is enabled. This menu will
not be hidden when the release cycle is no longer in alpha, allowing
developers to use this for common debug options instead of having to use
`G.debug_value` and arbitrary values.

This has the benefit of allowing for an ease of debugging in non-alpha
builds as well as being able to use multiple options that would have
been considered exclusive debug options at once.

None of the existing values bound to a specific `G.debug_value` have
been migrated yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/145215
2025-09-11 23:53:43 +02:00
quackarooni
dacae33cbe Nodes: Add missing tooltip descriptions for various nodes
Add a description for function nodes and a few geometry nodes
and a few shader nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/145772
2025-09-11 20:03:35 +02:00
Hans Goudey
a08cd68f1e Modifiers: Use implicit sharing for some bind data
Addresses #145680.

In one (relatively extreme) test file with the surface deform modifier,
memory usage goes from 14 GB to 4 GB, and an annoying freeze
from preparing an undo step after every operation is gone.

Pull Request: https://projects.blender.org/blender/blender/pulls/145705
2025-09-11 20:00:01 +02:00
Ray Molenkamp
eccb7fddb0 CMake: Win: Disable fastlink for VS2026
This option has been removed in vs2026 and will cause a build error,
disabling this option results in our default /DEBUG being used
which is equivalent to /debug:full which is the suggested
replacement
2025-09-11 11:45:25 -06:00
Habib Gahbiche
bef15f0ec1 Fix #145633: Revert "Fix #144526: Crash on exit with Video_Editing template"
The fix introduced a high severity bug where exiting Blender after
working with the GPU compositor crashes Blender. We consider #144526 to
be less severe than the newly introduced bug, hence the revert for now.

This reverts commit b2b23e3619.

Pull Request: https://projects.blender.org/blender/blender/pulls/146096
2025-09-11 18:08:52 +02:00
Pablo Vazquez
f4313c07b6 UI: VSE: Update White Balance modifier icon
The previous one could be confused with "exposure".

See PR for details and screenshots.

Design by Falk with small tweaks by me.

Pull Request: https://projects.blender.org/blender/blender/pulls/146083
2025-09-11 17:41:08 +02:00
Pablo Vazquez
f52f26d481 UI: VSE: Use correct icon for enable modifier
"Enable modifier" was using the eye icon, which usually indicates
only visibility, but this actually affects render.

Also in the future there could be other visibility toggles, like
regular modifiers.

Reviewed with Falk and Dalai in person.
2025-09-11 17:20:22 +02:00
Sergey Sharybin
963569caf4 Fix #146086: Regression: OpenSubdiv: GPU Shaders gets recompiled for each evaluation
Regression in 1e4764a9a5 which accidentally removed use of
the g_subdiv_evaluator_cache.

Pull Request: https://projects.blender.org/blender/blender/pulls/146097
2025-09-11 17:17:30 +02:00
Ray Molenkamp
d7bcf6e1f9 Win: Preliminary VS 2026 support
There is no CMake version yet that support VS2026, support is
currently limited to ninja based builds.

CMake does not know where to look for the MSVC 2026 Runtime
it copies the wrong CRT leading to startup issues, for this reason
WITH_WINDOWS_BUNDLE_CRT has been disabled for VS2026 + CMake < 4.2.0.
Builds done with VS2026 are for this reason *NOT* distributable to
end users at this point in time.

CMake 4.2.0 Is *expected* to have VS 2026 support [1]

But further testing is likely required.

Things of note:

- They stopped using the "preview" channel and have rebranded to
"Insiders" the make.bat options have been updated accordingly to
select the 2026 Insiders build, you need to pass 2026i to make.bat

- All tests seem to pass on my system

- No new warnings, pretty smooth update

[1] https://gitlab.kitware.com/cmake/cmake/-/merge_requests/11168
2025-09-11 08:48:53 -06:00
Jeroen Bakker
0c75361516 Vulkan: Add Memory Pool for External Pixel Buffers
Adds a separate memory pool for creating external pixel buffers.
Previous the memory type of images was used, but could not be
compatible.

Pull Request: https://projects.blender.org/blender/blender/pulls/146078
2025-09-11 16:19:23 +02:00
Falk David
929110db04 Fix: Remove unused "Active Modifier Outline" setting
This setting was added in 866fcd0a09
by mistake and shouldn't have been kept.
Removing it again.

Pull Request: https://projects.blender.org/blender/blender/pulls/146092
2025-09-11 16:18:31 +02:00
Jeroen Bakker
819175961b Fix#145961: Vulkan: Pixelbuffer are Never Exported
Pixel buffers will be imported by Cycles in Cuda/OneAPI/HIP
when supported. However the priority and export field is not filled correctly,
resulting in that the priority is always 1 and the buffer is never exported.

Should be backported to 4.5 as Cycles GPU interop isn't working
when using Vulkan.

Regression introduced by: !144422

Pull Request: https://projects.blender.org/blender/blender/pulls/146090
2025-09-11 16:15:14 +02:00
Brecht Van Lommel
45dca5c994 Vulkan: Enable wide gamut colors on Windows when HDR mode is off
Only use when Windows Automatic Color Management (ACM) is enabled.
That way we know Windows will automatically convert from extended sRGB
linear to the appropriate color space for the display.

When we previously tried this there were some issues, but I think it was due
to ACM being off. This has been confirmed to work on NVIDIA and AMD, and
Intel is not expected to support this (yet) for the same reasons there is no HDR.

Pull Request: https://projects.blender.org/blender/blender/pulls/146041
2025-09-11 15:44:38 +02:00
Ray Molenkamp
0bd3e7e213 Fix: Build error with BLI_virtual_array.hh
BLI_virtual_array.hh relies on the <functional> header
without including it, leading to build errors.
2025-09-11 07:30:52 -06:00
Jeroen Bakker
790033e0c3 Cleanup: Vulkan: Remove references to Renderpass and Framebuffer
VkRenderPass and VkFramebuffer are not used in Blender 5.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/146082
2025-09-11 15:03:46 +02:00
Pablo Vazquez
535c25800b UI: Timeline: Improve Keying popover label
Display the active keying set name as label, and an icon to indicate
the current keyframe type.

This also adds a descripition/tooltip to the keying popover, so it's
easier to understand when the keying set name is not clear.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/145963
2025-09-11 14:43:42 +02:00
Sergey Sharybin
a927c98d5a Fix #146042: Fix when view transform is set to non-existing color space
Some of the color space settings are not validated on load to be set to
a valid values. To deal with those cases better bake it so color management
module does not make assumption on validness of the input data.

This is an oversight in the !140729.

Pull Request: https://projects.blender.org/blender/blender/pulls/146084
2025-09-11 14:09:20 +02:00
Omar Emara
ad6892832f Render: Add start and end frames to render.render()
This patch adds two new optional arguments to the render.render()
operator, allowing the caller to use a custom frame range for animation
render.

Pull Request: https://projects.blender.org/blender/blender/pulls/146022
2025-09-11 12:47:08 +02:00
Clément Foucault
1f94af6aa4 GPU: Shader: Add support for loop unroll using macros
It is usually nice to unroll loops with a different number of
iteration based on a macro. This commit adds this functionality
to our shader preprocessor so that we don't have to manually unroll
these loops.

Pull Request: https://projects.blender.org/blender/blender/pulls/146043
2025-09-11 12:42:11 +02:00
Omar Emara
f699b34689 Fix #146057: Crash when using Convolve node with GPU
The Convolve node crashes Blender if used with GPU device and its output
is used multiple times. This is due to a use after free error, because
the convolve node ignored the reference count of the output.

To fix this, we retain the reference count of the output by stealing the
data of the GPU-side buffer, instead of overwriting the output with it.

Pull Request: https://projects.blender.org/blender/blender/pulls/146074
2025-09-11 12:18:35 +02:00
Philipp Oeser
ed547afcd2 Fix #146045: wrong modifier list in audio strips, crash when selected
8dcd01907d added Video strip modifiers for Audio strips as well, now
corrected.

Pull Request: https://projects.blender.org/blender/blender/pulls/146067
2025-09-11 11:31:14 +02:00
luz paz
355a805e68 Cleanup: Fix typos in source/blender/freestyle
Fix code comment typos. Found via codespell

Pull Request: https://projects.blender.org/blender/blender/pulls/145832
2025-09-11 11:30:49 +02:00
luz paz
072f956ce0 Cleanup: Fix typos in scripts subdirectory
Fix spellings from comment and string
Found via codespell

Pull Request: https://projects.blender.org/blender/blender/pulls/145834
2025-09-11 11:29:06 +02:00