139359 Commits

Author SHA1 Message Date
Pratik Borhade
c7ecaf67fd Fix #124906: GPv3: Eraser crash when pressure is enabled
This is due to uninitialized `curve_strength` table. It is either
initialized for active tool or the eraser (if ctrl is held). So fix is
to choose correct brush in execute() function.

Also fix the inverted condition in begin() function to choose
eraser brush.

Pull Request: https://projects.blender.org/blender/blender/pulls/124975
2024-07-18 13:33:08 +02:00
Bastien Montagne
1144235e90 Cleanup: VSE Copy/Paste: Use new SET_CLIPBOARD_MARK operation. 2024-07-18 12:52:45 +02:00
Bastien Montagne
74a279ebc7 Cleanup: VSE copy/paste: Simplify namespace handling. 2024-07-18 12:52:45 +02:00
Bastien Montagne
7a87233c85 PartialWriteContext: add the 'clipboard mark' new operation option.
This is used by ID copy/paste code to detect which IDs from a copy/paste
buffer can be used as paste source.

Also slightly refactor implementation to handle both fake/extra ID user,
and clipboard mark in the same utils function.
2024-07-18 12:52:45 +02:00
Falk David
0c6365ecad Fix: GPv3: Crash switching to weight paint mode
The issue was that `BKE_paint_get_active_from_paintmode`
was called before `BKE_paint_ensure`.
2024-07-18 12:30:57 +02:00
Sebastian Parborg
81ee5c0313 Fix: VSE strip offsets were not drawn correctly
The code used a hack to work around a quirk that was fixed in 7b25d1327e.
Update the code to work properly (now also with sound offsets)

Pull Request: https://projects.blender.org/blender/blender/pulls/124972
2024-07-18 11:59:39 +02:00
Sybren A. Stüvel
7360ce4bcc Anim: add RNA code for ChannelBags
RNA API for creating & removing channelbags, as well as a path function
to construct RNA paths for channelbags.

```python
action = bpy.data.actions.new('TestAction')

slot = action.slots.new()
slot.name = 'OBTest'

layer = action.layers.new(name="Layer")
strip = layer.strips.new(type='KEYFRAME')

# New in this commit:
channelbag = strip.channelbags.new(slot)
strip.channelbags.remove(channelbag)
```

Pull Request: https://projects.blender.org/blender/blender/pulls/124793
2024-07-18 11:14:15 +02:00
nutti
3ecfa5659e PyDocs: distinguish between tuple and union data types
Ref: !124879
2024-07-18 15:39:04 +10:00
Campbell Barton
5a29b16974 Cleanup: spelling in comments 2024-07-18 15:24:27 +10:00
Campbell Barton
5b2771cd0c Cleanup: replace copy-by-value with const reference
This was changed in [0] & [1] when replacing `float[3]` with `float3`.
However copying by value wasn't needed for the fix.

[0]: 7249b78b6b669fcce27839b443455baa61d6c2a9
[1]: efd3c4b3c943c37e44841e2366caacc47f1a118c
2024-07-18 15:17:12 +10:00
Campbell Barton
c1deaeb57a Cleanup: quiet compiler warning with LIBDECOR disabled 2024-07-18 15:10:45 +10:00
Guillermo Venegas
604dc2cc33 Fix #124931: Fix crash dropping images in overlapping regions
Ref: !124921
2024-07-18 14:57:58 +10:00
Harley Acheson
e802fe1433 UI: Screen Area Docking Experimental Feature
Improvements to Area maintenance, adding the ability to move and dock
areas to any location, including between multiple windows. Allows
transitioning between splitting, joining, moving, and docking without
early commit. Improved visual feedback. Design Doc #124915. Added
as experiment feature.

Pull Request: https://projects.blender.org/blender/blender/pulls/123414
2024-07-18 02:47:32 +02:00
Sean Kim
7104813d31 Cleanup: Add copyright to sculpt_flood_fill.cc
Missed in 76a1e19

Pull Request: https://projects.blender.org/blender/blender/pulls/124942
2024-07-18 02:06:17 +02:00
Harley Acheson
0b70a9edc5 Fix: Do Not Reload File Browser Params in fileselect_refresh_params
Fix #124827 for Bug #124771 adds a call in fileselect_refresh_params to
ED_fileselect_set_params_from_userdef. But fileselect_refresh_params is
not just called from file_init but also file_refresh, which is far too
often and keeps some options from being selected. This moves
ED_fileselect_set_params_from_userdef directly to file_init.

