Commit Graph

139903 Commits

Author SHA1 Message Date
Jacques Lucke
2e412e683b Tools: improve gdb frame filter for lazy functions 2024-08-08 12:02:00 +02:00
Lukas Tönne
f172b570dd Fix #125922: Interpolation tool should use active material
This was just copying the existing material, should use the active
brush.

Pull Request: https://projects.blender.org/blender/blender/pulls/126046
2024-08-08 11:29:52 +02:00
Lukas Tönne
477d520376 Fix #125895: Brush invert setting was not taken into account for fill
Both the operator and the brush have an "invert" setting for the fill
tool. The operator property is toggled by both editor keymap and modal
keymap, while the brush setting is toggled from UI. Both settings are
combined (i.e. inverting both works like regular fill again).

Pull Request: https://projects.blender.org/blender/blender/pulls/126042
2024-08-08 11:29:05 +02:00
Sergey Sharybin
de10f8513c Libs: Update Python version to 3.11.9
This is to bring all accumulated security updates and bug fixes,
including the ones from Pip.

The bzip2, ffi, and sqlite library version does not seem to have
changed.

Ref #125241

Pull Request: https://projects.blender.org/blender/blender/pulls/125771
2024-08-08 11:20:49 +02:00
Christoph Lendenfeld
a451971026 Fix #124691: Custom bone wire rendering broken on Mac
This issue occurred only on Mac which has to circumvent
geometry shaders lacking support for them.

This patch reverts the vertex shader for Mac devices to
how it was before f9ea64b0ba. (and uses the frag shader from before that commit)
In order to communicate that to the user I added a label
in the GUI when the platform is Mac.

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/125967
2024-08-08 11:19:12 +02:00
Falk David
1899ea25d5 GPv3: Python API: Rename drawing API functions
These functions used the term `curves` when we try to use the
term `strokes` at the user level. Renaming the functions and
the descriptions to be more consistent.
2024-08-08 11:10:33 +02:00
Christoph Lendenfeld
77f75353b0 Anim: Remove empty FCurves from layered Actions
This changes the behavior when deleting the last key of an FCurve on layered actions.
Previously the FCurve would continue to exist, whereas now it is deleted.
This makes it consistent with legacy actions.

I modified the "Clear Keyframes" operator in this PR as well to make it work with layered actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/125327
2024-08-08 11:06:49 +02:00
Jacques Lucke
51f94d6234 Tools: add GDB debug extension
This adds a Python file that can be loaded into GDB to improve the debugging
experience. This is similar to cfb60c98be which
contains a subset of the features provided here. While not being compatible with
other debuggers, specializing on just GDB allows us to use the GDB Python API
which is quite feature rich. Besides adding quite a few pretty-printers, this
also adds some frame filters which simplify backtraces. I've been using the
pretty-printers for quite some time myself already.

I added a basic guide on how to set it up in `blender_gdb_extension.py` but that
only covers the case when using `gdb` directly. If this is accepted, I can add
some more detailed guides on how to configure e.g. vscode to the developer docs.

The patch also contains some type hints for GDB which I wrote, which simplify
working with the GDB API.

Pull Request: https://projects.blender.org/blender/blender/pulls/126062
2024-08-08 10:28:17 +02:00
Anish Bharadwaj
8edae047e8 UV: add "shared vertex" option to "Merge UVs by Distance"
Support merging by distanced for UV's with shared underlying geometry.

This can be useful for welding seams & cleaning up holes without
merging nearby UV's from disconnected vertices.

Ref !124221
2024-08-08 18:05:11 +10:00
Philipp Oeser
5de3de9bf7 Fix: View3D shading RNA paths incomplete/wrong
Somewhat similar to !125365 and !125963 (but more specialized for
View3DShading), this PR adds the missing "areas[x].spaces[x]" subpath to
a 3D Viewport Shading and its properties.

