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
IMB_buffer_byte_from_float for "predivide" case was doing two function
calls per pixel. Make it do the work with one function per pixel.
Do the same in IMB_buffer_byte_from_float_mask.
IMB_buffer_byte_from_float on one thread, running on 4K resolution
image, on Ryzen 5950X (Win10/VS2022): 27.4ms -> 24.4ms
Pull Request: https://projects.blender.org/blender/blender/pulls/127308
In VSE, the default setting is that even float images are all in sRGB
(or rather, display) space. However code that was drawing the final
VSE float image on screen, was first converting it to linear space,
and then back to display space.
An optimization already existed that skipped "no-op" conversions for
byte images. This adds a similar case for float images.
Note: I found a previous fix to an old issue (#39953, commit fe29f92030)
in related code. Probably should be double checked whether it has not
regressed.
VSE at 4K resolution, with a single 4K resolution EXR image strip,
playback on Ryzen5950X (Win10/VS2022):
- Playback average FPS 11 -> 18
- Time for sequencer_preview_region_draw part: 92ms -> 58ms
- Time for sequencer_draw_display_buffer in there: 52ms -> 15ms
Pull Request: https://projects.blender.org/blender/blender/pulls/127305
Prevent actual selection (keeping activation of the bone).
Since `buttons_context_path_bone` / `buttons_context_path_pose_bone` go
after `arm->act_bone` / `arm->act_edbone` to set the context "bone",
"pose_bone" or "edit_bone" -- and that is set no matter what in
`tree_element_bone_activate` / `tree_element_active_ebone__sel` -- we
can set the bone active, not actually select it and the Properties
Editor can still show the relevant info.
Pull Request: https://projects.blender.org/blender/blender/pulls/127235
The encoding of mat3 in std430 was incorrect leading to a drawing
artifact in the direction control of sunlight in sky textures.
The error was that every 3 floats requires an additional float
as each row of the mat3 is aligned to 16 bytes.
Pull Request: https://projects.blender.org/blender/blender/pulls/127246
The approach taken here is really simple: just check if the channel
either is or belongs to an action slot, and if so then reduce the
alpha of its text label if it's unselected and its slot has no users.
Pull Request: https://projects.blender.org/blender/blender/pulls/127257
These icons are extremely order dependent and set dynamically in a
four-way option at:
`rna_object_type_visibility_icon_get_common`
Problem introduced on: 60cc73afe6, when I sorted the non-toggle icons
alphabetically.
Bug reported by Pablo Vazquez in real life.
This PR implements the "Smooth" operator in Weight Paint mode for GPv3.
The Smooth operator smooths the weights in the active vertex group by
applying a gaussian blur to the vertex weights.
The operator has two properties:
- `factor` (0.0 - 1.0): The extent to which the smoothed weight is
applied to the original weight, where 0.0 is 'keep the original weight'
and 1.0 is 'replace fully with the smoothed weight'.
- `repeat`: The number of times the smoothing is executed. A higher
value means more smoothing.
The operator is added to the 'Weight' menu in Weight Paint mode.
Pull Request: https://projects.blender.org/blender/blender/pulls/126429
`frame_at()` returns previous keyframe of which the drawing is visible
at current framec. When previous keyframe is selected, all the intermediate frames
till iteration reach the next keyframe are also exported.
To fix this, look inside `frames()` map instead of `frame_at()`.
Pull Request: https://projects.blender.org/blender/blender/pulls/126779
Each time the face bounds are used after they're initially computed, we
recompute the center of the bounds. We only use the actual bounds to
calculate the bounds of each node to decide how it should be split.
This commit changes to store the bounds centers instead, and just use
the full bounds as a type for the parallel reduction.
In a test with a 16 million face grid on a Ryzen 7840U, I observed a
1.28x decrease in BVH build time, from 1072 to 836 ms.
I didn't apply a similar change to multires grids BVH building because
it's not clear the same bottleneck exists due to the lower ratio of
"primitives" (grids) to final subdivided vertices.
The "simplify" comment copied many times shows that these
aren't helpful-- they waste space and give the wrong impression
about the purpose of code comments.
When I first developed the attribute filters they were just a `FunctionRef`
and thus could be stored by value in this struct. Now that they are a
virtual type, that is not possible anymore.
This commit opts to align the behavior with `vert_neighbors_get_mesh`
which also clears the provided vector instead of leaving it up to the
caller to do so.
Pull Request: https://projects.blender.org/blender/blender/pulls/127273
Raycast and "nearest to ray" use the local vertex indices from triangles
to index original data, which needs to be sized with all the vertices, not
just unique vertices. Add a new function to access that data.
Mouse cursor changes when hovering at the top of popup blocks to
indicate that these can be dragged. On Mac this looks like a hand,
while for other platforms it is a drag cursor.
Pull Request: https://projects.blender.org/blender/blender/pulls/118358
Add multiple "hand" mouse cursors. These are mostly needed for Mac,
which needs open, close, and pointing hand cursors. This also adds
similar for Windows, but just for completeness and testing.
Pull Request: https://projects.blender.org/blender/blender/pulls/127164
Enable deferred parallel batch compilation for image renders.
This replaces the use of the `WM_job` system with a regular thread,
since `WM_job` requires access to the main context,
which is not accessible from the render thread.
It also simplifies the system so it creates a single thread at startup
and deletes it at exit.
Pull Request: https://projects.blender.org/blender/blender/pulls/125005
The code that decides the indentation for channel groups and fcurve channels
already accounted for the difference between the Action Editor and Dopesheet/
Graph Editor, since the level of nesting is different in the Action Editor vs
the other two. However, it didn't account for the difference between legacy and
layered actions, which have different nesting in the Action Editor.
Additionally, before layered actions were introduced it was impossible for
the Action Editor to display channels from e.g. materials, but those channels
can now be displayed in the Action Editor via the slot system. However, the
indentation code was structured such that material (etc.) channels were *always*
indented as if they were in the Dopesheet/Graph Editor, where they're always
nested under the IDs that use them.
This commit fixes the issue by having a separate code path for indenting in the
Action Editor that only indents channel groups and fcurve channels, and which
properly handles the difference between layered and legacy actions.
Pull Request: https://projects.blender.org/blender/blender/pulls/127202
When converting a legacy Action to a layered Action,
also convert group memberships.
This is important for bones to retain their structure in
the Channel Box.
Pull Request: https://projects.blender.org/blender/blender/pulls/127188
This adds layered animation support to the following operators, allowing users to manage the grouping and arrangement of fcurves in the channel list:
- "Group Channels"
- "Ungroup Channels"
- "Move Channels"
Pull Request: https://projects.blender.org/blender/blender/pulls/127080