Commit Graph

150077 Commits

Author SHA1 Message Date
Jeroen Bakker
0643f495cd Vulkan: Fix incorrect write access mask in pipeline barriers
By adding the previous mask, masks could be used in pipeline
stages that don't support the mask. Fixed by limiting the
mask to the current node.

Pull Request: https://projects.blender.org/blender/blender/pulls/123381
2024-06-18 17:17:20 +02:00
Falk David
f897d37f38 Fix: GPv3: Thickness adjustment conversion doesn't use object scale
To get the same visual result compared to GPv2, the thickness adjustment value
needed to be divided by the object scale.
2024-06-18 17:06:23 +02:00
Julian Eisel
85b06f49b5 Cleanup: Correct function name in comment/asserts 2024-06-18 16:59:20 +02:00
Julian Eisel
e4a77397d5 UI: Don't show tooltips when spawning popups until mouse is moved
Popups are often spawned with a button under the mouse cursor. For some
kinds of popups this would immediately invoke the tooltip timer, so
after a short moment tooltips would show. This can be annoying, since
the tooltip can overlap elements and the user's input was intended to
spawn a popup, not also spawn a tooltip. Even worse, the asset shelf
popup uses quick tooltips, so spawning that popup would almost instantly
also spawn the quick tooltip (see PR for demo video).

Instead, disable tooltips until the user moves the mouse. Menus
triggered from shortcuts (e.g. the Shift+A "Add" menu) would already
behave this way.

Pull Request: https://projects.blender.org/blender/blender/pulls/123363
2024-06-18 16:54:28 +02:00
Sean Kim
09926bbae0 Sculpt: Initial data oriented refactor for smooth mask brush
Part of #118145.

Currently a fair amount slower than the existing version, 0.61ms
compared to 0.12ms per brush step invocation.

Pull Request: https://projects.blender.org/blender/blender/pulls/123215
2024-06-18 16:49:24 +02:00
Philipp Oeser
7964b25a8e Merge branch 'blender-v4.2-release' 2024-06-18 16:44:57 +02:00
Philipp Oeser
751745b2de Fix #123220: Export GP SVG/PDF crash when active object is not GP
`GpencilIOParams.ob` is set to `CTX_data_active_object` at the beginning
of the export [which is not ensured to be a valid `OB_GPENCIL_LEGACY`
object, non-valid objects are filtered out later in
`create_object_list`]. From this (potential non-greasepencil) object's
data, a "global `bGPdata` is stored in `GpencilIOParams`.

From here, it can only go downwards as `stroke_point_radius_get`,
`export_stroke_to_polyline`, `BKE_gpencil_stroke_perimeter_from_view`
all use this "global" `bGPdata`.

Two possible solutions might exist:
- [1] just cancel the operator if the active object is not a
`OB_GPENCIL_LEGACY` object
- [2] make sure we use corresponding `bGPdata` when iterating over
valid objects to export

This PR chooses [2] since it also seems wrong to always use the
`bGPdata` from the active object for certain calculations when iterating
many objects. For example, the export ignores different values for
`Thickness Scale` on different objects and always takes the value from
the active object, which does not seem to be by design.

NOTE: this changes behavior (see above) but for the better
Pull Request: https://projects.blender.org/blender/blender/pulls/123224
2024-06-18 16:44:08 +02:00
Miguel Pozo
44c1fa2f06 Merge branch 'blender-v4.2-release' 2024-06-18 16:15:59 +02:00
Miguel Pozo
9d5f46b1b8 Cleanup: EEVEE: Remove unused variable 2024-06-18 16:15:26 +02:00
Pablo Vazquez
6684504d4f UI: Rename "Strip Colors" panel in theme editor
Rename to "Strip Color Tags" to match how these are called throughout
menus and overlay popover.
2024-06-18 16:13:28 +02:00
Christoph Lendenfeld
99796991d8 Fix #123245: Inserting keys was lacking depsgraph update
When inserting new keys, the depsgraph needs to be updated.
Since that was missing with the new keying code, the NLA wasn't
working properly when inserting the first key.