Pull Request: https://projects.blender.org/blender/blender/pulls/126035
2024-08-08 08:41:00 +02:00
Hans Goudey
7f7d85036f Cleanup: Sculpt: Remove unused functions 2024-08-07 22:34:22 -04:00
Hans Goudey
2582858e08 Refactor: Sculpt: Specialize grab active vertex preview
The preview is only supported with deform modifiers which are
only supported for Mesh sculpting, so just write that implementation.
Also remove SculptSession::vert_positions which is now unnecessary.
2024-08-07 22:13:18 -04:00
Hans Goudey
1b29b52f2d Cleanup: Sculpt: Move paint cursor code to C++ namespace 2024-08-07 21:49:23 -04:00
Hans Goudey
5946af3556 Cleanup: Sculpt: Reduce usage of sculpt session positions array
Part of #118145.
Remove some uses of the `SculptSession` array in favor of retrieving
positions as necessary. Because of implicit sharing, avoiding unnecessary
mutable references to data can avoid copies and increased memory usage.
There are still more places to change before sculpt mode recieves that
benefit though.
2024-08-07 21:18:37 -04:00
Hans Goudey
65f97245dc Cleanup: Sculpt: Unify deformed position access
SCULPT_mesh_deformed_positions_get was equivalent to
BKE_pbvh_get_vert_positions which already contains the result
of any deform modifiers. Use the same function to access both
to make it easier to remove both `SculptSession::vert_positions`
and `pbvh::Tree::vert_positions_` in the future.
2024-08-07 21:18:37 -04:00
Hans Goudey
79d6125660 Sculpt: Process all undo nodes at once in position undo/redo
Previously some work for applying shape key positions was
repeated once per undo node which probably made undo/redo
in that case much slower than it should be.
2024-08-07 21:18:37 -04:00
Hans Goudey
4d41be1371 Cleanup: Sculpt: Remove unused active vertex functions 2024-08-07 21:18:37 -04:00
Sean Kim
915be63b01 Cleanup: Simplify topology automasking code
* Removes struct and callback method
* Removes double initialization of custom data layer

