Commit Graph

123025 Commits

Author SHA1 Message Date
Pablo Vazquez
4e629a6cb1 Cleanup: Remove incorrect comment
Tab background is no longer per editor, it's a global theme setting.
2025-09-12 14:54:11 +02:00
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
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
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
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
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
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
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
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
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
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
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
Damien Picard
a8d366b48a Fix #141142: UI: Emboss status not restored in uiLayout
When using `emboss=False` on a UI prop, if `property_split` was
enabled, all subsequent props in the same layout would also be
unembossed.

This is because of the way the emboss status was set.

When drawing a prop, the previous emboss status was stored in a
temporary variable `prev_emboss`. This status was retrieved from the
uiLayout (`this`), but restored to a `layout` uiLayout that could be
another one, because it could be reassigned in the mean while.

Instead the status should just be restored to `this`, otherwise the
layout can keep the same unembossed status for subsequent props.

Pull Request: https://projects.blender.org/blender/blender/pulls/145883
2025-09-11 11:03:10 +02:00
luz paz
62a5a29d08 Cleanup: Fix typos in source/blender/nodes
Fixes user-facing typos. Found via codespell

Pull Request: https://projects.blender.org/blender/blender/pulls/145970
2025-09-11 10:49:05 +02:00
Jeroen Bakker
6cf0658eee Vulkan: Submission timeline value
Although this doesn't lead to any different behaviour or fixes any issue
it was an oversight as this would not wait for empty render graphs to be
finished in the order of submission

Pull Request: https://projects.blender.org/blender/blender/pulls/146066
2025-09-11 10:36:38 +02:00
Jeroen Bakker
9c9757e52b Cleanup: GPUFence parameter names
Renamed incorrect naming pixbuf->fence

Pull Request: https://projects.blender.org/blender/blender/pulls/146065
2025-09-11 10:36:00 +02:00
Casey Bianco-Davis
4395053115 Fix: Curves: Pen tool virtual destructor compiler warning
The destructor needs to be set to virtual. Otherwise the base object
(`PenToolOperation`) will not be destroyed with the derived object
(`GreasePencilPenToolOperation` or `CurvesPenToolOperation`).

Pull Request: https://projects.blender.org/blender/blender/pulls/146047
2025-09-11 10:28:17 +02:00
Christoph Lendenfeld
baafbd8e95 Anim: Remove PBONE_SELECTABLE macro
This patch replaces the `PBONE_SELECTABLE` macro with functions.
There is a slight functional change in that for pose bones: the visibility
is now correctly accounted for. Before this change it would always look
at the `Bone` visibility. This is no longer the correct way to
check for that since a43359eb88
moved that to the pose bone

Part of #138482

Pull Request: https://projects.blender.org/blender/blender/pulls/145974
2025-09-11 10:00:13 +02:00
Jacques Lucke
1517aa4416 Fix #146051: incorrect parent zone compute contexts when inlining shader nodes
Border links (links going from an outer zone to an inner zone) need special
handling. When requesting the value of a linked socket from outside of the
current zone, the compute context of that parent zone has to be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/146059
2025-09-11 08:02:56 +02:00
Jeroen Bakker
c50c3275be Vulkan: Acquire/release swapchain images
`GHOST_SwapWindowBuffers` doesn't fit well when using swapchains. In
that case an approach where swap chain images are acquired and released
would map better. This PR introduces `GHOST_SwapWindowBufferAcquire`
and `GHOST_SwapWindowBufferRelease` to be more in line with vulkan swap
chains.

Previous implementation would first record all GPU commands based on
the last used swap chain. In case a swapchain needed to be recreated
(window resize, move to other monitor) the recorded commands would
not match the swap chain and could lead to artifacts.

OpenGL only implements the release functions as they don't
have a mechanism to acquire a swap chain image. (Need to validate with
the Metal API how this is working and adapt is needed).

Currently when starting blender on a HDR capable display the first frame
would be based on an sRGB surface and presented on an extended RGB
(or other) surface. As these don't match the first frame could be incorrect and
also lead to UBs as another surface is expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/145728
2025-09-11 07:51:30 +02:00
Campbell Barton
9dc6a2d7f3 Cleanup: correct misleading PyArg_Parser formatting 2025-09-11 15:20:20 +10:00
Campbell Barton
62906cb6f4 Cleanup: use a boolean for BMesh::use_toolflags
Bit-fields don't have any advantage in this case, use a boolean.
2025-09-11 14:40:13 +10:00