Pull Request: https://projects.blender.org/blender/blender/pulls/123360
2024-06-18 16:03:38 +02:00
Christoph Lendenfeld
1070ae46fa Fix #122490: Snapping with free handles doesn't move the handles
When snapping keyframes in the Graph Editor, handles
that were set to free didn't move.

The issue was that the snapping code didn't set the handle position.
Instead it relied on the handle recalculation (`calchandleNurb_intern`) to do the job.
That code doesn't affect free handles though.

The fix is to also offset the handles in the snapping code. The handle recalculation
will still run for all the other handle types so that behavior isn't expected to change.

This does NOT change the behavior of bezier snapping in the 3D viewport.

Pull Request: https://projects.blender.org/blender/blender/pulls/123173
2024-06-18 16:00:37 +02:00
Clément Foucault
8cd282e48c Merge branch 'blender-v4.2-release' 2024-06-18 15:35:17 +02:00
Clément Foucault
979e142965 Fix: EEVEE: Object holdout not working
This implement the holdout flag by switching to
the holdout case in the shader. This has a few benefits:
- Doesn't recompile the shaders.
- Makes the object infos mandatory (already the case in
  practice)
- Handle transparent materials properly, keeping the
  transparency working.

Fix #123284

Pull Request: https://projects.blender.org/blender/blender/pulls/123315
2024-06-18 15:35:04 +02:00
Patrick Mours
56c1163c21 Fix: Cycles OptiX wrong stack size for OSL pipeline
The callables generated by OSL reference other external functions
(defined in the OSL services module), in which case OptiX cannot
calculate the right stack size just based on the callable alone, it needs to
know all functions linked together in the pipeline to get to an accurate
result. `optixProgramGroupGetStackSize` has an optional pipeline
argument for this purpose, so make use of that to ensure the correct
stack size is calculated.

Ref #122779

Pull Request: https://projects.blender.org/blender/blender/pulls/123368
2024-06-18 15:27:14 +02:00
Jeroen Bakker
71c716d8c0 Vulkan: Fix incorrect texture update
Texture update ignored layered based offsets and extents. This was
an oversight due to misintepreting the API. This fixes uploading the
utility texture of EEVEE and enables correct material shading.

Pull Request: https://projects.blender.org/blender/blender/pulls/123371
2024-06-18 14:58:41 +02:00
Clément Foucault
0dc5abc9e5 Fix: EEVEE: Infinite loop in shadow update
This happened in the following render test:
`render/light/all_light_types_in_volume.blend`

Unfortunately it seems non-deterministic.
To fix this, we change the heuristic to jump
out of the shadow update loop. Also introduce
a upper bound to the number of iteration.

On top of this, add a flush for every loop
to avoid huge command buffer submission.

Thanks @pragma37 for the fix.
2024-06-18 14:55:41 +02:00
Sybren A. Stüvel
eb731c036b Refactor: Anim filtering, avoid passing bDopesheet *ads parameter
In the animation filtering code, avoid passing `bDopesheet *ads` as a
separate parameter. Instead, pass `bAnimContext *ac`. This already
contains the same pointer. Some carefully placed asserts help to
verify that these pointers were indeed the same.

Not only do I think this approach is cleaner, it is a necessary step
for upcoming PRs #123187 and #122672. Those will need a `Main *bmain`
pointer, which is already available in the `bAnimContext` struct.

Mostly this is just dumb search & replace.

- `ads` → `ac->ads`
- `bDopeSheet *ads` parameter → remove, and add `bAnimContext *ac`
  parameter if necessary. That parameter should be the first parameter
  of the function.
- Unused `ads` parameter translates to unused `ac` parameter. Chances
  are, that parameter will be necessary for the `Main *bmain` anyway.

No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123305
2024-06-18 14:07:12 +02:00
Christoph Lendenfeld
1ab66a6b4f Fix #116138: Hidden bones cannot be active
This PR modifies the check for visibility when selected in the outliner.
With the change the visibility check only affects the selection state, not the active state.
The check has also been swapped with a function call to `ANIM_bone_is_visible_editbone`,
so now correctly works with collection visibility.

