Commit Graph

152312 Commits

Author SHA1 Message Date
Alaska
8a6d706d77 Utilities: Add batch files to help launch Blender with different GPU backends
With Vulkan now having general feature parity with OpenGL, but with
some stability issues, it has become more important to offer ways for
users to quickly launch Blender with the OpenGL or Vulkan backend
in case Blender is unable to open with one of them.

This commit adds three new batch files to help with this:
- `blender_factory_startup_vulkan.cmd`
  - Launches Blender with factory settings, but with Vulkan enabled.
    Useful for helping test if a Vulkan crash at startup is related to
    a addon.
- `blender_startup_opengl.cmd`
  - Simply launches Blender with the OpenGL backend. It does not change
    any other settings. Useful in case a user has complex user
    preferences, enabled Vulkan for testing, and now Blender crashes on
    startup. Now they want to switch back to OpenGL and they don't want
    to lose their complex user preferences by using
    `blender_factory_startup.cmd`
- `blender_startup_vulkan.cmd`
  - Simply launches Blender with the Vulkan backend. It does not change
    any other settings. Useful for people that encounter #127835 after
    a Windows update. This issue can be worked around by using Vulkan.
    But if you are experiencing the issue and are on the OpenGL
    backend, you can't use the Blender interface and so you can't
    easily switch to the Vulkan backend without the command line
    or a script like this.

Pull Request: https://projects.blender.org/blender/blender/pulls/142169
2025-07-24 09:15:52 +02:00
Aras Pranckevicius
71ad809bbe Fix #141095: VSE thumbnails drift horizontally when resizing the timeline vertically
Looks like almost everywhere else, the v2d mask size is calculated
as "v2d->mask size plus one". This is the zoom ratio that the V2D
resizing tries to keep constant, etc.

However the VSE timeline drawing code, when calculating the pixel
scaling factors, used the v2d->mask size without adding +1.
This resulted in a very slight zoom ratio change when resizing the
timeline area, which is made larger because thumbnails are often more
wide than narrow, and many of them are laid out next to each other.

Pull Request: https://projects.blender.org/blender/blender/pulls/142952
2025-07-24 08:52:44 +02:00
Aras Pranckevicius
09a47a9a88 Cleanup: remove manually-ran IMB_performance_test
The performance test was added in 6d93bf6b44, but I don't think
anyone has ever ran it since then. And due to how IMB library
depends on BKE, this drags in "almost all of blender" into the test
executable, resulting in non-trivial link times that everyone
pays for. Just remove it.
2025-07-24 09:51:00 +03:00
Jesse Yurkovich
cd6c338ba5 Fix #142972: FBX/USD import crash filling shape key data on empty mesh
The call to `BKE_keyblock_convert_from_mesh` can leave the KeyBlock's
data field null if the passed in mesh has no verts.

Continue to allow the shape keys to be created, but do not attempt to
actually fill them in with data. This seems to match the old FBX
importer's behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/142995
2025-07-24 08:43:14 +02:00
Aras Pranckevicius
0347e72778 Cleanup: fix compile warning 2025-07-24 09:37:46 +03:00
Mattias Fredriksson
1affb8de2f Cleanup: simplify OBJ export_frame() into separate functions
Separates export_frame() into individual functions for opening file streams
and writing .mtl and .obj data. This makes the code clearer in what and when
data is written to each stream by not interleaving .obj/.mtl writing. It also
simplifies the logic by separating out handling/branching for file streams
and .mtl writing.

Pull Request: https://projects.blender.org/blender/blender/pulls/142918
2025-07-24 08:34:21 +02:00
Jacques Lucke
a57709ca25 Fix #142828: broken socket usage inference for some nodes
The issue was an oversight in f7f18cd0c7.

This patch also adds some unit tests that would have caught this error.

Pull Request: https://projects.blender.org/blender/blender/pulls/143026
2025-07-24 08:13:34 +02:00
илья _
e15537c049 Nodes: clamp new node starting position to region bounds
Simular to #141838.

Trivial clip of top left node corner to area of editor +-10% at all sides.

Pull Request: https://projects.blender.org/blender/blender/pulls/142479
2025-07-24 07:43:48 +02:00
Campbell Barton
ea99acb6a2 Fix #107021: Knife cursor lost after status bar pan
Check the modal cursor isn't set before overwriting it for 2D viewport
operators.

Match behavior for image & movie-clip navigation.
2025-07-24 04:37:34 +00:00
Campbell Barton
c1b2a1af74 Cleanup: quiet unused warnings 2025-07-24 14:37:28 +10:00
Campbell Barton
c3b8702466 GHOST: ignore GHOST_ASSERT in release builds
Error in [0] made GHOST assert in release builds.

