Commit Graph

130762 Commits

Author SHA1 Message Date
Jaume Bellet 253e328756 patches.py file 2023-12-04 23:39:38 +01:00
Jaume Bellet 685fd732bb rename file 2023-12-04 23:23:28 +01:00
Jaume Bellet 3ac4ce6476 rename id folder 2023-12-04 23:21:12 +01:00
Jaume Bellet 8e4a46918d Merge branch 'bf-blender' into mb-0004-mblender-make-target-linux 2023-12-04 23:15:53 +01:00
Jaume Bellet 00a0e685a8 added files, changes mblender by tornavis 2023-12-04 23:14:42 +01:00
Jaume Bellet c02367cc7d Merge branch 'main' of https://projects.blender.org/blender/blender into bf-blender 2023-12-03 22:19:55 +01:00
Pratik Borhade b1ac047af4 Cleanup: to_bools comment 2023-12-03 15:41:04 +05:30
Harley Acheson 8933284518 UI: Icons for Area Join and Swap
Icons provided by Alexey Adamitsky to represent screen area join and
screen area swap.

Pull Request: https://projects.blender.org/blender/blender/pulls/115712
2023-12-02 20:08:01 +01:00
Harley Acheson da7128c533 Cleanup: Make format
Formatting changes resulting from Make Format
2023-12-02 11:07:25 -08:00
Hans Goudey ccab01f97f Subdiv: Store multires sculpt grid visibility in BitGroupVector
Instead of allocating a separate bitmap per grid for the hide status, store
all the bits in a recently added C++ data structure that stores all bits in one
contiguous memory chunk. When nothing is hidden, nothing is allocated
(that saves 32 MB for a 16 million vertex multires sculpt). Intuitively it
could have better performance because of the cache benefits of
contiguous memory, but this is hard to measure. It also has a nicer
API than `BLI_bitmap`.

I discussed this with Sergey in person recently. Most of the changes are
just straightforward refactors. The part that isn't is a change to the "show/hide"
operator to structure it similarly to the mesh handling in 4e66769ec0.

Pull Request: https://projects.blender.org/blender/blender/pulls/115687
2023-12-02 20:05:29 +01:00
Bastien Montagne 5736f88e31 BKE main: Add 'merge' utils to merge one Main content into another.
This merge does not rename any ID. In case a conflict happens (an ID of
the same name and library already exists in destination Main), its
counterpart in source Main is not moved, and its usages by other
moved-from-source IDs are remapped accordingly.

Libraries are also properly de-duplicated, and remapped as necessary.

Source Main is always freed by this function, since it is either empty,
or contains left-over IDs very likely to have invalid relationships
after the merge.

NOTE: This commit also enables `main_test.cc` unittests, which was
comitted by mistake in fe3cb11ae4, sorry about that.

Pull Request: https://projects.blender.org/blender/blender/pulls/115671
2023-12-02 16:25:02 +01:00
Bastien Montagne 2064af64e5 BKE lib remap: Add option to allow remapping of `ID.lib` pointers.
Usually Library pointers should not be affected by remapping, but this
can be needed in some cases.

WARNING: Use with caution, this is potentially a dangerous operation for
Main data integrity/validity.
2023-12-02 16:10:41 +01:00
Aras Pranckevicius 854840b35f VSE: speedup "show overexposed" option
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
2023-12-02 08:09:49 +01:00
Campbell Barton 7aa3d967ba Build: update wayland protocols to 1.32
Adds cursor-shape-v1 which simplifies setting cursors.
2023-12-02 15:42:21 +11:00
Campbell Barton 8bb6d0ffe0 Unbreak building with Vulkan & WITH_GHOST_X11=OFF
Missing from 5b7175c982.
2023-12-02 15:37:10 +11:00
Campbell Barton 5b7175c982 GHOST: remove X11 include when WITH_GHOST_X11=11 2023-12-02 15:27:51 +11:00
Campbell Barton 95f620fd3d Unbreak build with Vulkan+Wayland+X11
GHOST_ContextVK includes `X.h` which defines "None",
rename to "Unset" to avoid naming conflict.
2023-12-02 15:27:22 +11:00
Campbell Barton 4a735b1d05 GHOST/Wayland: use time-stamps from Wayland input
Resolve double-click events not being registered when there was
a delay between event handling.