This PR also fixes the same issue for `Bone` and `bPoseChannel`

Co-authored-by: Cedric-Hutchings

Pull Request: https://projects.blender.org/blender/blender/pulls/123237
2024-06-18 13:54:36 +02:00
Falk David
f1fa7e180b Remove outdated comment 2024-06-18 12:54:08 +02:00
Clément Foucault
e71ca93031 Fix: EEVEE: Missing barrier in light sorting compute shader
At high light count, this missing barriers would
produce invalid, non-unique `prefix_sum` indices.
This then resulted in some slots inside `out_light_buf`
never written to, leaving undefined data inside them.

If the buffer was cleared to zero, these undefined light
slots would be interpreted as sun lights and the
shadow setup compute pass would critically fail because
of out of bound memory.

Fix #123195
2024-06-18 12:39:27 +02:00
Campbell Barton
033a3f09b6 Merge branch 'blender-v4.2-release' 2024-06-18 20:38:38 +10:00
Campbell Barton
bc7cb481da Fix #123339: Blender fails to build with older versions of wayland 2024-06-18 20:37:25 +10:00
Falk David
fad85d303f Fix #123328: Onion skinning causes change in opacity for current frame
Toggling the layer onion skinning toggle would affect the opacity
of strokes on the current frame.

This was caused by the `get_visible_frames_for_layer` function. It computes
a `frame_id` for all the keyframes that are not the currenty visible
keyframe. To skip over the currently visible keyframe on the layer,
it just compared the start frame of the keyframe with the current
scene frame. This only works if the current frame is over the keyframe,
but not for any frames after (even if the same keyframe is still visible).

The fix computes the start frame of the keyframe under the current frame
first, and then uses that to compare to the start frame during the iteration
over all keyframes. This makes sure that we skip over the currently visible
keyframe in that layer.

Pull Request: https://projects.blender.org/blender/blender/pulls/123358
2024-06-18 12:29:32 +02:00
YimingWu
a62860229c Cleanup: Remove outdated line art comment
The comment for variable layout is outdated, remove this.
2024-06-18 18:12:40 +08:00
Campbell Barton
d7e9c8cd87 Merge branch 'blender-v4.2-release' 2024-06-18 19:50:42 +10:00
Campbell Barton
08ddd98d73 Merge branch 'blender-v4.2-release' 2024-06-18 19:50:40 +10:00
Campbell Barton
1ed6449c82 Extensions: better error message when already installed
Change the main error messages that happens when we drag and drop an
extension URL.

Ref !123242

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-06-18 19:49:36 +10:00
Anthony Roberts
794a8f35fa Windows: Update GPU error message on ARM64
This makes it more verbose, and a little clearer that devices prior to 8cx Gen3 are not supported in  >=v4.0. It makes the error message from #113674 more prominent than just being printed to cout.

Spurred by an email I got from someone trying to run blender on a Surface Pro X, and getting the not very helpful (to old devices) error.

Pull Request: https://projects.blender.org/blender/blender/pulls/122732
2024-06-18 11:47:01 +02:00
Campbell Barton
4df945f3af Merge branch 'blender-v4.2-release' 2024-06-18 19:24:06 +10:00
Campbell Barton
09be28794a Fix references to undefined modules/variables, remove unused import 2024-06-18 19:21:15 +10:00
Jeroen Bakker
a39545198a Merge branch 'blender-v4.2-release' 2024-06-18 10:58:26 +02:00
Jeroen Bakker
d13682efa8 Cleanup: Fix spelling in EEVEE
_No response_

Pull Request: https://projects.blender.org/blender/blender/pulls/123355
2024-06-18 10:57:03 +02:00
Jeroen Bakker
b598bd4a6f Merge branch 'blender-v4.2-release' 2024-06-18 10:55:24 +02:00
Jeroen Bakker
c525c0354f EEVEE: Film accumulation workaround for Metal/Intel iGPUs
EEVEE Film accumulation workaround for Metal/Intel iGPUs.

On Metal the Intel iGPUs do not support image read write
on array textures. However this limitation doesn't show
any artifacts when using the compute shader.

