Commit Graph

145657 Commits

Author SHA1 Message Date
Miguel Pozo
97b4f99aed Fix #133483: Auto Depth broken when X-Ray enabled
Disable x-ray for depth only drawings.

Pull Request: https://projects.blender.org/blender/blender/pulls/133496
2025-01-23 17:11:54 +01:00
Ankit Meel
b858319dd3 macOS/QuickLook: support rich thumbnail in Finder
Support thumbnail that shows the file contents instead
of the default blend file icon for all files in Finder.
Some files may still have the usual blender icon as thumbnail
depending on their contents.

blender-thumbnailer process is kept alive by the system
in the background and is invoked by QuickLook when needed.

The checkbox to disable the extension is present in
the Settings app.

It will NOT be an interactive "Preview" that allows richer
interactions like Panning viewport, or rotating 3D objects.
2025-01-23 17:00:19 +01:00
Ray Molenkamp
92cd4ca295 CMake: Disable WINDOWS_PYTHON_DEBUG
The python debugger in Visual Studio for has been broken for years
but the upstream project over at https://github.com/microsoft/PTVS
show hopeful signs of life once in a while, so there is hope that
at one point this will start working again. That being said people
do keep turning this option on and end up disappointed it isn't
working and they spend a whole bunch of time on trying to get it to
work. So for now rather than removing this functionality
completely, just disable it.
2025-01-23 08:36:30 -07:00
Jacques Lucke
a449625fc4 Curves: make material index attribute builtin on curves geometry
This makes the `material_index` attribute built-in on `CurvesGeometry` which
means that it's built-in on `Curves` and `GreasePencil`. While only Grease
Pencil can use it so far during rendering, we already depend on them on curves
when converting between curves and Grease Pencil.

Making the attribute built-in implies that it is locked to one domain and type
(`Curve` domain and `int32` type in this case).

This makes curves more consistent with meshes.

Pull Request: https://projects.blender.org/blender/blender/pulls/133488
2025-01-23 16:24:22 +01:00
Miguel Pozo
8d392d41c2 Fix: GPU: GPU_indexbuf_bind_as_ssbo
Make the behavior consistent across all backends.
Clean up the GL function.

Follow-up from #132712.

Pull Request: https://projects.blender.org/blender/blender/pulls/133383
2025-01-23 15:40:45 +01:00
Miguel Pozo
49404a042e Fix: Nodes: Only look for compute contexts in geo-node trees
`find_socket_log_contexts` tries to look for `ComputeContext`s
regardless of the tree type.
This doesn't currently cause any problem in main because no other node
editor has zones, but it causes crashes in the NPR branch, and will
crash in main when other tree types add zones support.