[0]: 4d227dd593
2025-07-24 01:10:25 +00:00
Campbell Barton
f256e7141a Cleanup: use '*' prefixed multi-line comment blocks 2025-07-24 10:48:04 +10:00
Campbell Barton
d5cbc79982 Cleanup: format 2025-07-24 10:28:21 +10:00
Aaron Carlisle
29b3679b10 Fix: UI Use title case for property text
Reported in blender/blender-manual#105127
2025-07-23 20:16:52 -04:00
Jesse Yurkovich
b248c83027 USD: Remove the export_textures export operator property
This property was superseded by the `export_textures_mode` property in
Blender 4.3 where we left the old property in place to prevent breaking
changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/142740
2025-07-23 22:08:43 +02:00
Jacques Lucke
f50699d80a Refactor: Geometry Nodes: use a single string identifier for closure/bundle items
Previously, we used `SocketInterfaceKey` as identifier for bundle and closure
items. It contained multiple identifiers (although only one was ever used so
far). The idea was that multiple identifiers could provide more flexibility.
E.g. an Evaluate Closure node could work with closures with slightly different
identifier names, or a bundle could be passed into different systems that expect
the same data but named differently.

The added complexity by allowing for this is greater than I anticipated even
though most places didn't even support multiple identifiers yet. In addition to
that, it seems like there may be simpler workaround for many situations where
multiple identifiers were supposed to help. E.g. one could just add the same
value to a bundle twice with different names or one can build a node group that
maps a bundle for one system to one for another system.

Overall, the complexity of `SocketInterfaceKey` didn't seem worth it, and we can
probably just build a better system when we don't allow multiple identifiers per
item.

Pull Request: https://projects.blender.org/blender/blender/pulls/142947
2025-07-23 21:26:51 +02:00
Ray Molenkamp
6c80332f0f Win: Disable bug report button on crash dialog
This workflow has some issues that lead to a large influx of low
quality reports, remove the button for now until a better workflow
has been put in place.

Pull Request: https://projects.blender.org/blender/blender/pulls/142272
2025-07-23 16:57:15 +02:00
Hans Goudey
d6252aa59a Mesh: Slightly optimize edit UV triangles index buffer full selection
It's simple to skip some work when all the triangles will be rendered
in the UV editor (though theoretically the best option would be to
share the non-UV triangle index buffer in this case).
2025-07-23 10:49:01 -04:00
Hans Goudey
e53e736453 Mesh: Parallelize edit UV triangle index buffer creation
Avoid function call overhead, add consistency between BMesh
and Mesh, parallelize filling the data and calculating the selection,
and avoid over-allocation in the cases where not all triangles will
be rendered.

Pull Request: https://projects.blender.org/blender/blender/pulls/142880
2025-07-23 15:24:30 +02:00
Aras Pranckevicius
025019e74d Fix #142853: adding a VSE effect displays stale frame
VSE final image cache invalidation for the newly added effect
strip was invoked before the strip time range values were set,
effectively not invalidating anything.

Pull Request: https://projects.blender.org/blender/blender/pulls/142854
2025-07-23 15:08:50 +02:00
Hans Goudey
61cf76071b Fix #142785: Sculpt mode multires fast navigate artifacts
Part of the index buffer was uninitialized. Don't upload that part.
Similar to d84f10f2a0.

Pull Request: https://projects.blender.org/blender/blender/pulls/142891
2025-07-23 14:38:10 +02:00
YimingWu
59625019b8 Fix #139530: Modeling: Allow adding snap points in increment/grid modes
Previously if only Increment/Grid Snap Targets are selected, transform
tools will not allow adding snap targets, although if there are extra
snapping target type enabled, you are still able to add grid points as
new snap points anyways, thus remove the restriction.

Pull Request: https://projects.blender.org/blender/blender/pulls/139534
2025-07-23 14:31:14 +02:00
Brecht Van Lommel
d8c256da2c Fix #142399: Object dimensions with GPU subdivision off are inaccurate
They are already known not to take into account the subdivision when GPU
subdivision is on, see #96598. When GPU subdivision is off we can keep them
accurate though.

Pull Request: https://projects.blender.org/blender/blender/pulls/142729
2025-07-23 14:24:35 +02:00
Brecht Van Lommel
7f0f8d4e94 PyDoc: Document all app handler arguments
Previously this was only done for a couple handlers.

Ref #142330

Pull Request: https://projects.blender.org/blender/blender/pulls/142873
2025-07-23 14:23:21 +02:00
Hans Goudey
9ea9d3b777 Fix #142087: Use true normals in solidify modifier
The behavior was changed by d3f84449ad.

It's unclear whether considering custom normals is the "correct"
behavior here. Intuitively it makes more sense to use the true normals
for solidify because the purpose is generally to create even offsets
from existing goemetry. It's also valuable to just restore the old
behavior. A hypothetical node-based solidify would probably provide the
option to customize the offset vector.

