Introduced with 5f8311f596
When using the Spacing stroke type, the exact spacing between brush
daubs becomes modified by the brush size. In the case of users using
a non default brush size curve with size pressure, we need to use the
evaluated pressure factor for the size, not the raw pressure value.
Additionally, this commit renames the parameters in a helper method
to more clearly differentiate between the two float parameters.
Pull Request: https://projects.blender.org/blender/blender/pulls/146054
Introduced with 7f3aa617ce
The `PaintMode` is needed when activating the default tool. There were
two things that caused this field on the `PaintRuntime` to be in an
invalid state on duplication:
* The original values for `PaintRuntime` were not copied to the new
instance.
* When copying `ToolSettings`, the incorrect old value of `Paint` was
passed to `BKE_paint_copy`, leading to the inability to copy the right
data.
Pull Request: https://projects.blender.org/blender/blender/pulls/146199
This commit implements the design task #78398
- Box region
- Set Custom UV Region (Ctrl-B).
- Disabled with Custom Region checkbox in the menu or (Ctrl-Alt-B).
- Box Select (Pinned) changed to (Alt-B).
- When the Custom Region enum is chosen the islands are packed
into the bounding box of the drawn region.
Ref !140020
Currently, the frame scrub area shows different frame numbers based on
the zoom level. But they would not show frame 24 until you zoom in. Since 24
is the most used frame rate for animation that's inconvenient because you never
see the spot with the full second.
With this PR the numbers and lines depend on the frame rate, and will favor
full seconds, then divide by either 2, 3 or 5 to break down the number.
This works for most FPS values, however custom FPS may hit a prime number, in which case
this logic is aborted and the next step down when zooming in will be 1. This can
result in quite large gaps where no frame numbers are displayed. But I think the impact
will be small since large prime number frame rates are rare.
This patch also reduces UI jumping because the major lines will always be turned into minor lines before disappearing.
When zooming in, any minor line will become a major line eventually.
To reduce the bunching up of minor lines when dividing by a large prime number,
they are only drawn if the distance between them is large enough.
Note that the line drawing in the VSE is not quite following the zoom level. Since this doesn't use the code path i modified in this PR I left it as is. Info from the Sequencer module is appreciated.
Pull Request: https://projects.blender.org/blender/blender/pulls/143562
* Fix: OpenColorIO config defined working space disappears from menu. It
was incorrectly using the current scene linear instead of default space.
* Warn users about missing working space.
* Don't detect lin_ap0_scene working space, we don't offer it in the menu.
Pull Request: https://projects.blender.org/blender/blender/pulls/146149
Prior to 5.0, "Bundle" used to mean only the reconstructed data from
tracking.
Since then, bundles are a new data type in Geometry Nodes. It has many
occurrences, so it's easier to give it the default translation
context, and to use the "MovieClip" context for the tracking sense.
Some places used `IFACE_("For Each Element " UI_MENU_ARROW_SEP "
Main")`, which doesn't work because the arrow separator character is
not extracted by the translation regex. This results instead in:
"For Each Element Main" (two spaces).
This commit uses string formatting to add the special character after
translation. It's clunky because translators won't see the actual
string, but not as risky right now as trying to include those special
characters in message extraction.
Color icons for Red, Green, Blue, were introduced in c13d3e2f7a. They
are translatable but currently using the default transation context
and the `TIP_()` translation macro.
R, G, B as colors should use the BLT_I18NCONTEXT_COLOR context,
and `IFACE_()` since they are not specific to tooltips.
The referenced commit introduced the use of gamma 2.2 or piecewise sRGB
for the backbuffer blit depending on the operating system. This commit
switches from a push constant for this to a preprocessor define.
Ref 5d72498154
Pull Request: https://projects.blender.org/blender/blender/pulls/146170
While perhaps it is more accurate to draw the sidebar navigation in a
"Navigation Bar" region, the navigation "tabs" are not real tabs, so
the darker background usually used for tabs doesn't look good here.
Draw the sections radio buttons in a regular sidebar region instead.
See PR for details and screenshots.
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146169
Continues and depends on #145609, part of #140360 project.
Previously, all 5 animation/video editors had different properties
for Scrubbing/Markers region. This PR adds new Region panel for it,
so that all editors can share one color.
Text color in this region was coming from regular editor text color.
To differentiate between editors (as is the pattern already with other editors),
and allow more modular themeability of regions, new Text color is added
for that region as well.
Video in PR
Pull Request: https://projects.blender.org/blender/blender/pulls/146113
Dependencies were previously merged manually
inside the generated_sources by EEVEE.
This caused issues with double includes.
Instead, we now only gather the name of the
nodetree dependencies and add them to the
dependencies of the `GeneratedSource`.
This also make the compositor use the `GeneratedSource`
mechanism.
Pull Request: https://projects.blender.org/blender/blender/pulls/146106
Geometry Nodes used a `PropertiesVectorSet` in some places to allow
constant-time `IDProperty` access by name in a group. This used to be a
bottleneck in node groups with hundreds of inputs. Now this separate hash table
is not necessary anymore, because it's `IDProperty` groups now support this
directly since 6cb2226f13.
This also adds a `IDP_GetPropertyFromGroup_null` utility function to be able to
do this refactor more safely. Null pointers were allowed before.
Pull Request: https://projects.blender.org/blender/blender/pulls/146152
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