Commit Graph

150077 Commits

Author SHA1 Message Date
Jacques Lucke
14bb6cb62b Fix #129338: wrong tooltip for center option for text boxes
The tooltip used to say that the center is always the objects origin.
However, in the case of text-boxes, it's actually the center of the text box.

There might be valid use-cases to move the text box center to the
object's center, but it seems like the same can be achieved with offsets.
Also that would be a new feature that's out of scope of a bug report.

Pull Request: https://projects.blender.org/blender/blender/pulls/131693
2024-12-10 18:44:04 +01:00
Harley Acheson
2b7a968909 Fix #80356: UI Icon Alpha Should Not Affect Matcaps & Studio Lighting
Changing Icon Alpha in Preferences / Themes / User Interface / Styles /
Icon Alpha is meant to change the opacity of the UI icons. It should not
change the opacity of the previews of Matcaps and Studio lights as this
changes the color because of mixing with the background. This PR just
skips this icon type when changing the alpha for this preference.

Pull Request: https://projects.blender.org/blender/blender/pulls/131690
2024-12-10 18:19:28 +01:00
Clément Foucault
e29bda07b3 Fix #131633: GPU: Add Object Tool gizmo does not show correct bounds 2024-12-10 18:18:48 +01:00
Jacques Lucke
53ea147a51 Fix #131598: avoid relying on node tree update code being run before dependency graph is build
This avoids assuming that `BKE_ntree_update_main` has run on a node tree before
the depsgraph is build. The update code already finds the dependencies to
determine if a relations update is necessary or not. To avoid detecting these
dependencies again (which requires iterating over all the nested nodes), they
were cached on the node group so that they can be used when the depsgraph is
build.

