Commit Graph

110841 Commits

Author SHA1 Message Date
Falk David
8f64329c79 Refactor: Use newer attribute API in create_liquid_geometry
The `create_liquid_geometry` still used the older attributes
API to write the velocities.
This replaces the use of `BKE_attribute_new` with
the newer attribute API.
No functional changes expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123854
2024-06-27 20:39:30 +02:00
Sergey Sharybin
d16eac9cee Merge branch 'blender-v4.2-release' 2024-06-27 19:57:51 +02:00
Hans Goudey
e1ca54c52a Fix #123768: Sculpt: Crash on undo with multires 2024-06-27 13:54:01 -04:00
Falk David
a0f0a4dd49 Cleanup: Remove BKE_attribute_allow_procedural_access
This function was already replaced by `bke::allow_procedural_attribute_access`.
Removes the rest of the usages.

Pull Request: https://projects.blender.org/blender/blender/pulls/123852
2024-06-27 19:20:04 +02:00
Miguel Pozo
baf07c22bd Revert "Fix #123794: Crash when UDIMs have gray and color tiles"
This reverts commit 095e78bd28.
2024-06-27 19:15:55 +02:00
Miguel Pozo
095e78bd28 Fix #123794: Crash when UDIMs have gray and color tiles 2024-06-27 19:14:48 +02:00
Michael Kowalski
b2f8f5a491 Fix: USD import: domelight Y-up orientation
Added necessary rotation to convert from Y-up to Z-up when
importing USD dome lights as world materials.

Pull Request: https://projects.blender.org/blender/blender/pulls/123797
2024-06-27 19:06:49 +02:00
Sergey Sharybin
e75dfaf17b Merge branch 'blender-v4.2-release' 2024-06-27 18:40:48 +02:00
Sergey Sharybin
32588169d3 Fix: Initialization of paint mode fails in certain files
It is possible that the file does not have Grease Pencil paint
yet, leading to a crash in the BKE_paint_init().

The simple fix is to swap the order of acquiring the paint
pointer and the code which ensures that this paint exists.
2024-06-27 18:40:04 +02:00
Campbell Barton
a8fae77f10 Cleanup: remove unused icon utilities and make convenience target
Remove utilities to assist in creation of the now removed `*.dat` icons.

Pull Request: https://projects.blender.org/blender/blender/pulls/123837
2024-06-27 18:28:32 +02:00
Hans Goudey
9584f8fb55 Cleanup: Sculpt: Fix misleading naming of grids index buffer functions 2024-06-27 11:28:50 -04:00
Hans Goudey
dc70f454b7 Cleanup: Sculpt: Extract vertex buffer filling into separate functions
This makes future diffs in this area smaller since filling each node's
data won't change, but the surrounding infrastructure is likely to.
2024-06-27 11:28:49 -04:00
Hans Goudey
1453136ad0 Cleanup: Sculpt: Simplify drawing visible face counting 2024-06-27 11:28:49 -04:00
Christoph Lendenfeld
98939c29d4 Merge branch 'blender-v4.2-release' 2024-06-27 17:00:03 +02:00
Christoph Lendenfeld
f3b393a74a Fix #123738: Keyframe drawing issue while duplicating keys
The issue was introduced with f06fd85d97 where the building of the keylist used was
restricted to the visible range of the dope sheet.
The optimization uses `BKE_fcurve_bezt_binarysearch_index` which can only work when
the FCurve is sorted. During transformations in the dope sheet this is not the case as the
sorting only happens when the transformation is applied.
The fix is to do a range check in the for loop instead of a binary search.
Testing the range comes with a performance impact though.

| Before optimization | broken with f06fd85d97 | this PR |
| - | - | - |
| 90ms | 6ms | 20ms |

An alternative solution would be to sort FCurves during transformations of the Dope Sheet.
This is done in the Graph Editor and with the recent speedups introduced there this could be
a viable option. However this is out of scope for this fix.