Pull Request: https://projects.blender.org/blender/blender/pulls/142892
2025-07-23 14:22:15 +02:00
Anthony Roberts
6af07a8abb Vulkan: Update Qualcomm driver version check
Resolves #142859

I have been informed by Qualcomm that this public version should be functional to the same degree as the one given to Jeroen for testing

Pull Request: https://projects.blender.org/blender/blender/pulls/142949
2025-07-23 13:48:10 +02:00
Campbell Barton
5e3db5fbb0 Cleanup: consistent use of back-ticks in code-comments 2025-07-23 20:59:16 +10:00
Campbell Barton
81535a470c Docs: document prepare_fn parameter 2025-07-23 20:59:16 +10:00
Weizhen Huang
bb689687a7 Fix #140892: Cycles: equiangular sampling numerical issue
When `delta` is significantly larger than the difference between `tmin`
and `tmax`, the precision of `theta_a` and `theta_b` reduces, resulting
in banding artefacts.

For equiangular sampling, we use uniform sampling to fix this case.

For light tree, we use the equality
atan(a) + atan(b) = atan2(a + b, 1 - a*b).

Pull Request: https://projects.blender.org/blender/blender/pulls/142845
2025-07-23 12:56:11 +02:00
Sergey Sharybin
5f230eec8e Cleanup: Use tabs for indentation in ,gitmodules
Makes indentation style consistent in the git modules configuration.
2025-07-23 12:50:24 +02:00
Omar Emara
b73d085e88 Fix: Crash when group node has no Group Output node
The compositor crashes when a group node has an output that is connected
to the compositor output, but the group internally has no Group Output
node. That's because the derived node tree structure would return a null
origin socket for this case, but the null socket is not handled by the
code. To fix this, we assume the input socket in such cases.

Pull Request: https://projects.blender.org/blender/blender/pulls/142944
2025-07-23 11:38:33 +02:00
Omar Emara
1ef8822342 Cleanup: Remove confusing statement from Alpha Over tooltip 2025-07-23 12:37:13 +03:00
Campbell Barton
50f60dbe2d Fix #142633: Crash calling bmesh.ops.split from Python
The bmesh.ops.split operator could include deleted edges as the keys
for `boundary_map`.

Resolve by replacing deleted edges with so the same edge is used for
the key & value, needed so the boundary_map can access the entire
boundary, even when it's source edges have been deleted.
2025-07-23 09:30:48 +00:00
Jacques Lucke
2e48d33101 Geometry Nodes: improve internal bundle api
This extends the API for bundles in two main ways:
* Adds support for working with paths to reference nested bundles directly.
* Adds support for typed add/lookup, also taking into account implicit conversions.

Some unit tests have been added as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/142942
2025-07-23 11:23:32 +02:00
Trantor
665aff0797 UI: Change default height of bookmark UIList
Update bookmark UIList, so it appears same as Vertex Groups,
Shape Keys, etc. (by default 3 and 5 rows visible depending on
element count)

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/141790
2025-07-23 11:00:49 +02:00
Jesse Yurkovich
f154b03cea Tests: add new Curves datablock to IO report
Add the new Curves datablock type to the IO report. This was created
for the new hair system but is more generally used for any type of curve
generated within geometry nodes.

The report itself is mostly just a dump of all available attributes for
the object.

Pull Request: https://projects.blender.org/blender/blender/pulls/142925
2025-07-23 09:08:01 +02:00
Campbell Barton
605e6c0bbf Fix: BKE_collection_new_name_get potentially creating non UTF8 strings
Use of `*.%s` in string formatting could cause the name to include
partial UTF8 sequences. While these were stripped before ID creation,
they would be set in operator properties which are expected to be UTF8.

Also remove redundant allocation.
2025-07-23 12:55:50 +10:00
Campbell Barton
d3fd04c816 Fix #142909: SystemError when collections contain non UTF8 names
The Python API wasn't accounting for structs name properties using
path sub-types, which allow non UTF8 byte sequences.

This meant accessing the SpaceFileBrowser.recent_folders collection
could cause unhandled exceptions because
FileBrowserFSMenuEntry.name uses the PROP_FILENAME sub-type.

Resolve by adding a wrapper around the RNA struct name lookup
that handles path properties properly.
2025-07-23 12:38:23 +10:00
John Kiril Swenson
6571236b59 VSE: Clamp retiming key header values and snap drawing
Fixes #142735.

The original clamp patch in #134319 did not add any cases for retiming
key transformation code. A simple solution to the crash would be to
disable the behavior, but this PR opts to bring feature parity to
retiming keys too.