However, since the update code does not run in all necessary cases yet
(#131598), this does not work currently. This patch fixes the situation by
removing the optimization of not having to find all dependencies again when the
depsgraph is build.

This optimization can be introduced again after we can be more sure that the
node tree update code runs whenever the node tree changes (which is what #131665
tries, but requires more discussion).

Pull Request: https://projects.blender.org/blender/blender/pulls/131685
2024-12-10 17:52:44 +01:00
Weizhen Huang
0b954d7777 Cleanup: make format 2024-12-10 17:51:29 +01:00
Jacques Lucke
585cd07899 Refactor: Blenloader: simplify writing libraries
This improves the `write_libraries` function in a couple of ways:
* No need to split the `bmain` which I find somewhat hard to reason about. I
  think it's good if `bmain` is as read-only as possible in this write-context.
  Instead a more explicit C++ data structure (`MultiValueMap<Library *, ID *>`)
  is used. I think this was the only place in write-code that used
  `blo_split_main`.
* Deduplication of the check that determines  whether a placeholder should be
  written for a specific ID.
* General cleanup to avoid unnecessarily deep nesting when iterating over IDs.

No functional changes are expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/131385
2024-12-10 17:43:09 +01:00
Clément Foucault
94b7035311 Fix: GPU: Broken compilation on Mac 2024-12-10 17:42:13 +01:00
Clément Foucault
5566e7f20e Fix: EEVEE: Material not always finish compiling when baking volume probes
Use the same workaround as for render.
Wrap the sync inside its own `custom_pipeline_wrapper` so that
we don't freeze the main thread when waiting for these 50ms.

Also remove the `manager->begin_sync()` and `manager->end_sync()`
as they are already present inside `render_sync`.

Pull Request: https://projects.blender.org/blender/blender/pulls/131678
2024-12-10 17:25:07 +01:00
Laurynas Duburas
8dcb76b6ad Fix #130688: Grease Pencil: Multiframe Editing not applying falloff for rotation & scale
Fixes rotation and scale in multi frame editing.

Pull Request: https://projects.blender.org/blender/blender/pulls/131634
2024-12-10 17:21:06 +01:00
YimingWu
7f8b811a42 Fix #131681: Grease Pencil: Build modifier concurrent mode div by zero
There could be strokes that have zero lengths (a dot), in this case a
NaN factor was given to the final build function, leading to invalid
index when accessing arrays. Now `get_stroke_factor` will return either
0.0f or 1.0f (depending on input factor) when stroke has zero total
length.

Pull Request: https://projects.blender.org/blender/blender/pulls/131683
2024-12-10 17:19:10 +01:00
Miguel Pozo
e24eadbb42 GPU: Add assert_framebuffer_shader_compatibility
Ensure all the framebuffer color attachments are written to.

Pull Request: https://projects.blender.org/blender/blender/pulls/130995
2024-12-10 17:13:06 +01:00
Jeroen Bakker
aee24fb6ba Vulkan: Updated NVIDIA/Linux driver support
NVIDIA driver before 550 doesn't work as expected on Linux. The issue is
known on the internet, but no real solutions are provided.

This change will limit the block list of older driver to the Linux
platform only. It has been reported that Windows these driver are
working and would enable older GPUs to work on Windows.

Ref #129160

Pull Request: https://projects.blender.org/blender/blender/pulls/131674
2024-12-10 15:37:38 +01:00
Omar Emara
98270a489b Compositor: Optimize constant size Bokeh Blur node
This patch optimizes the constant bokeh blur CPU implementation by
pre-computing the blur kernel from the bokeh kernel, and thus avoid
interpolation in the blur loop. Gives a 2x improvement.
2024-12-10 16:18:22 +02:00
Sybren A. Stüvel
b7028617ad Refactor: render tests, change how argparse is used
Some changes to how argparse is used in render tests:

1. Use the common approach of one dash for single-letter options (`-b`)
   and two dashes for longer options (`--blender`). In this commit that
   just means changing single-dashed (`-testdir`) to double-dashed
   (`--testdir`).

2. Remove unnecessary `nargs` arguments. The code was telling `argparse`
   to put CLI arguments into a list of one item, and then had code to
   turn that one-item list into the item itself. I've just removed the
   `nargs` argument altogether, as that just produces the desired
   value without requiring more code.

   I've also removed `nargs="+"` from the handling of the `--blender`
   parameter, as that allowed for multiple occurrences of `--blender
   {path}` but was silently ignoring all of those except the first.

   To ensure that required arguments are present, the code now uses
   `required=True` instead of `nargs`.

3. Add a `description` parameter so that `--help` shows what the
   test script actually does. Also it helps people (like me) who want
   to figure out which blend file is actually being opened by the
   test, without making the test itself more verbose.

No functional changes, except that you now cannot add multiple
`--blender` arguments any more (the CLI invocation will fail). This wasn't
used anywhere I could find, though.

Pull Request: https://projects.blender.org/blender/blender/pulls/131666
2024-12-10 14:52:34 +01:00
Clément Foucault
7a889b21bc Fix #131587: Overlay: Crash switching workspaces
- Make sure to initialize the `State` struct.
- Make sure to consider space node as 2D for grid overlay.
2024-12-10 14:08:05 +01:00
Jeroen Bakker
8c0b2a00dc Revert "Vulkan: Add support for LocalSizeId execution model"
This reverts commit ccab973556.

This change has some issues with Vulkan Validation layers. Reverting it
until it is clear what the cause is.
2024-12-10 13:42:22 +01:00
Jacques Lucke
6bdf9232b0 Fix #131565: missing null check for socket type
This was probably accidentally broken by 7348e670b3.
2024-12-10 13:22:38 +01:00
Weizhen Huang
b67b0c2847 Fix: Overlay: Volume wireframe visible regardless of setting
guard the drawing behind `show_surface_wire`

Pull Request: https://projects.blender.org/blender/blender/pulls/131527
2024-12-10 13:07:21 +01:00
Falk David
b0c3836280 Cleanup: Grease Pencil: Use ensure_vertex_group kernel function
Use the `bke::greasepencil::ensure_vertex_group` function instead
of a local static copy of the same function.
2024-12-10 11:53:55 +01:00
Falk David
612be514c6 Grease Pencil: Add lasso/box erase operators in draw mode
In Blender 4.2 in Grease Pencil draw mode it was possible to
erase strokes using box and lasso gestures.

Under the hood, these were just using the selection operators
that had special deletion handling if the object was in draw mode.

Rather than hacking this into the selection operations, this adds
two new operators:
* `grease_pencil.erase_lasso`
* `grease_pencil.erase_box`

When using one of the erase operations with auto-key, the previous
keyframe will be duplicated to the current frame (for the drawings
that are affected by the eraser).

They are mapped to the same shortcuts than the selection
operators in Blender 4.2.
* Lasso erase: `Ctrl`+`Alt`+`RMB`.
* Box erase: `B`.

This is part of #130518.

Pull Request: https://projects.blender.org/blender/blender/pulls/131504
2024-12-10 11:50:05 +01:00
Clément Foucault
fe228d26b4 Cleanup: DRW: Remove unused part of DRWTexture API 2024-12-10 11:33:00 +01:00
Clément Foucault
a005efd680 Refactor: Grease Pencil: Port usage of DRW_texture_create_* to Texture
Removes call to legacy API.

Pull Request: https://projects.blender.org/blender/blender/pulls/131636
2024-12-10 11:21:32 +01:00
Anthony Roberts
89102b3b5d Libs: Update Windows ARM64 Vulkan + shaderc
In line with what other platofrms have already done as part of #128577

Pull Request: https://projects.blender.org/blender/blender/pulls/131628
2024-12-10 11:16:12 +01:00
Jeroen Bakker
0ac92bda89 Fix #131602: Workbench: Incorrect texture usage depth of field.
Depth of field attaches the half res and scene color texture, but
doesn't provide the correct usage flags. This resulted in validation
errors in Metal & Vulkan.

Pull Request: https://projects.blender.org/blender/blender/pulls/131655
2024-12-10 11:06:51 +01:00
Jeroen Bakker
ccab973556 Vulkan: Add support for LocalSizeId execution model
Vulkan version 1.2 supports Workgroup execution model. Vulkan 1.3
introduced the LocalSizeId execution model and has been backported in
the VK_KHR_maintenance4 extension. In future SPIR-V versions the
Workgroup execution model will be deprecated.

This PR checks the availability of VK_KHR_maintenance4 extension and
when enabled compile the shaders towards Vulkan 1.3. This would
automatically use the LocalSizeId execution model.

See https://registry.khronos.org/vulkan/specs/latest/man/html/WorkgroupSize.html

Pull Request: https://projects.blender.org/blender/blender/pulls/131663
2024-12-10 11:06:12 +01:00
Jeroen Bakker
5ed49184fe Vulkan: Rebalance pool sizes.
Update the default pool sizes using some metrics from production files.
Adds a tool to check actual used pool sizes which can be enabled at
build time.

Pull Request: https://projects.blender.org/blender/blender/pulls/131661
2024-12-10 10:48:27 +01:00
Jeroen Bakker
f33433485e Fix #131512: Missing border in image editor overlay
Incorrect framebuffer was attached.

Pull Request: https://projects.blender.org/blender/blender/pulls/131651
2024-12-10 10:47:23 +01:00
Lukas Tönne
d6e78d05c9 Transform: Crazyspace support in edit mode for Curves and Grease Pencil
Edit mode for curves and Grease Pencil was using the plain object transform for
all points without support for individual crazyspace transforms. This patch adds
support for the local rotation matrices, so editing curves on top of modifiers
converts offsets into original geometry space.

For Curves objects these matrices are currently only computed by the surface
deformation node, so editing on top of a surface deformation is the only case
that works currently.
For Grease Pencil the armature modifier is supported and more should be added
in future (see overview task #131599).

Pull Request: https://projects.blender.org/blender/blender/pulls/131619
2024-12-10 10:16:56 +01:00
Jeroen Bakker
1bd8719a7f Vulkan: Add asserts to check attachment usage flags
When using a texture as attachment it must be created witht the
GPU_TEXTURE_USAGE_ATTACHMENT flag. If this is not the case it would lead
to incorrect usage in Vulkan. This change adds asserts to detect
incorrect usage.

Pull Request: https://projects.blender.org/blender/blender/pulls/131656
2024-12-10 09:53:18 +01:00
Aras Pranckevicius
f4b1e169aa Fix: VSE white balance modifier undefined results for HDR colors
Commit 073ce98231 back in 2016 changed white balance math to do
a pow based pixel operation instead of multiplication. However
pow on negative numbers (which would happen on any HDR input) is
undefined. Until some better math is decided upon, at least ensure
the input is not negative.
2024-12-10 10:21:24 +02:00
Jeroen Bakker
500b1f3c69 Vulkan: Add support for clearing depth via GPU_texture_clear
GPU_texture_clear was only used for clearing color textures, but that
changed recently. This PR adds supports for clearing depth/stencil
textures using GPU_texture_clear.

Pull Request: https://projects.blender.org/blender/blender/pulls/131653
2024-12-10 09:06:43 +01:00
Aras Pranckevicius
322415d5b2 Fix: Build WITH_CYCLES_OSL=OFF failure
Code added in d1796b8df0 was not put under WITH_OSL checks
2024-12-10 09:58:22 +02:00
Ray Molenkamp
cab0dadbe3 Installer: Windows: Various tweaks and updates to the installer
1 - Add an option to open up the fund.blender.org website at the end of
the install process.

2 - Use blender launcher to register blender in order to prevent a black
dialog box flashing onto the screen.

3- Since registering blender can take a bit, add a progress text during
registration

4- during installation on windows 10+ the installer displayed
`Copying new files File: [1], Directory: [9], Size [6]` fixed to just display
`Copying new files`

Pull Request: https://projects.blender.org/blender/blender/pulls/130762
2024-12-10 08:41:04 +01:00
Jeroen Bakker
95b9281de1 Vulkan: Add support to clear D24_S8 texture
Depth 24 stencil 8 texture could not be cleared directly. Recently
GPUViewports clear their attachments when created. This resulted into
non consistent behavior between backends.

This change adds support to clear depth 24 stencil 8 textures using
`GPU_texture_clear`. The implementation currently assumes that the input
value is a float.

Pull Request: https://projects.blender.org/blender/blender/pulls/131650
2024-12-10 07:49:49 +01:00
Alaska
6a23d9d7e9 Tests: Update outdated EEVEE volume tests
During the PR that added the relevant Volume tests, the .blend file
was changed but the corresponding volume reference image was not.

This commit fixes that.
2024-12-10 07:34:06 +01:00
Urko Mauduit
0a6e7e9140 Fix #129527: Unified brush strength does not update cursor visualization
Pull Request: https://projects.blender.org/blender/blender/pulls/131145
2024-12-10 07:00:29 +01:00
Alaska
8756ebb25a Tests: Rename all Principled tests to Principled BSDF
While looking into something else, I noticed that the OSL render tests
were not testing the Principled Volume tests.

This is because when running OSL tests, we skip all Principled BSDF
tests by ignoring all tests that start with `principled_`
(this was done due to noise differences between SVM and OSL).

However this had the knock on effect of skipping tests like
- `principled_absorption`
- `principled_blackbody`
- `principled_smoke`

in the volumetric test suite.

This commit fixes this issue by renaming all Principled BSDF tests to
`principled_bsdf_` and updating the block list to use this new name.

Ref: blender/blender-test-data!31
Pull Request: https://projects.blender.org/blender/blender/pulls/131540
2024-12-10 06:44:07 +01:00
Campbell Barton
cd1f3857f0 Fix unhandled exception in the shading options
Account for shading.selected_studio_light being None.
2024-12-10 16:15:24 +11:00
Richard Antalik
eea1a65821 Fix: VSE: assert when strips are too short
When handle tweaking is enabled and strips are short, hovering over them
would trigger assert in `mouseover_strips_sorted_get()`, because more
than 2 strips would be picked. Sorting was done just by swapping strips
if order was incorrect

Use `std::sort()` instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/131594
2024-12-10 02:24:53 +01:00
Nikhil Shringarpurey
f6a6334164 Fix: Ninja build command on Windows
The build commands for `ninja clean` on Windows were wrong - one had
the cmake executable duplicated and one was not using the correct
environment variable and also had missing quotes for paths that
contained spaces.  Tested working on with `make ninja clean` and
`make ninja clean release`.

Pull Request: https://projects.blender.org/blender/blender/pulls/128802
2024-12-10 01:10:35 +01:00
Michael Kowalski
ba6043fb86 USD: test files for material import hook
Pull Request: https://projects.blender.org/blender/blender/pulls/131559
2024-12-09 18:27:34 -05:00
Sean Kim
bdb9b11a53 Cleanup: Add warning for CTX_data_ensure_evaluated_depsgraph
Part of #131010

Pull Request: https://projects.blender.org/blender/blender/pulls/131557
2024-12-10 00:01:12 +01:00
Clément Foucault
2e0f4eea66 Cleanup: DRW: Replace DRW_TEXTURE_FREE_SAFE by GPU_TEXTURE_FREE_SAFE 2024-12-09 23:23:53 +01:00
Clément Foucault
74a2b61fb5 Overlay: Remove call to legacy API 2024-12-09 23:23:53 +01:00
Hans Goudey
b56b1ed6c1 Fix #131226: Remove named attribute node skips Grease Pencil data 2024-12-09 17:16:53 -05:00
Hans Goudey
dabca8d5ee Fix #131323: Compositor missing "Unassigned" node group assets
When there were no "Assigned" assets, the add menu would also skip
the "Unassigned" assets. Needs a correction to an early return check.
2024-12-09 17:13:49 -05:00
Clément Foucault
d01b689302 Overlay: Port usage of DRW_texture_create_* to Texture
Removes call to legacy API.
2024-12-09 23:11:29 +01:00
Hans Goudey
f9c4204b9f Tests: Add test for Set Curve Normal node with Normal input
Regression test for #131621.
2024-12-09 17:05:46 -05:00
Hans Goudey
bbb5975202 Fix #131621: "Normal" node incorrect in "Set Curve Normal" evalaution
First the normal mode was changed, then the custom normal input was
evaluated. That's incorrect because changing the normal mode changes
the output of the normal mode. The fix is to avoid changing the normal
mode until after the normals are calculated.
2024-12-09 17:01:47 -05:00
Harley Acheson
d8358edc1b Fix #131561: Adjust for Width of Modifiers in Status Bar Items
Some Status Bar icons differ in width, like "Ctrl". For these items we
have to add a spacer before the next item. Unfortunately there is one
code path where this does not happen for modifiers even though it does
for the main icon. This PR fixes this and removes the chance of icons
overlapping on the status bar.

Pull Request: https://projects.blender.org/blender/blender/pulls/131584
2024-12-09 20:18:49 +01:00