This PR is a work around that uses the film_comp shader
to process the film samples, but uses a separate film_copy_frag
shader to read the result and copy them to the frame buffer.

I deliberately didn't include the fix to the film_frag shader
as that would change the read/write resources and could lead
to performance issues for other platforms. Writable resources
are typically slower compared to read only resources.

Some code needed to be duplicated (and not added to `*_lib.glsl`)
as compilers would still raise compilation errors due to imageStore/Load
on incompatible resource access.

The Metal/Intel iGPU is also marked to have limited support as
raytracing and probes still produces big artifacts.

This workaround can be tested on any platform just by setting
`use_compute_ = true` in `Film::sync`

Related to #122361

Pull Request: https://projects.blender.org/blender/blender/pulls/123330
2024-06-18 10:53:53 +02:00
Sybren A. Stüvel
4b2aee0a37 Cleanup: fix compiler warning by removing superfluous parentheses
Change `if ((A == B))` to `if (A == B)` to silence compiler warnings.

No functional changes.
2024-06-18 10:34:33 +02:00
Campbell Barton
8caf042d0f Merge branch 'blender-v4.2-release' 2024-06-18 16:40:42 +10:00
Campbell Barton
f98e422e63 Extensions: support build --split-platforms, generated manifest data
- Add an option to build a separate package for each platform, this is
  useful to produce smaller packages when large wheels are included.

- Add a reserved field: "[build.generated]" to the manifest when
  splitting by platform which overrides the root-level platform
  when it exists.
2024-06-18 16:29:57 +10:00
Campbell Barton
49d8566637 Merge branch 'blender-v4.2-release' 2024-06-18 12:14:51 +10:00
Campbell Barton
cad86f8dec Merge branch 'blender-v4.2-release' 2024-06-18 12:14:48 +10:00
Campbell Barton
c5217b1377 Merge branch 'blender-v4.2-release' 2024-06-18 12:14:46 +10:00
Campbell Barton
dc4c440f9f AUTHORS: add 32 new authors 2024-06-18 12:09:43 +10:00
Campbell Barton
b141365fc2 Cleanup: quiet unused variable warning 2024-06-18 12:09:41 +10:00
Campbell Barton
0554ec7ec7 Cleanup: spelling in comments 2024-06-18 12:09:40 +10:00
Lukas Stockner
25d4d645cd UI: Add Color Temperature unit
The current temperature unit adjusts to Celsius or Fahrenheit based on
unit system, but specifically for color temperatures the convention is
to display them in Kelvin, and it'd be strange to e.g. see 11240°F when
opening the white balance panel.

Therefore, this adds a dedicated Color Temperature unit, and uses it
for the two existing blackbody temperature inputs in shader nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/123337
2024-06-17 23:50:05 +02:00
Miguel Pozo
0a38a8d56a Merge branch 'blender-v4.2-release' 2024-06-17 19:39:13 +02:00
Miguel Pozo
4093945e9c Cleanup: Use the correct license name
Unlicense is the name of the license, it's not that the code is unlicensed.
2024-06-17 19:37:00 +02:00
Miguel Pozo
50a83d3e0b Fix: BLI_SUBPROCESS_SUPPORT check
Fix compilation on platforms with OpenGL but not BLI_subprocess support.
2024-06-17 19:35:51 +02:00
Clément Foucault
6d375cf7f0 Fix: EEVEE: Wrong thickness for rotated objects
The previous code was using matrix multiplication to
get the local thickness to world thickness.

The correct way is to multiply the local thickness
by the scale of the object (length of each columns
of the object_to_world matrix).
2024-06-17 19:12:24 +02:00
Clément Foucault
b5a9a67dcf Fix: EEVEE: Object holdout not working
This implement the holdout flag by switching to
the holdout case in the shader. This has a few benefits:
- Doesn't recompile the shaders.
- Makes the object infos mandatory (already the case in
  practice)
- Handle transparent materials properly, keeping the
  transparency working.

Fix #123284

Pull Request: https://projects.blender.org/blender/blender/pulls/123315
2024-06-17 19:08:37 +02:00