Speedup the "apply zebra stripes" image loop by multi-threading it.
For non-float images, avoid an extra image copy that was not doing
anything useful.
4K UHD resolution, Windows Ryzen 5950X:
- LDR: whole `sequencer_get_scope` 16.4ms -> 5.3ms, just `draw_zebra`
part: 7.5ms -> 3.3ms
- Float image: whole `sequencer_get_scope` 126.6ms -> 114.1ms, just
`draw_zebra` part: 22.4ms -> 7.4ms. Whole scope is still expensive
due to color management work being done.
Pull Request: https://projects.blender.org/blender/blender/pulls/115622
Defer creating events until the "frame" callback runs to ensure
the tablet state has been fully updated before the events are created.
This also avoids redundant motion events which are now only sent
when the motion/pressure or tilt callbacks run.
Updating NLA menu to be more inline with VSE / other Animation editors.
Remove "Edit" drop down, and instead split operators into "Track" & "Strip" Menus. Update Add menu to be more concise.
Pull Request: https://projects.blender.org/blender/blender/pulls/114805
The position of the vertical value slider has to be clamped to be
within the area of that slider, otherwise it can draw outside the
range when a value is over 1.
Pull Request: https://projects.blender.org/blender/blender/pulls/115680
While in weight paint mode, `ob.vertex_groups.active` can be None.
This happens when selecting a non-deforming bone, or a deforming bone
that doesn't have a group yet.
Now check for this.
Pull Request: https://projects.blender.org/blender/blender/pulls/115666
This operator (`SCULPT_OT_reveal_all`) is redundant with
the "Hide Show" operator (`PAINT_OT_hide_show`). Since
the latter was recently changed to be much faster, remove the
former and update keymaps and menus. The industry compatible
keymap actually already contains the hide/show operator.
Pull Request: https://projects.blender.org/blender/blender/pulls/115629
Move the geometry shading add_operation_node call to
build_object_geometry_datablock.
Avoids triggering an assertion when the same geometry data is shared
by multiple objects.
Pull Request: https://projects.blender.org/blender/blender/pulls/115615
This function is only used in Sequencer code to convert source byte images
into float images. For a "simple case" where there is no color space
conversion needed, it was doing that on a single thread, in two passes over
the image (first byte -> float conversion, then alpha premultiply).
VSE 4K resolution playback, with two image strips where one of them has
"convert to float" option, on Windows / Ryzen 5950X:
- Overall playback FPS: 3.40 -> 4.03. Still very slow, and a lot of time
is spent in allocating, clearing and deleting various temp images, as
well as final color conversion for display.
- `seq_imbuf_to_sequencer_space` part: 217.9ms -> 86.6ms. Most of
remaining cost is just in just memory allocation+clear, which is why
it's not drastically faster due to threading.
Pull Request: https://projects.blender.org/blender/blender/pulls/115628
The experimental GPU compositor crashes when the render size is huge.
This is just due to GPU texture allocation failing. The patch fixes that
by downscaling the render result when reading, then upscaling it again
when writing. Additionally, the render size was adapted to the
downscaled size since it is used by other input nodes. This is not an
ideal solution, but it a good temporary solution to prevent crashes
until we have proper support for huge textures.
Pull Request: https://projects.blender.org/blender/blender/pulls/115299
The compositor doesn't run when changing node tree options. That was due
to a nullptr notifier reference for RNA node tree edits.
This patch uses the node tree ID for the notifier reference.
Additionally, the listener code was extended to always tag the node tree
when the reference is null, which converts missing updates issues like
this one to superfluous updates, since it is safer.
Pull Request: https://projects.blender.org/blender/blender/pulls/115532
This layout is more flexible and polymorphic.
While the worst case is worse (4 + 3 layers),
the common case is more optimized (2 + 2 layers).
The average written closure data is also lower
since we can compact the data for special cases
which are quite frequent.
Some adjustment had to be made in the denoise an
tile classify shaders.
Pull Request: https://projects.blender.org/blender/blender/pulls/115541
Currently, in weight paint mode, there is an icon for
face and vertex selection mode, but there isn't one
for the default mode where the user can select a bone
in any tool by alt clicking.
This lack of indication might lead to confusion for the users
when they are not able to select a bone by
alt clicking during weight painting.
By adding a bone selection icon when there is a pose
mode armature, we can communicate to the user that:
1. they can select a bone while the bone selection icon is active.
(when they are not in face or vertex selection mode)
2. they have forgot to select an armature when entering
weight paint mode by not showing the bone selection
icon at all when there is no pose mode armature.
When the bone selection icon is inactive,
the user can't select a bone.
(alt clicking selects face and vertex mode's respective element)
When no armature is selected when entering weight paint mode,
the bone selection icon doesn't show up indicating that the user
has forgot to select an armature.
(The user is also unable to select a bone by alt clicking.)
## Selection tool for bone selection mode
Currently, while selection tools exist for face and vertex
selection mode, one doesn't exist for the default mode
(bone selection mode). As the default mode will be getting
a clear indicator that it will function as a bone selection mode,
I added a selection tool entry for the bone selection mode.
Face and vertex selection modes has the shortcut 1 and 2,
so it seemed natural to give bone selection mode the shortcut of 3.
Pull Request: https://projects.blender.org/blender/blender/pulls/115409
This PR includes the popup menu used to select a material pressing `U` key.
The menu is used in Draw, Sculpt and Vertex paint mode in GPv2 but this patch only includes Draw mode because other modes are not avaliable in GPv3 yet.
Related to #114203
Pull Request: https://projects.blender.org/blender/blender/pulls/114694
- New Operator: GREASE_PENCIL_OT_layer_hide
- New Operator: GREASE_PENCIL_OT_layer_reveal
- Added menus to Edit and Draw Modes
- Added Keymap via _template_items_hide_reveal_actions()
Note: Operator names were changed for consistency with other layers operators that use _layer_ on their names
Pull Request: https://projects.blender.org/blender/blender/pulls/114348
The constness of the `ImplicitSharingPtr` does not imply the constness of the
referenced data, because that is determined by the user count. Therefore,
`ImplicitSharingPtr` should never give a non-const pointer to the underlying data.
Instead, one always has to check the user count, before one can do a `const_cast`.
Pull Request: https://projects.blender.org/blender/blender/pulls/115652
Avoid reusing the custom data type enum with additional values. Instead
use std::variant and type names to properly distinguish between custom
and generic attribute requests. Use a Vector to hold the requests.
Also attempt to simplify the string key building process for requests
and groups of requests in batches. Previously for every PBVH node it
would rebuild the key 3 times, now it only does it once. It's hard to
measure, but that process did show up in profiles, so performance is
probably slightly improved when many nodes are handled at once.