Pull Request: https://projects.blender.org/blender/blender/pulls/123824
2024-06-27 16:50:44 +02:00
Jeroen Bakker
e72e538fdd Vulkan: Fix sequential read hazard
When a buffer resource was read, and after that read from another
shader stage it would not generate the appropriate pipeline barrier.

This is fixed by keeping the last write action around and check
if the shader stage was already included in the previous barriers.

Pull Request: https://projects.blender.org/blender/blender/pulls/123845
2024-06-27 15:53:14 +02:00
Hans Goudey
15ef372567 Merge branch 'blender-v4.2-release' 2024-06-27 09:31:14 -04:00
Hans Goudey
8945b7e49a Fix #123809: Sculpt visibility invert missing PBVH node update
Caused by 1a37017244
2024-06-27 09:29:45 -04:00
Christoph Lendenfeld
ef8f14f3d6 Fix #90923: Bone Stick active color
The `Stick` drawing mode for armatures was overriding the colors,
meaning it ignored bone colors specified by the user and also didn't use
the correct color for selected vs active.

Pull Request: https://projects.blender.org/blender/blender/pulls/123544
2024-06-27 15:23:43 +02:00
Bastien Montagne
adfe688046 Fix another batch of mismatches MEM_new/MEM_freeN cases in UI/Assets code. 2024-06-27 15:01:37 +02:00
Hans Goudey
643334b727 Sculpt: Resolve over-allocation of multires draw vertex buffers
The "verts per grid" calculation was wrong for the non-flat/indexed
vertex buffer layout used for smooth shading. For example, for a
multires subdivision level of 8, each PBVH node's vertex buffers
were 3 times larger than they needed to be.

Pull Request: https://projects.blender.org/blender/blender/pulls/123808
2024-06-27 14:58:58 +02:00
Hans Goudey
83a15be109 Sculpt: Improve multires drawing performance by simplifying logic
Combined with previous logic, this roughly doubles the performance of
sculpt-mode multires draw vertex buffer extraction in my simple test.
That measurement is for when we initially enter sculpt mode when the
VBO creation is single threaded. Otherwise in my testing the copying
was bound by memory bandwidth and the improvement was smaller.
2024-06-27 14:58:56 +02:00
Hans Goudey
7cf9854938 Sculpt: Avoid vertex buffer access overhead for multires drawing 2024-06-27 14:58:56 +02:00
Hans Goudey
b013eed967 Sculpt: Remove double function call indirection in multires drawing
The nested function pointers were very confusing and bad for performance.
2024-06-27 14:58:56 +02:00
Jeroen Bakker
3009c98d5f Vulkan: Fix read-after-write hazard in draw manager visibility
Draw Manager visibility compute shader triggered a read-after-write
hazard. This root cause was that the incorrect access was read from
the shader interface. It was set to none, skipping the needed pipeline
barrier.

Pull Request: https://projects.blender.org/blender/blender/pulls/123839
2024-06-27 14:55:15 +02:00
Richard Antalik
fb2e712991 VSE: Clarify wording for Replace Selection property 2024-06-27 14:53:57 +02:00
Falk David
84e5de3327 Fix: GPv3: Crash in grease_pencil_object_cache_populate
This was due to wrong indexing into `num_triangles_per_stroke` and
`num_vertices_per_stroke`. We were using the the index of the stroke
in the drawing instead of the index into the `visible_strokes` mask.
2024-06-27 13:54:05 +02:00
Omar Emara
6f06e2258f Image: Clarify color depth tooltip for EXR images
Clarify the tooltip for the half float color depth property for EXR
images to indicate that it doesn't affected data passes and that they
will still be saved as full float.
2024-06-27 14:29:44 +03:00
Jeroen Bakker
e9cba0e588 Fix #123670: EEVEE: Add support for new grease pencil type
EEVEE didn't support the new grease pencil object type. Which would
not output the depth texture when overlays where turned off.

