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
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
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
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.
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
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
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
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
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
* 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
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
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
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
"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.
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
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
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
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
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
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
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
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
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
`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