Improvements to how text colors and shadows are determined for the
3D View overlays. Starting with the theme's text highlight color, it
is lightened or darkened if necessary to give contrast with the
background. Then a black or white shadow is used depending on text
color.
Pull Request: https://projects.blender.org/blender/blender/pulls/127389
When playback framerate is too slow, then text was red and visible.
Otherwise it was black text on normally black background though, which
is not very useful.
Pull Request: https://projects.blender.org/blender/blender/pulls/127394
Introduced with 347ec1acd7.
Various brushes use the `calc_area_normal_and_center_node_grids`
function to determine their displacment. Prior to this commit, the
calculation of this plane normal was not iterating over the `IndexMask`
correctly.
This manifested on the default cube at multires levels greater than 6,
because at that point the number of PBVH nodes was greater than 1,
leading to the wrong nodes being used to calculate this effect.
Pull Request: https://projects.blender.org/blender/blender/pulls/127474
PR ##127465 accidentally removed a check for is_floating, which means
that you get a drag cursor near the top of dropdown menus. This fixes
that dumb mistake.
Pull Request: https://projects.blender.org/blender/blender/pulls/127472
Remove old version guards relating to USD versions prior to 2111 which
released in Nov 2021.
The oldest supported version of Blender, 3.3 LTS which goes end of life
this month, was already using USD version 2203 released in March 2022.
Additionally, these guards give the illusion that compiling with old
versions prior to 2111 might work, which is neither guaranteed nor
tested for at this point.
Pull Request: https://projects.blender.org/blender/blender/pulls/127380
Some popup menus have content at the very top, within the title bounds.
In this case don't show the drag cursor if there is a button under the
mouse location.
Pull Request: https://projects.blender.org/blender/blender/pulls/127465
Prior to 0df133559c, the `active_vert_` property was only ever
invalidated if the entire `SculptSession` was refreshed, even if the
cursor moved off of the mesh or if the underlying mesh type changed.
The Sculpt Expand operator was dependent on this value not being cleared
to still behave in a reasonable way from a user perspective
This commit introduces a new variable, `last_active_vert_` and
corresponding accessor methods to `SculptSession` to specifically fix
this usecase. When the active vert is cleared, if it had a valid value,
we store it in the new `last_active_vert_` variable.
Pull Request: https://projects.blender.org/blender/blender/pulls/127433
Part of #118145.
The attribute system should be used to store user-edited data, not
temporary caches during a stroke. It's simpler and more obvious to
just store this as part of the cache created for every brush stroke.
Pull Request: https://projects.blender.org/blender/blender/pulls/127463
This class allows to define capture scopes
that can be chosen during gpu work capture.
This reduces the amount of command captured
and allow for faster replay and easier
navigation inside the debug tools like Xcode
or RenderDoc.
"seq3" input for VSE effect strips has been there ever since
"initial revision" commit in 2002, with comment "pointers voor effecten"
even. But it has never been used, so remove all code that pretends
to do something with it.
Pull Request: https://projects.blender.org/blender/blender/pulls/127401
The issue is that the boolean node did not propagate edit data and thus lost
information about gizmos. Now the boolean node propagates edit data from
all geometry inputs.
Pull Request: https://projects.blender.org/blender/blender/pulls/127457
This adds a variant of `accumulate_counts_to_offsets` which checks for
overflows. The hot loop stays essentially the same, it just uses a `int64_t`
instead of `int` for the counter now. For now the error state is returned by
using an `std::optional`. Alternatives could be to throw `std::overflow_error`
or to use some Result/Expected type in the future.
Obviously, there are more places that should handle this kind of error. It's
also not obvious how to propagate that error further up yet so that we can
display e.g. a warning in the node. That decision should be applicable to other
nodes too. For now, there is no warning on the node.
Pull Request: https://projects.blender.org/blender/blender/pulls/127184
For `SubdivCCG`, replace the dynamic array-of-struct data with separate
arrays for positions, normals, and masks. This decreases memory
bandwidth requirements for loops that only access one of these arrays.
It also significantly simplifies data access, making it more similar
to mesh data where it can just be accessed with indices.
In a simple test this change speeds up the multires sculpt brush
benchmark by 32%. It also slightly reduced BVH build time by about 12%.
In practice this means completely replacing usage of `CCGElem` for
`SubdivCCG`. The struct is still used in the older subsurf baking code
though. Removing that is a much trickier task that doesn't have short
term benefits.
Part of #118145.
Pull Request: https://projects.blender.org/blender/blender/pulls/127262
Before efb511a76d this was not necessary, because the G_FILE_COMPRESS option
was not disabled when writing memfile undo steps. However, compression is
generally disabled when writing quit.blend or autosave files.
When doing average/min/max luminance calculations for tonemapping, ignore
pixels that are outside of the strip rectangle. Due to how VSE innards work,
when a strip is positioned to not cover the whole screen, "the rest" is filled
with transparent black. For tonemapping, this was dragging average calculated
luminance way down.
Images of the issue in PR.
Pull Request: https://projects.blender.org/blender/blender/pulls/127207
When loading an EXR image, first we were allocating memory for it,
then clearing it to zero, then using OpenEXR to load the data. But
the process of loading will overwrite all the pixel values anyway,
so it is pointless to do the first clear.
On a test VSE file that has two 1920x1080 EXR image sequences blended
together, plus some color correction on top, playback framerate of it:
- PC: 12.6 -> 13.2 FPS (Ryzen 5950X, RAM bandwidth ~32GB/s)
- Mac: 27.3 -> 29.5 FPS (M1 Max, RAM bandwidth ~400GB/s)
Pull Request: https://projects.blender.org/blender/blender/pulls/127427
Image/movie strip controls color controls: "Saturation" and "Multiply" were
both single-threaded code. Multi-thread both of them. Timings to apply them
on a 4K resolution byte image, on Ryzen 5950X (Win10/VS2022):
- Saturation: 97ms -> 6.3ms
- Multiply: 11.5ms -> 1.1ms
Pull Request: https://projects.blender.org/blender/blender/pulls/127409
Structure the multires grids PBVH build to be similar to meshes,
splitting face indices into groups instead of grid indices. This
removes one step of indexing, decreases the amount of temporary
data, and allows sharing the majority of the implementation with
the mesh BVH build.
In a test file with 4 million faces at multires level 1, this reduced
BVH build time from 149 to 70 ms. The improvement will be
significantly lower for higher subdivision levels.
Pull Request: https://projects.blender.org/blender/blender/pulls/127429
The interpolation tool computes the point count of output curves as the
maximum of each curve pair. The pairs are ordered by to/from frame
numbers. The point counts were stored in the "original" pair order, so
curve density could be quite incorrect.
Pull Request: https://projects.blender.org/blender/blender/pulls/127353