This means that header values are now more accurate, and snap lines do
not erroneously draw when retiming keys get clamped.

It also changes transition key transformation slightly, aligning the
direction of movement with the movement of the two keys. Before, moving
the mouse backwards would have the same effect, which was clunky and
unintuitive.

Pull Request: https://projects.blender.org/blender/blender/pulls/142809
2025-07-23 04:14:07 +02:00
Campbell Barton
336c85957b Fix: match RenderPass::chan_id size with EXR_PASS_MAXCHAN
Missed in [0] which increased the size in openexr_multi.h but didn't
update RE_pipeline.h.

[0]: d5f1b9c2223333e03f2e4994171ad9df8c1c4f21⏎
2025-07-23 10:30:07 +10:00
Campbell Barton
5c7bc1f9c0 Cleanup: use size-comments checked by "make check_size_comments" 2025-07-23 09:59:26 +10:00
Campbell Barton
72a88de9ef Cleanup: use colon after the doxygen params argument & doxygen comments 2025-07-22 23:25:02 +00:00
Campbell Barton
06bb402f22 Cleanup: quiet switch warnings 2025-07-22 23:25:01 +00:00
Leon Schittek
6a10812fb6 UI: Improve consistency of node socket symbols
Several changes to make node socket symbols more consistent across
the UI:
* Explicitly use the node editor's theme when looking up the outline
  color for node sockets so they are consistent across editors.
* Use the proper socket drawing function in `widget_nodesocket`,
  rather than relying on the "widget base" shader to draw a colored
  circle
* `uiTemplateNodesocket` now also works in non-embossed layouts.

Pull Request: https://projects.blender.org/blender/blender/pulls/136612
2025-07-22 23:43:22 +02:00
Sean Kim
9e44e975c1 Fix #142006: Grease Pencil color jitter settings not transferred
The flags were converted with 96e549c092,
but the new values only used the new `Brush` level properties in
b472570875.

Additionally, the `CurveMapping` structs were not initialized inside
the various operations that depended on them, potentially leading to
a crash if custom curves are used.

This commit fixes what was missing from both previous commitsL
* Conversion of the HSV jitter values and their curves to the new
  storage location.
* Correct initialization in relevant operators

Pull Request: https://projects.blender.org/blender/blender/pulls/142104
2025-07-22 23:23:29 +02:00
Aras Pranckevicius
828bd5336b Cleanup: remove unused variables from VSE Editing struct
act_imagedir and act_sounddir were added in 2009 (999d9d146e)
but seemingly never ever used for anything. So remove that; makes
Editing struct go from 3248 bytes down to 1200 bytes as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/142846
2025-07-22 20:15:30 +02:00
John Kiril Swenson
ec4323f95b Cleanup: VSE: Move strip flags to StripRuntime
Quite a few flags in `Strip.flag` were used only at runtime; they were
temporarily set and then cleared thereafter. Move them to
`StripRuntime.flag` instead.

Most of the moves are trivial renames, with some old versioning code for
`SEQ_FLAG_DELETE` deleted. That code fixed a very uncommon edge-case bug
in 2.x which doesn't seem worthwhile to keep deprecated code around for.

Pull Request: https://projects.blender.org/blender/blender/pulls/142776
2025-07-22 19:42:07 +02:00
Harley Acheson
32dd728768 Fix #141313: Clear Screen active_region for Area swap
If screen areas are swapped between windows this can cause an ASAN
heap-use-after-free because of invalid screen->active_region pointer.
That pointer is quickly reassigned as mouse movement indicates the
active region, so just clear them for this operation.

Pull Request: https://projects.blender.org/blender/blender/pulls/142877
2025-07-22 19:35:44 +02:00
Aras Pranckevicius
9c3509bacc VSE: Better default values for newly added Gaussian Blur effect
Previously, newly added Gaussian Blur effect did not blurring at all,
since blur sizes were set to zero. Make them default to 9 pixel size
blur, which is similar to the amount of blur the Glow effect does by
default.

Pull Request: https://projects.blender.org/blender/blender/pulls/142851
2025-07-22 18:53:16 +02:00
Bastien Montagne
ea91025b9a Refactor: Readfile: Modernize/cleanup library expand process.
Make `expand_main` a local static function, there is no need for it to
be in the public API anymore.
(It was used in older, pre-'foreach-id' code, as a way to loop over ID
usages. This is no more relevant for quite some time now.)

Use a std::queue to store IDs to be expanded, instead of looping several
times over all IDs of the current library Main until all have been
expanded.
(Cleaner, and will become necessary in upcoming packed IDs change, where
IDs read/loaded from a same blendfile may end up in several different
Mains).

Pull Request: https://projects.blender.org/blender/blender/pulls/142878
2025-07-22 18:52:37 +02:00