Address #40009.
2023-12-02 14:58:49 +11:00
Campbell Barton 35295829e4 GHOST/Wayland: improve tablet event handling
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.
2023-12-02 14:58:49 +11:00
Campbell Barton 32c5ea6262 Cleanup: format 2023-12-02 14:56:12 +11:00
Hans Goudey a7afc5b1e8 Cleanup: Pass PBVH node grid indices as Span 2023-12-01 14:40:14 -05:00
Hans Goudey 380b7c5dc3 Sculpt: Multithread mesh "show all" operation
Continuation of 4e66769ec0. In a test unhiding a small portion
of a 16 million vertex mesh, this halved the time from 10 to 5 ms.
2023-12-01 14:40:14 -05:00
Bastien Montagne 3acb64e7ac BKE_main: move header to be a fully CPP one.
Pull Request: https://projects.blender.org/blender/blender/pulls/115681
2023-12-01 20:38:54 +01:00
Nate Rupsis 2cc6519692 Anim: Refactoring NLA menu into more sensible format
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
2023-12-01 20:11:02 +01:00
Harley Acheson 0fbc3e956f Fix #115601: Clamp Color Picker Vertical Value Slider Position
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
2023-12-01 20:01:22 +01:00
Harley Acheson 1d7ddcc46e Cleanup: Make format
Formatting changes resulting from Make Format
2023-12-01 10:29:59 -08:00
Hans Goudey aae0b71342 Cleanup: Move constant variable declarations outside of loop 2023-12-01 12:41:09 -05:00
Hans Goudey f2ed2b82ce Cleanup: Use const arguments for some paint functions 2023-12-01 12:41:09 -05:00
Philipp Oeser 6d3e9f1fe8 Fix #115276: Vertex group canvas picker errors with no active group
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
2023-12-01 17:55:29 +01:00
Hans Goudey 0978f9486e Sculpt: Remove redundant "reveal all" operator
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
2023-12-01 17:32:09 +01:00
Jacques Lucke 5de86fc4f8 Cleanup: make name more specific for simulations
This is necessary for the bake node (#115466).
2023-12-01 17:13:31 +01:00
Jacques Lucke b7a476ef03 Geometry Nodes: make function for mixing baked data more reusable
The bake node will need this as well (#115466).
2023-12-01 17:13:31 +01:00
Miguel Pozo f3aab25393 Fix: Depsgraph: Avoid duplicated operation nodes on geometry data
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
2023-12-01 16:26:10 +01:00
Aras Pranckevicius f3ce0645e4 Color management: multi-thread IMB_colormanagement_transform_from_byte_threaded simple case
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
2023-12-01 16:18:47 +01:00
Omar Emara 5af7d3e2be Fix #115043: Compositor crashes for huge render sizes
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
2023-12-01 16:16:19 +01:00
Philipp Oeser fe59704b52 UI: enable immediate typing for 'Select Pattern" operator
Saves a click so the "pattern" field has immediate focus.

Pull Request: https://projects.blender.org/blender/blender/pulls/115658
2023-12-01 16:09:56 +01:00
Hans Goudey a86122606c Fix: Crash building sculpt PBVH
Caused by 49f676e6c2. The SubdivCCG pointer was
dereferenced while doing normal face sculpting. Solve by splitting
the function for each PBVH type.
2023-12-01 10:03:05 -05:00
Hans Goudey f69beb4829 Fix: Sculpt drawing ignores hide status
Caused by retrieving the hide status from the wrong mesh.
2023-12-01 10:03:05 -05:00
Christoph Lendenfeld 24ae0e3666 Fix: script_validate_keymap test failed
The issue was that `("value", True)` was passed in
when this is not supported. It didn't break while running
but it did break the test.
2023-12-01 15:32:32 +01:00
Hans Goudey 4c79b87d9a Cleanup: Remove unused threading C-API functions
BLI_task.hh has newer/better equivalents now.

Pull Request: https://projects.blender.org/blender/blender/pulls/115539
2023-12-01 15:29:36 +01:00
Omar Emara 5e370ee643 Fix: Missing compositor update upon changing tree options
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
2023-12-01 15:13:04 +01:00
Clément Foucault fe848ce3ef EEVEE-Next: Optimize GBuffer Layout and writting
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
2023-12-01 14:41:13 +01:00
Clément Foucault 900f9283a3 Cleanup: MTL: Framebuffer: Make code less verbose
and move declaration of attachment closer to its usage.
2023-12-01 14:27:21 +01:00
Jeroen Bakker 2b83fde034 Cleanup: Rename Glossy To Metallic
Pull Request: https://projects.blender.org/blender/blender/pulls/115656
2023-12-01 14:07:27 +01:00
Hans Goudey b292449c1c Cleanup: Solve missing declaration warning for grease pencil operator 2023-12-01 07:58:32 -05:00
Daiki Hashimoto edcac1f48b Fix #44834: Add bone selection icon next to face and vertex selection in weight paint mode
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
2023-12-01 13:38:58 +01:00
Antonio Vazquez cd6c7c4b23 GPv3: Fix compiler warning and format 2023-12-01 13:16:27 +01:00
Antonio Vazquez 11f606f88f GPv3: Menu to Select Material using `U` key
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
2023-12-01 13:12:10 +01:00
Matias Mendiola b8a785b65b GPv3: Show and hide layers operators
- 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
2023-12-01 12:55:30 +01:00
Campbell Barton 36351f3796 Fix missing NULL check from fix for #113059 on Wayland/LIBDECOR
Add missing null check from [0].

[0]: e6c200e94c
2023-12-01 22:07:38 +11:00