Pull Request: https://projects.blender.org/blender/blender/pulls/123816
2024-06-27 13:24:37 +02:00
Bastien Montagne
6aa6aee2d5 Reapply "Fix (unreported) Assets: MEM_new/MEM_freeN mismatch usages."
This reverts commit cb76781be7, and fixes
the issues from original da05bff96c commit (missing initialization
of a pointer in copy constructor in some cases, and forgot to handle
one allocated string in the move constructor).

Many thanks to @julianeisel for finding the actual issues here.
2024-06-27 12:20:49 +02:00
Bastien Montagne
cb76781be7 Revert "Fix (unreported) Assets: MEM_new/MEM_freeN mismatch usages."
This commit causes crashes when opening a second blendfile (attempt to
free already freed data).

This reverts commit da05bff96c.
2024-06-27 11:05:48 +02:00
Bastien Montagne
da05bff96c Fix (unreported) Assets: MEM_new/MEM_freeN mismatch usages.
This one was a bit more involved than the previous ones, since the
mismatch was intentional here, and happened on a non-trivial type.

It was done because the new object (managed by the `unique_ptr`) steals
the internal data of the original object. Calling `MEM_delete` (and
therefore the destructor of the `AssetMetaData` object) would then lead
to access-after-free and double-freeing errors.

This is addressed by adding two new 'copy' and 'move' constructors to this type.

The copy one ensures that deep-copy of internal data happens as expected, and
allows to simplify greatly the code in `BKE_asset_metadata_copy`, which
becomes a mere wrapper around it.

The move one allows `make_unique` to properly steal (and clear) the internal
data of the source object, which can then safely be deleted.

Pull Request: https://projects.blender.org/blender/blender/pulls/123693
2024-06-27 09:44:22 +02:00
Sean Kim
99c75beabf Cleanup: Silence unused variable warning
Pull Request: https://projects.blender.org/blender/blender/pulls/123806
2024-06-27 04:43:19 +02:00
Sean Kim
11d0a9db1b Fix: Build error from missing change in recent commit
Pull Request: https://projects.blender.org/blender/blender/pulls/123805
2024-06-27 04:36:09 +02:00
Sean Kim
1a392104c3 Cleanup: Sculpt: Add BLI_NOINLINE to mask.cc helper methods
Pull Request: https://projects.blender.org/blender/blender/pulls/123804
2024-06-27 04:18:21 +02:00
Sean Kim
0bc7631693 Sculpt: Initial data-oriented refactor for clay brush
Part of #118145.

Performance after this change results in an 119% speedup. This is
measured on the fucntion `stroke_update_step` on a mesh with 24k verts
across 5k instances of the function being timed. In absolute values,
this represents a 0.06ms speedup, from 0.38ms to 0.32ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/123751
2024-06-27 04:07:10 +02:00
Sean Kim
6b7255b978 Refactor: Sculpt: Use return value instead of reference for orig_data
Pull Request: https://projects.blender.org/blender/blender/pulls/123755
2024-06-27 01:42:14 +02:00
Harley Acheson
eed83b56d2 UI: Calm Warnings With New Icons
Just calming warning with unused argument and
missing switch default.

Pull Request: https://projects.blender.org/blender/blender/pulls/123802
2024-06-27 01:35:45 +02:00
Sean Kim
9d4d1aea98 Sculpt: Add stroke stabilization to lasso tools
This PR adds stroke stabilization settings for the Sculpt mode lasso
tools:
* Mask
* Hide
* Trim
* Face Set

Only Sculpt tools have a user facing change, even though this was
implemented in `WM_gesture_lasso_modal` and related methods. Other
modes may choose to add these settings and toggles.

## Implementation
The implemented functionality is similar to the Annotate tool in both
interpolation of the new point and drawing the UI hint that
stabilization is happening.