Pull Request: https://projects.blender.org/blender/blender/pulls/124938
2024-07-18 01:28:31 +02:00
Harley Acheson
6240a36d18 Refactor: Icon Type ICON_TYPE_MONO_TEXTURE to ICON_TYPE_SVG_MONO
A rename of the icon type ICON_TYPE_MONO_TEXTURE to ICON_TYPE_SVG_MONO
to better reflect the underlying function. This new name makes a nice
matched set with new ICON_TYPE_SVG_COLOR used for SVG in full color.

Pull Request: https://projects.blender.org/blender/blender/pulls/123957
2024-07-17 22:15:09 +02:00
Harley Acheson
6145920a0d UI: Allow Use of Full-Color UI Icons
Allow the optional use of SVG UI icons shown in full color by
changing their definition from DEF_ICON to DEF_ICON_COLOR.

Pull Request: https://projects.blender.org/blender/blender/pulls/124696
2024-07-17 20:13:17 +02:00
Clément Foucault
a882473f38 EEVEE: Update render tests 2024-07-17 18:31:37 +02:00
Harley Acheson
a63a15527d Fix #124771: Allow Back Button When File Browser Loaded in Workspace
If File Browser is opened while embedded into a blender window, as
apposed to opened in a new window, some initialization is not done
and the current directory is not added to the list of previous
folders. Therefore the "back" button cannot bring you back to the
initial folder. This happens if your layout contains a File Browser
editor, like when selecting New / Video Editing. This PR just adds
`ED_fileselect_set_params_from_userdef` to `fileselect_refresh_params`,
which is called from `file_init()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/124827
2024-07-17 17:54:13 +02:00
Bastien Montagne
3d3fb3dcce Fix: BKE: PartialWrite: Wrong define used in masked-in values.
`DUPLICATE_DEPENDENCIES` was wrongly used instead of `ADD_DEPENDENCIES`,
the former should be considered a non-modifiable option for a whole
'add' operation. But the per-ID-usage callback should be able to force a
dependency to be added or cleared.
2024-07-17 17:46:54 +02:00
Weizhen Huang
4000e1f2f2 Fix: EEVEE materials with three closures render black on MacOS
somehow the compiler is struggling with `default:` in `switch`, even if
it's never reached.
This fixes the discrepancy in the `principled emission alpha` test.

Pull Request: https://projects.blender.org/blender/blender/pulls/124889
2024-07-17 17:37:18 +02:00
Weizhen Huang
275d90f2b0 Fix: EEVEE missing break in switch case
this was working because the following cases overwrite the previous set,
but it's still better to have a `break`.
2024-07-17 17:27:16 +02:00
Bastien Montagne
da59808ce1 RNA: Add comment about recent change to references for extern'ed PropertyRNA.
Comment about why change from faf56cc3bf was needed, and what are the
consequences (regarding type aliasing).
2024-07-17 17:20:03 +02:00
Alaska
2724f296b2 Render test: Add option to ignore block list
Add a option to ignore Cycles render test black list, controlled via
BLENDER_TEST_IGNORE_BLOCKLIST environment variable.

Useful for testing to see if anything is seriously broken in a test
that's black listed. (E.g. See if some particle rendering tests are
seriously broken on the GPU)

It would be recommened that this be used to test GPU compiler updates.
Or the enablement of certain features like custom curve rendering on
custom BVH.

Pull Request: https://projects.blender.org/blender/blender/pulls/124662
2024-07-17 16:59:25 +02:00
Laurynas Duburas
85f8161ef7 Overlay-Next: Lattice
Overlay-Next version of Lattice.

Rel #102179

Co-authored-by: Clément Foucault <foucault.clem@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/123398
2024-07-17 16:49:38 +02:00
Sergey Sharybin
389b322975 CMake: Add buildbot configuration for all platforms
It allows to more easily override cmake options which we want to
be enabled on the buildbot.

In a way it was possible to do via the pipeline config, but this
change provides a more natural way for Blender developers to set
CMake configuration which is to be enabled on buildbot, but not
on local developer machines.

Pull Request: https://projects.blender.org/blender/blender/pulls/124892
2024-07-17 16:48:18 +02:00
Laurynas Duburas
a412268980 Fix: Overlay-Next when multiple objects are click selected
Fixes Overlay-Next selection when multiple objects are hit.

To reproduce:
- enable "Ovlay Next" in Preferences>Experimental
- create any Empty object and duplicate it without moving
- try to select by clicking them

Crash occurs because `mixed_bones_object_selectbuffer` in `view3d_select.cc` expects that `view3d_opengl_select_ex` will append results to `buffer`. Depending on situation after several `view3d_opengl_select_ex`calls with decreasing radius it tries to `slice` results from buffer:
```c
has_bones9 = selectbuffer_has_bones(storage.as_span().slice(ofs, hits9));
```

Pull Request: https://projects.blender.org/blender/blender/pulls/124154
2024-07-17 16:07:15 +02:00
Campbell Barton
80f0c613c0 Fix #123096: Opening & closing a window freezes Blender under Wayland
Skipping window decoration creation apparently resolves the freeze,
although I'm unable to redo this on my system.
2024-07-17 23:59:18 +10:00
Hans Goudey
6c2e998e7f Cleanup: Sculpt: Avoid deformation flushing call for non-deforming tools 2024-07-17 09:57:25 -04:00
Hans Goudey
2f4926d6e7 Fix: Sculpt: Avoid unnecessarily creating layer displacement factor array
When using the persistent base feature, the separate array isn't necessary.
2024-07-17 09:57:25 -04:00
Jeroen Bakker
31a045ba15 Vulkan: Faster hashing of fragment shader
Improving performance as hashing the fragment shader was visible
in performance analysis. This PR calculates the hash once and stores
it inside the struct for quick access.

Pull Request: https://projects.blender.org/blender/blender/pulls/124882
2024-07-17 15:23:21 +02:00
Bastien Montagne
faf56cc3bf RNA generated code: Move extern'ed PropertyRNA from pointers to references.
Clang (at least on OSX) has optimization issues with the pointer
version, which seem to be 'fixed' by using references.

Note that using references here is not a bad thing anyway (none of these
pointers would ever be expected to be NULL).

Pull Request: https://projects.blender.org/blender/blender/pulls/124883
2024-07-17 15:19:54 +02:00
Campbell Barton
c7a26cf5c2 Fix #124850: Add-on legacy replacement fails without remote repo data
When the user attempted to install a previously enabled add-on as an
extension after enabling online access and *without* viewing extensions,
installation would fail.

Resolve by adding a check that the remote repository data is available,
adding a button to refresh remote repositories if it's not.
2024-07-17 22:42:16 +10:00
Jeroen Bakker
1497e37728 Cleanup: Vulkan: Descriptor set allocations
During descriptor set update several internal buffers where reallocated
over and over. As descriptor set updates are done very often (1000s
times per frame) some performance could be gained by keeping the
previous allocated buffers around.

Pull Request: https://projects.blender.org/blender/blender/pulls/124877
2024-07-17 14:38:44 +02:00
Sergey Sharybin
a2f825fde5 Cleanup: Strict compiler warning in release mode
Fixes warning: unused variable 'no_resync_recurse_max' [-Wunused-const-variable]
2024-07-17 14:31:48 +02:00
Richard Antalik
6a39d79967 Fix #124767: VSE cache not updated for moved strips
The cache invalidation worked on basis of timeline frame instead of
frame index, which caused, that these images were outside of range, that
was considered to be changed, after strip was moved.

In this case the issue happened only with effect strips. This was not
an issue before, mainly because raw images for these strips were not
stored. For other strip types, raw image does not usually change.

This seems to be "caused" by f4f708a54f .

Pull Request: https://projects.blender.org/blender/blender/pulls/124870
2024-07-17 14:23:57 +02:00
Clément Foucault
dd3a48642e Fix: UI: Assert failure with displaying node editor
Caused by mixing UINT and INT in interface and VBO
descriptor.

Fix #124716

Pull Request: https://projects.blender.org/blender/blender/pulls/124880
2024-07-17 14:20:28 +02:00
Weizhen Huang
c7c55894e4 Fix: EEVEE principled coat has tint when the weight is zero
caused by 26eb5d9899

Pull Request: https://projects.blender.org/blender/blender/pulls/124856
2024-07-17 13:54:26 +02:00
Weizhen Huang
9a69d0cc9f Tests: Update Cycles image colorspace OSL tests
* enable OSL in `image_log_osl.blend`
* update `image_alpha_blend_osl.png`, which renders differently than
previous reference image, but did not fail the threshold

Pull Request: https://projects.blender.org/blender/blender/pulls/124871
2024-07-17 13:53:09 +02:00
Jeroen Bakker
823de4b3b8 Vulkan: Add support for colored particle hair
When using particle hair the optional generated color buffer was bound
as a texture (texel buffer), however in Vulkan texel buffers aren't
textures but buffers.

This change will create a texture, that will pass the needed calls to
the source vertex buffer. Only particle hair does uses
`GPU_texture_create_from_vertbuf`. I would expect that we will phase
this out eventually when particle hair is removed.

This fixes crashes with scenes using particle hair where materials use color
or uv attributes.
![image](/attachments/d5511eee-4db0-4241-bf00-472834c4ca7b)

Pull Request: https://projects.blender.org/blender/blender/pulls/124854
2024-07-17 13:32:06 +02:00
il4n
94d2d64ec7 Fix: Broken menus in VSE
The Select > All menu option was missing, and the logic for showing
the retiming menus was broken.

This was accidentally introduced in 2aa346a123e

Pull Request: https://projects.blender.org/blender/blender/pulls/124785
2024-07-17 13:12:43 +02:00
Sebastian Parborg
aac0189e2c Fix #124868: Frame Selected didn't move of the X-axis sometimes
It would not execute the "Frame Selected" action if the viewport already
fully zoomed out on the y-axis. However we still need to center the
viewport around the selected strips x position.
2024-07-17 13:08:34 +02:00
Bastien Montagne
f87b5fdc67 Add FIXME comment about suspicious difference in readfile vs. link code. 2024-07-17 12:57:47 +02:00
Bastien Montagne
ac284c1694 Fix #124777: Segfault when opening .blend file with invalid shapekey.
Prevent doing layer collection resync during most of
`blo_read_file_internal` process. This is dangerous (since during
blendfile read there is no way to ensure that Main is in a fully valid
sate), and a useless costly process.
2024-07-17 12:57:47 +02:00
Bastien Montagne
8df93cd751 BKE: id_delete: Do not forbid layer collection resync in non-Main case.
There is no reason to deal with layer collections resync in non-main
case, deletion code should never trigger it anyway.

This will avoid quite a lot of the non-main-thread calls to
`BKE_layer_collection_resync_forbid` (detected and 'fixed' in previous
commit).
2024-07-17 12:57:47 +02:00
Bastien Montagne
9b8001f370 BKE Layers: make 'no_resync' flag re-entrant and thread-safe.
This commit allows re-entrant calls to
`BKE_layer_collection_resync_forbid` and
`BKE_layer_collection_resync_allow`, such that higher-level code can
block layer collections updates while calling lower-level code that does
the same thing.

E.g. `BKE_id_delete` blocks and then re-allows such updates. However,
such code can also be called from other pieces of code that also need
to prevent these updates in their own, broader scope.

In addition, realized that this call had concurrency issues since BKE
code using it is called from non-main thread too (e.g. from depsgraph
evaluation).

So made the counter atomic to ensure all calls to
`BKE_layer_collection_resync_forbid` is matched by a call to
`BKE_layer_collection_resync_allow`. Also added a cap to max amount of
're-entrant' calls (has to be quite high, due to potential concurrent
calls too).

This is required to fix #124777.
2024-07-17 12:57:47 +02:00
Bastien Montagne
6cf4294c68 Comment about known issue with some old blenfiles triggering a write assert.
File from #124777 (from 2.79.1) cause a temp bScreen to not be properly
tagged as such, which prevents its deletion when related window is
closed, and leaves a zero-user bScreen in Main.

While this should not happen, this does not seem trivial to track down,
and not an important enough issue to spend more time on it.

Also reported as #124857.
2024-07-17 12:57:43 +02:00
Sergey Sharybin
e8cfe0d96f Cycles: Add tests for versioning cast_shadow property
Ref #124817
Ref #124834
2024-07-17 12:03:26 +02:00
Alaska
7438bf8e0f Fix #124817: Incorrect Cycles "Cast Shadow" versioning
This commit fixes a issue where the Cycles "cast shadow" setting
versioning from Blender 4.1 to 4.2 wasn't working properly due to the
use of the wrong parameter name when grabbing the Blender 4.1 setting.

Pull Request: https://projects.blender.org/blender/blender/pulls/124834
2024-07-17 11:57:30 +02:00
Omar Emara
3ca6aa19c9 Fix #124788: Missing passes after drag and drop image
Multi-layer image passes are missing after dragging and dropping an EXR
into the compositor editor. To fix this, we tag the new nodes as needing
an update due to changed ID.

Pull Request: https://projects.blender.org/blender/blender/pulls/124855
2024-07-17 11:34:19 +02:00