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
Fix `typedef struct ActionChannelBag { ... } ChannelBag;` so that the
'typedef name' is also `ActionChannelBag`.
Note that this does _not_ change the struct name in DNA. It's purely for
the naming in our code.
No functional changes.
Interpolate tool was only mixing point attributes, leaving the
output curves without most curve attributes. Now the interpolate_curves
functions actually copy or mix curve attributes as well.
Only float-based attributes are interpolated for now to avoid
meaningless values for material indices, boolean flags, etc. Other
attribute types are simply copied from the first curve in each pair.
Pull Request: https://projects.blender.org/blender/blender/pulls/127350
Clarify the 'disabled' message in the tooltip for certain bone collection
operations. They now tell you to create an override "on the Armature Data",
and not just "on the Armature". This should clarify that it's not enough
to create an override on the armature Object.
Pull Request: https://projects.blender.org/blender/blender/pulls/127405
Support Object > Convert > Mesh option for grease pencil v3.
This does the conversion by first converting it into Curves then use the
same routine to convert Curves into Mesh wires.
Pull Request: https://projects.blender.org/blender/blender/pulls/123835
Pressing ctrl-click should switch the drawing tool into a eraser
for grease pencil. This is now handled by detecting
`EVT_TABLET_ERASER` and switch to `BRUSH_STROKE_ERASE` mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/126962
Vulkan would crash when generating a thumbnail in case there is no
3D viewport in the active workspace. When this happens the front buffer
is downscaled as thumbnail. We didn't create a front buffer as swap
chains are handled differently.
We work around this issue in the same way as Metal does. Create a dummy
front framebuffer and share the surface texture. When the thumbnail
generator reads from the front buffer it will read the data that was
created by the back buffer.
Pull Request: https://projects.blender.org/blender/blender/pulls/127393
Fix a crash that happens when drawing Action groups in the dope sheet, when
Blender is built without experimental features (hence without Action
slots) and it has loaded a blend file with slotted Actions.
Basically a pointer needs to be set to `nullptr` when reading such a file,
as it ensures that the rest of the code treats the group as "from a legacy
Action".
Pull Request: https://projects.blender.org/blender/blender/pulls/127339
Edit mode selection returns incorrect indices. The reason is
that the extent of the area downloaded to the CPU for evaluation was
incorrect and read pixels could not in the place where they are
actually stored.
Was an oversight when fixing face selection. It wasn't that noticeable
there as faces typically cover a larger space.
Pull Request: https://projects.blender.org/blender/blender/pulls/127386
Previously it was assumed that exiting the local-view succeeded
even when nothing was changed.
Now VIEW3D_OT_localview doesn't perform any updates
when existing the local view does nothing.
Entering local-view, then setting an axis via the num-pad and exiting
local view would restore the original axis but not the axis-roll.
Store the axis-roll for local-view & smooth-view operations.
When the viewport orientation matched the view axis,
setting an axis view didn't redraw the region.
This caused the viewport text & grid not to update.
With docking enabled, for Mac hovering over the corner actions zones
shows an open hand cursor, while dragging it uses the closed hand
cursor. For other platforms this just uses the "move" cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/127291
The icons used for the status bar event icons were recently sorted,
resulting in a reversal of the filled/unfilled pairs. This PR makes
them not rely on the order. This also improves the centering of the
text in the buttons. The complaint about the word "Space" is because
this word has a descender. This requires using BLF_boundbox, rather
than BLF_width_and_height to get the position relative to the baseline.
Pull Request: https://projects.blender.org/blender/blender/pulls/127376
Reduce VBO data uploaded to the GPU by a bit less than 2x, at the cost of
creating triangle index buffers. Since the index buffers only need to be
created when topology changes, this means significantly less data needs
to be uploaded to the GPU while sculpting. The hot loops for extracting
mesh data also don't need to access triangles or face visibility, and also
drawing can become more efficient with indices for cached vertex values.
Part of #118145.
Pull Request: https://projects.blender.org/blender/blender/pulls/127351
Make sure all printing happens inside render boundaries
since it needs to read a storage buffer which needs to
record some commands inside command buffers.
Use `std::partition` instead of implementing something similar
ourselves. This is much easier to understand, and it's also much
faster and requires less memory during the build.
I observed a change in the runtime building a 16 million face
BVH from 492 to 389 ms, a 1.27x improvement (with a Ryzen
7950x).
`std::partition` is not multithreaded. I expect there would be
some improvement from multithreading this, at least for the
first few splits.
Currently this only applies to Mesh sculpting.
Pull Request: https://projects.blender.org/blender/blender/pulls/127332
SEQ_modifier_apply_stack is called from exactly one place, and it always
was throwing away the input image, and taking the newly produced image.
Which means, we can stop copying it. Just run the modifiers on the
input image.
In a test file that is HD (1080p) resolution, two EXR image sequences,
adjustment layer with Color Balance, and a text strip on top,
playback framerate (Ryzen 5950X, Win10/VS2022) goes 20.8 -> 22.1 fps
Pull Request: https://projects.blender.org/blender/blender/pulls/127346
When a strip with alpha-over blend mode (which is default) has an alpha
channel and is at the bottom of the whole stack, there's no point in
blending it with black color; the result will be identical.
So stop doing that. Also, whenever some other case happens at the bottom
of the stack (e.g. some other blend mode), create the fake "black input"
image at the needed color type (float or byte) and with the correct
color space already applied. Otherwise, especially for floats, VSE
spends much time converting this fake black input from byte to float,
and then converting it to sequencer color space.
Test case of two EXR files blended over each other, at 4K resolution,
on Ryzen 5950X (Win10/VS2022):
- whole sequencer_preview_region_draw 115ms -> 75ms
- seq_render_give_ibuf part: 64ms -> 24ms
Pull Request: https://projects.blender.org/blender/blender/pulls/127310