Pull Request: https://projects.blender.org/blender/blender/pulls/126067
2024-08-08 00:58:10 +02:00
Sean Kim
034550cc4b Cleanup: Sculpt: Remove unused function
Pull Request: https://projects.blender.org/blender/blender/pulls/126066
2024-08-08 00:53:32 +02:00
Lukas Stockner
90bcc3b5dc Fix #124646: Cycles: Point Density node still works on surfaces in OSL
This was already sort of disabled in 4.0 (in #109712), but still worked in OSL,
so let's make it consistent.

Pull Request: https://projects.blender.org/blender/blender/pulls/125928
2024-08-08 00:48:35 +02:00
Harley Acheson
b63d691570 UI: Allow Changing Alpha for Multicolor Icons
When we use icons that are multi-color, like for Tool icons, we'll
still need the ability to change their alpha at runtime. We do this
for hover effects, and as a theme setting.

Pull Request: https://projects.blender.org/blender/blender/pulls/126063
2024-08-07 23:28:17 +02:00
Jonas Holzman
6bb2e5a691 WM API: Improve naming of WM_window_pixels_* functions
The WM API has WM_window_pixels_{x,y,coords}` functions that returns the
window size/point coordinate in the host native pixel size.

As "pixels" in itself doesn't really mean anything the intent of
these functions wasn't really clear. To clarify this, this commit
renames their prefix from `WM_window_pixels_` to
`WM_window_native_pixel_`.

Pull Request: https://projects.blender.org/blender/blender/pulls/125994
2024-08-07 22:30:31 +02:00
Hans Goudey
ecc3d1db4e Refactor: Sculpt: Refactor surface smooth mesh filter
Part of #118145.

Pull Request: https://projects.blender.org/blender/blender/pulls/126061
2024-08-07 22:17:06 +02:00
Hans Goudey
ebcdfeb77e Refactor: Sculpt: Refactor sharpen mesh filter
Part of #118145.

Pull Request: https://projects.blender.org/blender/blender/pulls/126059
2024-08-07 21:39:05 +02:00
Sean Kim
e16e07b2da Refactor: Introduce typed version of SculptSession#active_vertex
Part of #118145.

Uses std::variant (and std::monostate to represent no value) to hold the
current active vertex type among the three different concrete types.

Pull Request: https://projects.blender.org/blender/blender/pulls/126000
2024-08-07 21:17:42 +02:00
Hans Goudey
51152cec30 Refactor: Sculpt: Inline cube brush tip distance test
Part of #118145.
2024-08-07 14:09:02 -04:00
Sean Kim
34d71b8088 Refactor: Sculpt: Remove flood_fill add_active methods
This single extra layer of abstraction for these elements doesn't add
much to the API as accessing the current active vertex is a single call.

Pull Request: https://projects.blender.org/blender/blender/pulls/126011
2024-08-07 19:45:40 +02:00
Sean Kim
50b5b4678b Refactor: Sculpt: Extract pose brush preview data
Removes the SculptPoseIKChain and SculptPoseIKChainSegment structs from
BKE_paint.hh, substituting them for the bare minimum vertex data needed
to draw the overlay using the pose brush.

Moves the needed structs into sculpt_intern.hh, ideally they should be
local to sculpt_pose.cc, but the chain is needed in StrokeCache, so
further refactoring is needed before it can be reduced in scope.

Pull Request: https://projects.blender.org/blender/blender/pulls/126009
2024-08-07 19:21:35 +02:00
Hans Goudey
a9d318d2f3 Fix #124292: GPU subdivision loose edges crash
There were two issues. One was that the normals VBO wasn't created
with the correct size. The other was that there were empty VBOs created
which can apparently also cause crashes.

Pull Request: https://projects.blender.org/blender/blender/pulls/126041
2024-08-07 19:11:23 +02:00
Sean Kim
998712ba2e Cleanup: Sculpt: Move SculptBoundary struct
Moves SculptBoundary out of BKE_paint.hh and into sculpt_intern.hh

Like other cached data, this ideally should not be this exposed, but
reducing its inclusion in any other file that uses BKE_paint.hh is a
good start.

Pull Request: https://projects.blender.org/blender/blender/pulls/126010
2024-08-07 19:08:57 +02:00
Sean Kim
a512afe9b5 Cleanup: Sculpt: Remove unnecessary const in function declarations
Pull Request: https://projects.blender.org/blender/blender/pulls/126004
2024-08-07 19:08:09 +02:00
Sean Kim
febdb2f487 Cleanup: Remove unused headers in sculpt header files
Pull Request: https://projects.blender.org/blender/blender/pulls/126002
2024-08-07 19:06:55 +02:00
Hans Goudey
636b3b1b64 Cleanup: Sculpt: Simplify cube brush falloff math
Ever since b6a76243cd there was some redundant math
that just ended up with the value 1. Factor that out to simplify the code,
making future refactors cleaner.
2024-08-07 12:46:45 -04:00
Hans Goudey
8d209d9f62 Cleanup: Sculpt: Remove duplicate clipping test
The callers of `calc_brush_cube_distances` test region clipping
separately already.
2024-08-07 12:27:24 -04:00
Sergey Sharybin
f1e82c99b9 Fix: Division by zero in Cycles render scheduler 2024-08-07 18:24:19 +02:00
Clément Foucault
da92505c7d Overlay-Next: Anti-Aliasing
Straight-forward port except for the frame-buffers and textures
management. This will be described inside the documentation.

Rel #102179

Pull Request: https://projects.blender.org/blender/blender/pulls/125984
2024-08-07 17:35:24 +02:00
Clément Foucault
f98bf61eac Fix: GL: IndexBuf: Out of bound copy during indices upload
The padded size was using for the data upload.
Now decouple the data specification and the upload.
2024-08-07 17:26:55 +02:00
Alaska
6b522c5e30 Fix #125307: Precision issues with MetalRT
Reverts a change in 5508b41a40 that
disabled ray offsetting on MetalRT, which lead to rendering artifacts
in scenes far away from the origin.

Pull Request: https://projects.blender.org/blender/blender/pulls/126003
2024-08-07 17:20:09 +02:00
Sergey Sharybin
06ce65d3b6 Fix: Crash in sequencer tests after recent commit
Also run clang-format on the file.

Ref #125947
2024-08-07 17:03:21 +02:00
David Murmann
df4df3cd52 Fix #114940: Cycles: GGX roughness has abrupt cutoff
This decreases BSDF_ROUGHNESS_SQ_THRESH so that the microfacet
roughness has a cutoff at much lower values and fixes a precision
issue in the bsdf_sample code that prevented this previously.

Pull Request: https://projects.blender.org/blender/blender/pulls/125919
2024-08-07 16:53:07 +02:00
Clément Foucault
04ae9ffd7f GPU: Add assert on zero sized VBOs
These can create GL errors that are not reported
appropriately.
2024-08-07 16:31:44 +02:00
Clément Foucault
e7c20e99df GPU: Add padding bytes to VBO and IBO
This is to avoid any issue with buffer alignement
and out of bounds reads when using these buffers
in compute shader or with vertex attribute fetch.
2024-08-07 16:31:44 +02:00
Clément Foucault
88d4b4097c OSD: Guard unneeded buffers behind defines
Fix unused buffer errors.
2024-08-07 16:31:43 +02:00
Aras Pranckevicius
bcacb01d34 Cleanup: Make more VSE functions use const arguments where they can
SEQ_transform_sequence_can_be_translated, SEQ_transform_single_image_check,
SEQ_can_use_proxy can all trivially take const Sequence argument.

Made SEQ_give_frame_index take const Sequence too, by removing the
"modify seq strobe to be at least 1.0" code. The strobe itself is only
ever used inside the same function, and is already guarded by
"is strobe > 1.0" check.

Original code seems to be coming all the way from 2009 with
commit message "2.5. 12k lines of sequencer back!" (03fc5696dc).

Pull Request: https://projects.blender.org/blender/blender/pulls/126021
2024-08-07 15:53:06 +02:00
Richard Antalik
5ecb70964e Fix #125490: Scene strip incorrectly rendered as solid view.
Prevent VSE cache returning image when running render job.

Previously, before render job was started, cache was cleared, but since
disk cache is not cleared, it returned an image. Now cache is not
cleared, but it does not return or store images when rendering.

Pull Request: https://projects.blender.org/blender/blender/pulls/125947
2024-08-07 15:22:37 +02:00
Pratik Borhade
5a9fe638de Fix #125935: Insert unicode text popup not working
Likely caused by 7d80fde033
Set `handle->can_refresh=false` to prevent refreshing the block
during text edit.

Pull Request: https://projects.blender.org/blender/blender/pulls/125943
2024-08-07 13:13:20 +02:00
Jacques Lucke
5861b078f7 Core: rename ID.flag and ID.tag values
Previously, values for `ID.flag` and `ID.tag` used the prefixes `LIB_` and
`LIB_TAG` respectively. This was somewhat confusing because it's not really
related to libraries in general. This patch changes the prefix to `ID_FLAG_` and
`ID_TAG_`. This makes it more obvious what they correspond to, simplifying code.

Pull Request: https://projects.blender.org/blender/blender/pulls/125811
2024-08-07 12:12:17 +02:00
Sergey Sharybin
35198ec363 Fix: Typo in the OptiX ttests lbocklist 2024-08-07 11:46:58 +02:00
Sergey Sharybin
0aab484dd8 Cleanup: Unused constants in PBVH pixels 2024-08-07 11:15:38 +02:00
Philipp Oeser
e7979317ec Fix #122163: Image Editor ImageUser RNA paths incomplete/wrong
Somewhat similar to !125365 (but more specialized for ImageUser), this
PR adds the missing "areas[x].spaces[x]" subpath to an Image Editor
ImageUser.

Pull Request: https://projects.blender.org/blender/blender/pulls/125963
2024-08-07 11:12:47 +02:00