The `radius` and `factor` properties have similar bounds as the same
Brush properties. All values are stored on a per-operator level, not on
a scene or otherwise global tool level.

Based off of [1].

[1] - https://blender.community/c/rightclickselect/ZWG5/

Pull Request: https://projects.blender.org/blender/blender/pulls/122062
2024-06-27 01:32:09 +02:00
Harley Acheson
8da3b74ee2 Cleanup: Remove Unneeded Old Icon-Related Files
Remove some unused icon-related files. alert_icons.*, blender_logo.png,
prvicons.*

Pull Request: https://projects.blender.org/blender/blender/pulls/123799
2024-06-27 01:18:13 +02:00
Hans Goudey
4d29e1dccb Refactor: Sculpt: Remove some constants from PBVH
The aim is to simpliofy the construction of a PBVH and to reduce
the breadth of its responsibilities.
2024-06-26 17:17:01 -04:00
Hans Goudey
c365daaedb Cleanup: Sculpt: Remove another unused PBVH variable 2024-06-26 16:53:49 -04:00
Hans Goudey
d3d9be486b Cleanup: Sculpt: Remove unused PBVH draw cache status variables 2024-06-26 16:47:32 -04:00
Harley Acheson
b7256b1ea7 UI: Use SVG Icon for Logo in Splash About
Use new SVG icon the "Blender" logo shown on the About screen. Allows
removal of blender_logo.png and no need for 1024x256 bitmap. Instead it
is made at exact requested size. This PR updates blender_logo_large.svg
because the (R) in it is not a stroke or path, but actual text - not
rasterized by Nano.

Pull Request: https://projects.blender.org/blender/blender/pulls/123790
2024-06-26 22:43:59 +02:00
Harley Acheson
5c377686e7 UI: Use SVG Icons for Alert Icons on Dialogs
Use new SVG icons in place of current "Alert" icons, used on dialogs
and confirmations. No need for alert_icons.svg, alert_icons.png,
alert_icons_update.py. Also looks better as they are made at exact
requested size instead of 256x256 then scaled down to display.

Pull Request: https://projects.blender.org/blender/blender/pulls/123786
2024-06-26 20:54:20 +02:00
Brecht Van Lommel
d9bd35c4bc Cleanup: make format 2024-06-26 20:39:01 +02:00
Harley Acheson
fe4c7c4178 UI: Consistent Status Bar Spacing
Drawing operator keymap information on the status bar is sometimes
custom and and sometimes automatic. This PR just make the automatic
display have the same spacing as custom. Slightly tighter with a
greater proportion of space between items than between an item's
icon and text.

Pull Request: https://projects.blender.org/blender/blender/pulls/123785
2024-06-26 20:29:48 +02:00
Hans Goudey
aa4c42958d Fix: Sculpt: Anchored brush "restore" broken for refactored brushes
Currently the "Anchored" stroke option doesn't work on the refactored
brushes. That's because the previous implementation used the combination
and application of proxies to restore to the previous position stored in the
undo step. The new brushes don't use proxies for performance reasons,
so the restoration of shape keys and original positions didn't happen.

Now, fully restore the original positions of shape keys and mesh original
positions. This method is quite simple since it uses the same mechanism
brushes use to change that data.

Pull Request: https://projects.blender.org/blender/blender/pulls/123783
2024-06-26 20:10:43 +02:00
Harley Acheson
992e47bc45 Fix #123675: Use ICON_TYPE_MONO_TEXTURE Icons for Error Conditions
VSE is drawing error icons on strips using icons of type
ICON_TYPE_COLOR_TEXTURE, using the regular icon texture, which is
no longer used for standard icons. This PR changes this to use regular
UI_icon_draw_ex() here instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/123700
2024-06-26 19:52:10 +02:00
Bastien Montagne
f6358f6e71 Merge branch 'blender-v4.2-release' 2024-06-26 19:28:22 +02:00