Commit Graph

146062 Commits

Author SHA1 Message Date
Jeroen Bakker
7f04a4fef3 Fix: Vulkan: Stalling shader compilation
This PR fixes an issue that shaders compilation could stall. This could
be seen in the viewport (sometime not showing first EEVEE render) but
was more prominent when running test cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/134020
2025-02-04 09:49:28 +01:00
Philipp Oeser
2a9b3573f5 Fix #131830: context.property missing prefix to struct
Caused by 59dc67974a

The behavior of `RNA_path_from_ID_to_property` /
`RNA_path_from_ID_to_property_index` is that it only gets the "prefix"
of the struct -- the one we are looking for, the one that is missing
here -- if we feed it the `newptr` since it calls
`RNA_path_from_ID_to_struct(ptr)` to get that prefix.
If we feed it the **ID** pointer it will be empty (makes sense it would
basically be "path from ID to ID"...we need it to be "path from ID to
constraint").

Pull Request: https://projects.blender.org/blender/blender/pulls/133977
2025-02-04 09:37:35 +01:00
Omar Emara
e53ac805af Compositor: Avoid redundant output computations
This patch allows the compositor context to specify exactly which
outputs it needs, selecting from: Composite, Viewer, File Output, and
Previews. Previously, the compositor fully executed if any of those were
needed, without granular control on which outputs are needed exactly.

For the viewport compositor engine, it requests Composite and Viewer,
with no Previews or File Outputs.

For the render pipeline, it requests Composite and File Output, with
node Viewer or Previews.

For the interactive compositor, it requests Viewer if the backdrop is
visible or an image editor with the viewer image is visible, it requests
Compositor if an image editor with the render result is visible, it
requests Previews if a node editor has previews overlay enabled. File
outputs are never requested.

Pull Request: https://projects.blender.org/blender/blender/pulls/133960
2025-02-04 08:34:48 +01:00
Campbell Barton
46e393e9b8 Refactor: pass in context arguments to view3d minmax functions
Remove the bContext argument from view3d_calc_minmax_{visible/selected},
this ensures only input arguments are used.
2025-02-04 18:14:00 +11:00
Sean Kim
8911d7136c Fix: BRUSH_INVERT_TO_SCRAPE_FILL flag applies for too many brushes
The `BRUSH_INVERT_TO_SCRAPE_FILL` check inside `brush_flip` applies to
any brush instead of just the Fill and Scrape brush, this means that if
an asset is in a weird state where the user has enabled this flag but
switched away from the brush type, the flag still applies even though
the option is no longer visible.

This commit checks the brush type to ensure it only applies to the
specified types.

Pull Request: https://projects.blender.org/blender/blender/pulls/134014
2025-02-04 07:10:00 +01:00
Campbell Barton
ebc918c717 Cleanup: use "ndof_" prefix for RegionView3D rotation & angle
These values are only ever used by NDOF, name them accordingly.
2025-02-04 15:20:32 +11:00
Alaska
8454b59d7a Tests: Offset white noise texture coordinates by a small amount to avoid precision issues in EEVEE
The white noise test is failing on macOS EEVEE Metal.
This seems to be a precision issue related to the texture coordinates
being snapped on a whole number.

This commit adds a small offset to the texture coordinates prior to the
snapping to try and avoid this issue.

Ref: blender/blender-test-data!53
Pull Request: https://projects.blender.org/blender/blender/pulls/134010
2025-02-04 04:57:31 +01:00
Campbell Barton
6fcd84721c Cleanup: quiet some warnings from check_pep8 target 2025-02-04 14:51:17 +11:00
Campbell Barton
95393726b0 Cleanup: quiet check_spelling_* warnings 2025-02-04 14:43:20 +11:00
Campbell Barton
7a783269bb Fix error setting image pack/unpack poll message
Error in [0] to fix #131894 caused the poll message to be ignored.

[0]: 35a4b2ca69
2025-02-04 14:40:56 +11:00
Pratik Borhade
dc90b65689 Fix #92406: Cannot set new hotkey to transfer sculpt mode
New shortcut assigned to operator goes inside "object mode" keymap
intead of `non-modal`. Now fixed with extra condition, since this
operator works in non-object modes. Reason it fails with "object
mode" keymap is the keymap->poll function `object_mode_poll`.

Pull Request: https://projects.blender.org/blender/blender/pulls/133796
2025-02-04 03:45:31 +01:00
Pratik Borhade
9ddf63aa83 Fix #133912: Outliner elements faded when contents filter is disabled
Actually a mistake in f4f2248a9c. `TE_CHILD_NOT_IN_COLLECTION`
flag is set on tree elements if they belong to different collection. Use
this flag instead to grey out the tree element.

Pull Request: https://projects.blender.org/blender/blender/pulls/133962
2025-02-04 03:27:34 +01:00
Gilberto.R
2c049fcc55 UI: Show successful export notification for obj, ply and stl
Report that the file has been successfully exported for obj, ply and stl exports.

Pull Request: https://projects.blender.org/blender/blender/pulls/133940
2025-02-04 03:01:35 +01:00
Germano Cavalcante
1a362429e8 Knife: Improve precision at knife line intersections 2025-02-03 20:16:55 -03:00
Germano Cavalcante
1aaf16641a Refactor: Knife - Pass 'mval' and related as params instead in the struct 2025-02-03 20:16:54 -03:00
Germano Cavalcante
60c7c5483f Refactor: Knife - Remove redundant redraw calls
And avoid excessive calls to `knife_update_mval`, as this function is
computationally expensive
2025-02-03 20:16:54 -03:00
Sean Kim
adda1b085b Cleanup: Remove no longer relevant assert
Missed in 1b80125a67

With the above commit, this assert and comment is no longer relevant, we
now clean up `ustack->step_init` if it is set.

Pull Request: https://projects.blender.org/blender/blender/pulls/133993
2025-02-03 23:33:11 +01:00
Sean Kim
2ab8dd220a Cleanup: Rename plane.cc
Pull Request: https://projects.blender.org/blender/blender/pulls/134005
2025-02-03 23:31:55 +01:00
Jesse Yurkovich
ad242d3397 Cleanup: Fix warning for copying SdfPath variables
Pull Request: https://projects.blender.org/blender/blender/pulls/134006
2025-02-03 23:29:14 +01:00
Sean Kim
108e64a481 Revert "Cleanup: Remove duplicated header include"
This reverts commit 8363dd6c0d.
2025-02-03 13:36:15 -08:00
John Kiril Swenson
f79df39171 VSE: Move snap toggle to global SequencerCommon
This allows the keybind to be invoked from either the Sequencer or
Preview view types, now that snapping is also possible in the Preview.
2025-02-03 15:02:41 -06:00
Sean Kim
8363dd6c0d Cleanup: Remove duplicated header include
Pull Request: https://projects.blender.org/blender/blender/pulls/133990
2025-02-03 21:47:14 +01:00
Xavier Hallade
886cd0244f Build: Work around VS2019 compiler error when compiling DPC++
Pull Request: https://projects.blender.org/blender/blender/pulls/132763
2025-02-03 20:58:00 +01:00
Xavier Hallade
bdb093f58d Build: upgrade DPC++/Level-Zero to 6.0.0-rc1/1.19.2 releases
including a backport of device image compression:
https://github.com/intel/llvm/pull/15124 that can be enabled by adding
`--offload-compress` compiler option.
2025-02-03 20:58:00 +01:00
Xavier Hallade
7fb480095e Build: Embree: upgrade from 4.3.2-blender to 4.3.3 2025-02-03 20:58:00 +01:00
Julien Duroure
6999f34ec1 glTF: Bump version to 4.4.42 after recent changes 2025-02-03 20:35:05 +01:00
Julien Duroure
c089c176cb Refactor: glTF: followup ActionKeyframeStrip.channels() rename
- Use slot identifier instead of slot handle
- Change API calls after changes in Blender (in PR #133868)
- Refactoring, avoiding duplicate functions

Pull Request: https://projects.blender.org/blender/blender/pulls/133915
2025-02-03 20:32:00 +01:00
Xavier Hallade
e7589f8973 Fix: Cycles: Missing texture transfers in oneAPI backend
Since 2cfe2e0bfe, textures were not being
allocated nor transfered to device.

This fix improves the situation reported in
https://projects.blender.org/blender/blender/issues/133953 but is not
enough to make all unit tests pass.
2025-02-03 20:20:21 +01:00
Sybren A. Stüvel
226486aa91 Refactor: Anim, rename and adjust ActionKeyframeStrip.channels()
Rename `ActionKeyframeStrip.channels()` to `.channelbag()`, and change
its first parameter from `slot_handle` to `slot`.

This is to be consistent with `ActionKeyframeStrip.channelbags`, which is
the array of channelbags in the keyframe strip. Having a function that's
singluar makes sense for finding a single element in the array.

The change from using the slot handle to using the slot is to be consistent
with `.channelbags.new(slot)`. Furthermore, the Python API should be using
slot handles as little as possible (they're basically meaningless numbers).
Using the slots directly is preferred. If that's not possible, it is
recommended to use the slot identifier (`slot.identifier`) instead, as that
can be used to look up the slot (`action.slots[slot_identifier]`).

This breaks the glTF add-on, which will be fixed in !133915.

Pull Request: https://projects.blender.org/blender/blender/pulls/133868
2025-02-03 20:19:00 +01:00
T0MIS0N
a9c6889eb4 Fix #133453: Canvas button cannot be enabled
This fixes an issue where the Canvas button is always disabled when
trying to use the experimental feature, Sculpt Texture Paint.

This bug was caused by the new Asset System since it changed how paint
tools work. Before, the UI would check the current tool being used and
determine if the Canvas button should be activated. With the new Asset
System, painting is done with modular brushes instead of tools, so
previous methods of checking tool properties have stopped working.

This is fixed by activating the Canvas button based on the properties
of the current brush. If the brush's type is either Paint or Smear,
then the Canvas button is activated.

Co-authored-by: T0MIS0N <50230774+T0MIS0N@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/133566
2025-02-03 19:50:33 +01:00
Hans Goudey
4e18ebee1b Cleanup: Make paint BVH update tags proper private members
Move some functions to be methods of pbvh::Tree instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/133989
2025-02-03 19:36:33 +01:00
Julian Eisel
7d54bfb49c Refactor: Asset system function to get asset libraries as RNA enum
We need some more control through the API here, e.g. for #132747. I
rather make things very explicit on the API calling side.
2025-02-03 19:08:09 +01:00
Clément Foucault
7bdafde54c Fix #133138: Overlay: Assert displaying subdiv surface modifier in edit-mode
The cause was that the shader was expecting both `pos` and `nor`
attribute but only one would be extracted.
This is because the mesh has cage display on but the batch cache
wouldn't extract the `vbo.vnor`.

This patch just make sure the vertex normal just follow the same
condition as the other edit normals batches.
2025-02-03 19:04:05 +01:00
Clément Foucault
b0980a1419 Fix: Overlay: Edit Mesh: Fix normal display with GPU subdivision
Make sure the gpu subdiv shader variant is only used if there
is no cages as the requested batch has a different layout in
this case.

Also add the missing shader variant for vertex normal display
with GPU subdiv.
2025-02-03 19:04:05 +01:00
Clément Foucault
724a065cdc Fix: Overlay: Edit mesh normals display not writting to line buffer
Shader was missing a framebuffer output.
Similar to 58cb2e43a1
2025-02-03 19:04:05 +01:00
Jesse Yurkovich
6c11811710 Cleanup: USD: Use the SdfPath type rather than a std::string
Instead of converting to a string immediately, only convert to a string
when necessary, like for trace logging. This reduces the size of the
`USDPrimReader` base class by 24 bytes, makes several Vectors and Maps
smaller at runtime, and reduces some unnecessary string allocations and
conversions in various other places.

The recently added python Hook `get_prim_path` dictionary will now
contain `SdfPath` objects rather than strings; removing the string
conversion cost when calling other USD APIs like `GetPrimAtPath` which
take in `SdfPath` objects to begin with.

This also makes the code a bit more self explanatory since the type
makes it clear what kind of path you are dealing with.

Pull Request: https://projects.blender.org/blender/blender/pulls/133954
2025-02-03 18:44:07 +01:00
Bastien Montagne
35a4b2ca69 Fix #131894: Linked images can be upacked and file-browsed.
Add proper checks for editable ID to image pack/unpack and file_browse
operators.

Also add similar check to `unpack_item` operator, although in that case
the check has to happen in exec callback, as poll function would not
have required info.
2025-02-03 18:29:14 +01:00
Hans Goudey
1d599b0073 Fix: MSVC build error after recent cleanup 2025-02-03 11:56:18 -05:00
Hans Goudey
e0f44dc8af Fix #133937: Grow/Shrink Visibility missing draw data update
Missing part of b77ff173b0.
2025-02-03 11:33:18 -05:00
Julian Eisel
0225c4635d Cleanup: Remove redundant asset loading icon handling
Since 1f88645728 the loading icon is managed by the UI code, no need to
explicitly set it here.
2025-02-03 16:49:17 +01:00
Hans Goudey
2ea843d141 Cleanup: Remove redundant default constructor assignment
`FindClosestData` already has a default constructor, `= {}`
is unnecessary.
2025-02-03 10:43:15 -05:00
Hans Goudey
5754b28807 Fix #133942: Incorrect curve domain selection comparison
Missing change in ae1a1335b9.
2025-02-03 10:43:15 -05:00
Jeroen Bakker
dda23c53f8 Metal: Add native tile input to workarounds
Native tile input wasn't part of the MTLCapability struct, but stored locally
in the shader generator and checked in MTLFramebuffer. This PR moves it
to the MTLCapability struct and disables it when workarounds are forced.

Pull Request: https://projects.blender.org/blender/blender/pulls/133818
2025-02-03 16:36:15 +01:00
Julian Eisel
4755503356 UI: Draw subtle background for preview items in menus
Draw a subtle background to make individual parts of each item feel more
connected. E.g. showing loading icons or labels might make it feel like
a bunch of floating icons/labels.

Suggested in #133880.

Pull Request: https://projects.blender.org/blender/blender/pulls/133980
2025-02-03 16:11:55 +01:00
Julian Eisel
1f88645728 UI: Draw loading icon while previews load
Show a dimmed loading icon while previews are being loaded in a
background thread. The asset shelf and asset/file browsers do this
similarly already.

This is implemented in drawing code, so the loading icon will always
appear when an in-progress preview is being drawn. I experimented with
doing this in `ui_def_but_icon()`, but this won't update correctly with
popups that don't support full refreshing.

This also makes any normal icon that is drawn as preview use the normal
icon size. These icons are usually made for smaller sizes and look very
outblown when displayed at the size of a preview. Yet it's useful to
sometimes pass a normal icon. E.g. for the asset shelf we would already
draw the data-block type icon in place of the preview if there was no
preview to display, and we'd use the normal, smaller size already.
Larger can still be drawn differently.
I don't know of any current cases this would affect though.

Pull Request: https://projects.blender.org/blender/blender/pulls/133880
2025-02-03 16:03:06 +01:00
Bastien Montagne
e283a7097c I18N: Updated UI translations from git/weblate repository (e2b464b136d94). 2025-02-03 16:00:47 +01:00
Bastien Montagne
5c1749f7b7 Refactor: Move 'need link' and 'need expand' ID tags to runtime readfile data.
Also adds a new `BLO_readfile_id_runtime_tags_for_write` accessor to
ensure readfile data is created before assigning a tag value.

Followup to 2ec1b6887d. Should cover the last existing ID tags that
can be moved to temp runtime readfile ID data.

This reverts commit aff2cf97a1, and re-apply 2612b27e42 fix the issue
fixed.
2025-02-03 15:18:19 +01:00
carnaval
0e7924ac25 Fix: add missing dependencies for object and collection value nodes
The new Object and Collection constant geometry nodes do not register their dependency on their targets.
This causes the graph not to update properly when they are modified.

Pull Request: https://projects.blender.org/blender/blender/pulls/133784
2025-02-03 15:16:07 +01:00
Jacques Lucke
7c011440c6 Fix #133925: crash when removing animated input socket 2025-02-03 15:14:38 +01:00
Clément Foucault
f4a214166e Fix #133754: Overlay: Geometry Nodes viewer displays blue color for instances
Shader was missing a framebuffer output.
Similar to 58cb2e43a1

On top of that was that the push constant was not
using the right overload.
2025-02-03 15:00:08 +01:00