(See https://projects.blender.org/pragma37/npr-tracker/issues/13)

Pull Request: https://projects.blender.org/blender/blender/pulls/133447
2025-01-23 15:34:12 +01:00
Brecht Van Lommel
1367a89c80 Fix: Cycles persistent data + motion blur render bugs
Objects would randomly appear and disappear, or get swapped with other
objects. This was due to a missing recalc tag, due to the object to
geometry instance mapping being incomplete.

Fix #100580
Fix #107624
Fix #132026
Fix #99281
Fix #110905

Pull Request: https://projects.blender.org/blender/blender/pulls/133490
2025-01-23 15:29:49 +01:00
Brecht Van Lommel
bd0cca5d6d Fix: Cycles Metal RT assert with persistent data render
Pull Request: https://projects.blender.org/blender/blender/pulls/133490
2025-01-23 15:29:41 +01:00
Falk David
7878b3908b Grease Pencil: Don't show material preview as "disabled"
When locking a material, the preview icon would get greyed-out (as would
the rest of the properties in the row).
This issue is that this defeats the purpose of an accurate preview of
the material. Artists want to know what the material _actually_ looks
like.

This moves the icon into a separate row and property so that
it doesn't get disabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/133478
2025-01-23 15:12:59 +01:00
Jeroen Bakker
2bd4e101a0 Fix #130106: Vulkan: Pixelbuffer performance
Cycles uses pixel buffers to update the display. Due to making things
work the vulkan backend downloaded the GPU allocated pixel buffer to the
CPU, Copied it to a GPU allocated staging buffer and update the display
texture using the staging buffer. Needless to say that a (CPU->)GPU->CPU->GPU
roundtrip is a bottleneck.

This PR fixes this by allowing the pixel buffer to act as a staging
buffer as well.

Viewport and final image rendering performance is now also similar.

| **Render** | **GPU Backend** | **Path tracing** | **Display** |
| ---------- | --------------- | ---------------- | ----------- |
| Viewport   | OpenGL          | 2.7              | 0.06        |
| Viewport   | Vulkan          | 2.7              | 0.04        |
| Image      | OpenGL          | 3.9              | 0.02        |
| Image      | Vulkan          | 3.9              | 0.02        |

Tested on:
```
Operating system: Linux-6.8.0-49-generic-x86_64-with-glibc2.39 64 Bits, X11 UI
Graphics card: AMD Radeon Pro W7700 (RADV NAVI32) Advanced Micro Devices radv Mesa 24.3.1 - kisak-mesa PPA Vulkan Backend
```

Pull Request: https://projects.blender.org/blender/blender/pulls/133485
2025-01-23 14:58:49 +01:00
Brecht Van Lommel
426a9cdcbb Fix: Rendered animation player text too small on macOS 2025-01-23 13:32:50 +01:00
Brecht Van Lommel
d5d686d540 Fix: Build error with draw test after recent cleanup 2025-01-23 13:17:20 +01:00
Pratik Borhade
1dff92e8d2 Fix #133454: Grease Pencil: Overlays not updated with selection mode
This is due to missing depsgraph update and notifiers to redraw the
viewport region. `ensure_selection_domain` returns false when entire
domain elements are/ain't selected. This makes the `changed` boolean
false that further prevents update calls. Now fixed with bitwise
condition.

Pull Request: https://projects.blender.org/blender/blender/pulls/133463
2025-01-23 12:40:21 +01:00
Pratik Borhade
01db7f00f0 Fix: Grease Pencil: Auto merge affects cyclic curves
Do not add end points of cyclic curves in KD-tree to skip them from
further processing.

Pull Request: https://projects.blender.org/blender/blender/pulls/133425
2025-01-23 12:25:44 +01:00
Sean Kim
a4a0c81cd6 Overlay: Fade Inactive Geometry filter on object being interactable
Prior to this commit, the Fade Inactive Geometry overlay would inspect
the active object and compare each other object's mode and hide them if
they did not share the same mode.

This was incorrect in the following case:
* If multiple objects were all in similar modes, as can be the case
  with "Lock Object Modes" off, or with multi-edit mode, then objects
  would remain unfaded if they shared the same mode as the active
  object.

To fix this, we explicitly check for both the active and the "other"
object being in edit mode and avoid fading in this case.

Ref: #87704
Pull Request: https://projects.blender.org/blender/blender/pulls/132255
2025-01-23 12:10:45 +01:00
Omar Emara
60468d86e9 Cleanup: Missing static qualifier for local function 2025-01-23 11:59:05 +02:00
Patrick Mours
bedf7ff0c1 Fix #132036: Minimum CUDA architecture in generated OSL PTX code
Cycles supports OptiX on Maxwell and up architectures, but the
default in OSL is to generate PTX targeting Pascal and up. Adjust the
OSL target architecture to Maxwell to fix this.

Pull Request: https://projects.blender.org/blender/blender/pulls/133011
2025-01-23 10:38:05 +01:00
Brecht Van Lommel
be67a07cae Fix #133411: Texture baking changes object visibility
The recent addition of DEG_disable_visibility_optimization in #133358
almost fixed this, but it was not fully working. By ensuring objects
are evaluated we avoid modifying original objects.

If for some reason (like a Python handler) the object is still missing,
report an error in the bake operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/133439
2025-01-23 10:35:41 +01:00
Brecht Van Lommel
dea067fb4d Fix: Particle brush effect can't be inverted with shift key
Regression from 6df437b.

Pull Request: https://projects.blender.org/blender/blender/pulls/133468
2025-01-23 10:16:47 +01:00
Brecht Van Lommel
6a67c90f64 Fix #133458: Particle add brush doesn't work
This was another case similar to #132918. Tweak asserts to properly catch
using min/max on (implicitly cast) pointers.

Pull Request: https://projects.blender.org/blender/blender/pulls/133468
2025-01-23 10:16:45 +01:00
Omar Emara
1f4e9d84d4 Compositor: Support OIDN on Arm
This patch extends the check for OIDN support to include Arm on Windows
and Linux. This is identical to and copied from Cycles.

Pull Request: https://projects.blender.org/blender/blender/pulls/133467
2025-01-23 10:01:07 +01:00
Campbell Barton
5f73d422ff Docs: correct code-comment for TextVars::cursor_offset 2025-01-23 15:53:52 +11:00
Campbell Barton
3f31edd4c0 Extensions: exclude development files from installation 2025-01-23 15:41:47 +11:00
Campbell Barton
89d51c7535 Extensions: add an error when building an add-on without an init file
- Add a check that the file list includes an `__init__.*` path.
- Normalize paths so they can can be compared with string literals.
2025-01-23 15:28:02 +11:00
Sean Kim
47bc05f7ae Tests: Add bke::pbvh::Tree::from_mesh unit test
This commit adds a unit test for the `bke::pbvh::Tree::from_mesh` method
covering the basic mesh usecase. Further work to add the multires
and BMesh versions will come in subsequent commits.

Pull Request: https://projects.blender.org/blender/blender/pulls/133074
2025-01-23 00:59:48 +01:00
Jesse Yurkovich
86ab7b7cb7 Fix: USD: Out of bounds access while building armature deform groups
If a USD file has joint indices outside the range of the joints list,
it's possible for our code to assert or crash depending on build
configuration.

One particular file had 289000 indices, nearly all of which were outside
the list which contained just 1 joint value. Instead of continuing when
this is detected, trace an error and immediately return as it's probably
unsafe to continue. This also resulted in many thousands of warning
traces before.

Pull Request: https://projects.blender.org/blender/blender/pulls/133419
2025-01-23 00:33:45 +01:00
Alaska
b1a6188e78 Tests: Add render tests for mie scattering with small particle sizes
A recent commit in Blender 4.4 added support for rendering the Mie
volume scatter function with particle sizes less than 5um.

This commit adds a test for various sizes below 5um.

Ref: blender/blender#123012
Ref: blender/blender-test-data!36
Ref: blender/blender@c99b7e66b2
2025-01-23 00:22:17 +01:00
Hans Goudey
5921ca8a9f Cleanup: Pass IndexMask by const reference 2025-01-22 17:38:14 -05:00
Hans Goudey
b2bbb0a8fb Cleanup: Remove unused includes in functions module
Pull Request: https://projects.blender.org/blender/blender/pulls/133455
2025-01-22 23:29:33 +01:00
Hans Goudey
0a2d5d5801 Fix #133267: Sculpt "Persistent Base" doesn't work for mesh and multires
These geometry types don't work properly with attributes currently,
so the persistent base isn't really "persistent" and doesn't last after
exiting sculpt mode, but it's still useful for it to work within a
sculpt session. Enable that by adding temporary array storage in
`SculptSession`. During the sculpt refactor project I mistakenly
assumed that this didn't work well enough that anyone would use it.

Pull Request: https://projects.blender.org/blender/blender/pulls/133410
2025-01-22 22:33:13 +01:00
Ray Molenkamp
98addc0191 Windows: Minor clang-cl changes
- WITH_WINDOWS_EXTERNAL_MANIFEST is now required even for ninja
builds, this previously was not the case. so just apply it
across all build flavours on windows.

- fmsc-version=1922 is no longer needed, was required back when
support for clang on windows landed, is fine without it now.

- /MP gives better build performance when building from the IDE
makes no difference for a ninja build which wasn't struggling in
that department anyhow.
2025-01-22 13:18:57 -07:00
Sean Kim
b24d8822ef Build: Add config print for WITH_AUDASPACE and WITH_OPENSUBDIV
This commit adds two entries into the "Build Options:" CMake print to
assist in verifying configuration both locally and on the buildbot.

Pull Request: https://projects.blender.org/blender/blender/pulls/133409
2025-01-22 21:05:26 +01:00
Harley Acheson
62a0350f6d Fix #91223: Draw Non-Object Active Items in Text Hi
In the Outliner, draw the text of active collections, scenes, and view
layers in "text highlight" color, by default a brighter white than the
regular items. This helps differentiate the active ones a bit better
and also allows them to be themed separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/133390
2025-01-22 20:24:54 +01:00
Hans Goudey
e07cd2b982 Cleanup: Remove unused and transitive includes in draw module
Especially through DRW_render.hh, there were a lot of unnecessary
includes almost everywhere in the module. This typically makes
dependencies less explicit and slows down compile times, so switch
to including what files actual use.

Pull Request: https://projects.blender.org/blender/blender/pulls/133450
2025-01-22 19:37:38 +01:00
Julian Eisel
efadb938f0 Fix #132422: Crash when opening UV editor from shader editor
Fixes: #132422, #133288.

`ED_area_init()` is called when the editor in an area changes, this also changes
the available regions. That means, region polling needs to be executed. The
crash was happening because that wasn't the case, and the asset shelf region was
initialized before the polling was executed, which allocates region data in the
`on_poll_success()` callback.

Also had to pass context to `ED_area_init()`, which is an annoyance, but should
be fine. Similar functions like `ED_area_exit()` take it too.

Pull Request: https://projects.blender.org/blender/blender/pulls/133388
2025-01-22 19:24:38 +01:00
Harley Acheson
0b38b3b2b1 UI: Status Bar Display for GPENCIL_OT_annotate
Simplify the status bar display for "Annotation Draw"

Pull Request: https://projects.blender.org/blender/blender/pulls/133402
2025-01-22 19:19:42 +01:00
Ray Molenkamp
7c657e250e make.bat: remove 2019pre support and update help
2019 no longer has a preview track, so support for it can
safely be removed. The help also incorrectly advertised
asan as a clang only feature, which is no longer true as
msvc supports it these days.
2025-01-22 11:12:11 -07:00
Hans Goudey
d54a7bcb11 Cleanup: Use reinterpret_cast instead of two static casts 2025-01-22 12:50:01 -05:00
Bastien Montagne
8435c03061 Fix missing header in materialX code.
Fairly weird, debug builds were fine, but release ones with clang 19
and mold failed at linking step, complaining about misisng
`bNode::output_sockets()` symbol.

Guess debug config somehow pulls this symbol from somewhere else?
2025-01-22 18:43:27 +01:00
Iliya Katueshenock
ef8808d990 Cleanup: Compositor: Ghost data of a node storage
Since 4cf7fc3b3a (where a storage handling being added) a render layer node never has persist storage data.
And even more, some code of node update do use storage field as temporal variables for a callback so no any data can live forever in this place.
No one copy/initialize/free callback of the node also does not deal with node storage.
And compositor code also don't know about node storage since use different data from a node (id and custom1 fields).

Pull Request: https://projects.blender.org/blender/blender/pulls/132717
2025-01-22 18:19:39 +01:00
Miguel Pozo
20bd132703 Fix: Overlay-Next: Jagged wireframes when Overlay AA is disabled
Fixes the issue described in
https://projects.blender.org/blender/blender/issues/132895#issuecomment-1390739.

Pull Request: https://projects.blender.org/blender/blender/pulls/133446
2025-01-22 17:18:37 +01:00
Hans Goudey
a704d47a04 Fix #133429: Bevel modifier crash with empty mesh
Attribute domain interpolation would fail in this case. Instead of
checking for that, just add an empty check at the modifier entry point.
2025-01-22 10:32:09 -05:00
Brecht Van Lommel
14facb987e Fix #132367: Cycles tiled render cancel still does slow denoise
Read the tiles back from disk, but don't run denoiser.

Pull Request: https://projects.blender.org/blender/blender/pulls/133443
2025-01-22 15:54:41 +01:00
Brecht Van Lommel
e31077ca4c Fix #132148: Assert using rendered animation playback
Don't close file handle twice.
2025-01-22 15:52:09 +01:00
YimingWu
053d817a75 Fix (unreported): Assert when right clicking on image editor tools
When right clicking on any of the image editor tool buttons,
`WM_keymap_guess_from_context` would be called but lack of `space_type`
will cause `WM_keymap_find_all` to return `nullptr`. Assigning it to
`SPACE_IMAGE` fixes the issue.
2025-01-22 22:28:26 +08:00
Philipp Oeser
c0e881cebf Sculpt: avoid adding ".sculpt_mask" attributes in certain cases
Mask layers were added (unnecessarily) in these cases:
- calling `Mask Slice` without having a mask even (now return
`OPERATOR_CANCELLED` early)
- calling `Mask Extract` without having a mask even (now return
`OPERATOR_CANCELLED` early)
- `Extract Face Set` was also adding a mask layer (only because both
extracts used `geometry_extract_apply`), moved mask specific stuff into
`paint_mask_extract_exec` (see above also)

Came up in !123888

Pull Request: https://projects.blender.org/blender/blender/pulls/133435
2025-01-22 15:25:25 +01:00
Omar Emara
549c724f78 Revert "Cleanup: Remove check for SSE4.1 in denoise node"
This reverts commit 19e9092cb6. The
minimum requirement is for builds that Blender officially provides. We
still need to maintain code for none SSE builds.
2025-01-22 16:15:21 +02:00
Omar Emara
19e9092cb6 Cleanup: Remove check for SSE4.1 in denoise node
Blender now has a minimum requirement of 4.2, so no need to check for
SSE4.2 support in the denoise node.
2025-01-22 15:11:22 +02:00
Hans Goudey
7177dca600 Fix: Incorrect interface/tooltip translation check
These panel header labels should be translated when the interface
is translated but they checked for tooltip translation instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/133412
2025-01-22 14:05:59 +01:00
YimingWu
8620f0286a Fix #133414: Sequencer: Ensure valid UTF-8 sequence when pasting text
`TextVars::text` is only 512 bytes and does not include string ending
byte, and `sequencer_text_edit_paste_exec` uses a very simple truncation
that didn't guarantee valid UTF-8 sequence at the end. This is now fixed
by using `BLI_str_utf8_invalid_strip` after truncating the string.

Pull Request: https://projects.blender.org/blender/blender/pulls/133416
2025-01-22 13:00:01 +01:00