Commit Graph

150048 Commits

Author SHA1 Message Date
Miguel Pozo
4f00a470cd Core: VectorList improvements
- Add a custom Iterator, so it can be iterated as a 1D list.
- Add missing functions like `first`, `is_empty`, `clear`, and
  subscript operator.
- Add a `size_` member variable for faster `size` calls.
- Add compile-time asserts to ensure the Capacity sizes are valid.
- Add unit tests.

See #138947 for the motivation behind this.

Pull Request: https://projects.blender.org/blender/blender/pulls/139102
2025-05-23 15:34:26 +02:00
Jeroen Bakker
a44c515844 Cleanup: Vulkan: Use blender::Mutex
Only the queue mutex owned by ghost is still a std::mutex.

Pull Request: https://projects.blender.org/blender/blender/pulls/139344
2025-05-23 14:40:28 +02:00
Jeroen Bakker
9a6ae548a1 Cleanup: Vulkan: Remove unused getters. 2025-05-23 14:19:46 +02:00
Hans Goudey
8fdf37cd50 Fix #139114: Node insert auto offset broken with frames
Caused by 4bf34d9591.

Quite a bit of complexity used to avoid moving both nodes and their
frame parents is redundant now, since all connected nodes should
be moved and moving frames doesn't also affect the nodes inside
anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/139306
2025-05-23 14:18:09 +02:00
Falk David
4901f38400 Fix: GPU: Crash in pygpu_batch_draw
Introduced by `3d8854b021195fdb253c85133b1db350d3d4c753`.
`py_shader` could still be `nullptr` and needs to be checked.
2025-05-23 12:31:08 +02:00
Pratik Borhade
0ad79ca541 Fix #139170: Regression: The Linked Node Group Socket Name is Editable
This probably have occured after migration from UIList. When nodetree ID
is linked form another file, disable the layout for individual rows and
the add/remove operator. Also tweak `supports_renaming()` function so that
individual tree element cannot be renamed when linked.

Pull Request: https://projects.blender.org/blender/blender/pulls/139269
2025-05-23 12:19:41 +02:00
Pratik Borhade
23bddef11a Fix #139179: Shader node panels are not translated in the material properties
Missed in 613bb9771b. To fix translation of panel header, use `IFACE_` macro).

Pull Request: https://projects.blender.org/blender/blender/pulls/139262
2025-05-23 12:18:17 +02:00
Aras Pranckevicius
a4b76dbb09 IO: more strongly indicate that Collada is deprecated
- Add "(Deprecated)" to Collada I/O tooltips
- Move the import/export menu items to be the last ones from the
  built-in items

Pull Request: https://projects.blender.org/blender/blender/pulls/139303
2025-05-23 12:02:38 +02:00
Jeroen Bakker
ea22ef739d Cleanup: Vulkan: Remove explicit feature VVL
We should not enable features explicitly. This also prints an info
record when using VVL. When you want to enable specific features
use vkconfig/vkLoader.

Pull Request: https://projects.blender.org/blender/blender/pulls/139324
2025-05-23 11:04:56 +02:00
Jacques Lucke
363eff4f59 Fix: Nodes: missing null check
This caused a crash when creating a group from a node which has
a virtual input socket (e.g. Menu Switch).
2025-05-23 09:21:18 +02:00
Jeroen Bakker
f75e4f4dea Cleanup: Vulkan: Move comment 2025-05-23 08:27:27 +02:00
Nikita Sirgienko
11921b505b Build: upgrade DPC++ to 6.1.0 release
This upgrade for DPC++ and its dependencies brings several
bug fixes and also eliminates some patches and backports
that are now obsolete with this new release.

Pull Request: https://projects.blender.org/blender/blender/pulls/138173
2025-05-23 08:08:00 +02:00
quackarooni
ad90cceb1e Geometry Nodes: Add "Set Grease Pencil Softness" node
How solid/faded the edges of a Grease Pencil stroke is
controlled by the `softness` attribute. This change adds a
node that exposes that attribute, allowing the user to
control it via Geometry Nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/138939
2025-05-23 07:30:23 +02:00
Richard Antalik
c4eab49b9c Fix #135930: Strip can be added to locked or muted channel
When strip is added, operator first finds "best" channel to place a
strip in, then adds new strip to that channel and finally does check if
the strip is overlapping other strips. If it does, it handles the
overlap.

To prevent adding strip to locked or muted channel, fix has to be done
at 2 places:
 - `sequencer_generic_invoke_xy_guess_channel` which finds the "best"
channel
 - `transform_seqbase_shuffle_ex` which handles overlap.

Further check for free channels was added to all strip add operators.
If there is no space above channel, that user selected, error is
displayed and operator is cancelled.

Note, that `transform_seqbase_shuffle_ex` is used only for resolving
overlaps where strip position in time must stay constant, so it moves
the strips in Y axis. This PR does not affect user selectable
`overlap_mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/136016
2025-05-23 06:51:36 +02:00
Campbell Barton
a0e1938021 Cleanup: remove spaces from filenames, unix line endings
Also rename "blender export import test suite description.txt" to
"readme.txt" as the filename was including information available
in the leading path.
2025-05-23 14:32:45 +10:00
Jacques Lucke
1307137f27 Nodes: clarify socket visibility methods
Node sockets have many different aspects that affect their visibility and
whether they are grayed out. This patch cleans up the methods used to check if
sockets are visible and adds descriptions that should make it more obvious which
ones should be used.

This also fixes a few places where the wrong method was used which is more
obvious now.

Pull Request: https://projects.blender.org/blender/blender/pulls/139251
2025-05-23 06:10:03 +02:00
Jacques Lucke
0b24f15939 Spreadsheet: persistent table layouts
The main goal of this patch is that the column widths and ordering is not reset
every time one switches between different contexts.

It does that by keeping track of multiple `SpreadsheetTable`. There is one for
each table that is viewed (so e.g. the point and edge domain of the same mesh
are two different tables). Each table has an identifier and an array of columns.

There is some garbage collection in place so that the number of stored tables
does not increase unbounded.

This also comes with an updated Python API:
```python
import bpy
spreadsheet = bpy.context.screen.areas[...].spaces.active
active_table = spreadsheet.tables.active
print(active_table.id.type)
print(active_table.id.attribute_domain)
print(active_table.columns[0].id.name)
```

In the future, we might add some smarter logic to keep tables with different
identifiers more in sync. We don't have a great heuristic for that yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/139205
2025-05-23 06:07:04 +02:00
Campbell Barton
0265b13399 Tools: add a utility to validate array sizes
The script check_source/static_check_size_comments.py run directly
or called via the convenience target "make check_size_comments".

Add a utility module: `line_number_utils` which implements
a version of `re.finditer` that includes line numbers & ranges.
2025-05-23 14:04:26 +10:00
Campbell Barton
84694bf635 Cleanup: add inline array size comments and minor corrections 2025-05-23 14:03:20 +10:00
Campbell Barton
72f24fcbab Cleanup: resolve pylint warnings 2025-05-23 14:03:20 +10:00
YimingWu
845cec84bf Fix #139199: Grease Pencil: Update compositor node when pass is toggled
Compositor node sockets should be updated when toggling grease pencil
pass in the pass list. It was missing a `rna_ViewLayer_pass_update`, now
it will work as expected.

Pull Request: https://projects.blender.org/blender/blender/pulls/139215
2025-05-23 04:26:52 +02:00
Campbell Barton
98c0a6c8fe Cleanup: resolve unused variable warning in release builds 2025-05-23 09:20:11 +10:00
Guillermo Venegas
99e9b2522b Refactor: UI: Remove uiItemBooleanO API
This function has not python equivalent, using the
returned pointer to write properties seems enough,
equivalent to how it is done in Python.

Pull Request: https://projects.blender.org/blender/blender/pulls/139295
2025-05-23 01:07:12 +02:00
Pratik Borhade
b48f3b0df4 Fix #139195: Preferences are not automatically saved after keyitem_restore
Tag preference dirty when keyitem_restore is called. When window is
closed and is_dirty=true, WM_exit_ex() will call the function to update
the prefs.

Pull Request: https://projects.blender.org/blender/blender/pulls/139254
2025-05-23 00:36:41 +02:00
Hans Goudey
cb77f6fd14 Cleanup: UI: Remove unused arguments for operator buttons 2025-05-22 16:26:46 -04:00
Sietse Brouwer
90899cf821 Python API: Let gpu_extras.presets.draw_texture_2d use TRIS instead of TRI_FAN
In the Python API, helper function `gpu_extras.presets.draw_texture_2d`
still used batch type `TRI_FAN`, which is deprecated since Blender 3.2.
In this patch the batch type is changed to `TRIS`.

Pull Request: https://projects.blender.org/blender/blender/pulls/139300
2025-05-22 21:51:58 +02:00
Sean Kim
93f743ec46 Cleanup: Avoid passing both SculptSession and Object
Reduces the number of parameters passed in `sculpt_undo.cc`,
additionally the `const` specifier is misleading here, as the
`SculptSession` is modified via the `Object` reference.

Pull Request: https://projects.blender.org/blender/blender/pulls/139252
2025-05-22 21:10:23 +02:00
Nicola
f1ab22465f Fix: Line stroke method is drawn incorrectly
Mistake in 7d97ba4c5f

Pull Request: https://projects.blender.org/blender/blender/pulls/139286
2025-05-22 21:04:35 +02:00
Sean Kim
e77d82401b Fix #139223: Topology automasking crash when precomputed
The topology automask setting uses the active vertex when precomputing
the cache at the beginning of a stroke. This value can be invalid when
the brush stroke doesn't start on the mesh.

For example, this can happen with brush strokes that use a projected
instead of spherical falloff due to more BVH nodes being included in the
initial coarse check.

To fix this, simply check for the existence of the active vertex and
early exit if it is not valid.

Pull Request: https://projects.blender.org/blender/blender/pulls/139234
2025-05-22 20:32:23 +02:00
Aras Pranckevicius
8e8d2e7aec Fix: Make new FBX importer support Light exposure
7e0dad0580 added Light exposure import to Python FBX importer,
but not to the new C++ one

Pull Request: https://projects.blender.org/blender/blender/pulls/139292
2025-05-22 20:31:56 +02:00
Guillermo Venegas
b3eb84f624 Refactor: UI: Remove uiLayout::op id properties parameter
This was an alternative way to write properties for layout operator buttons,
for the most cases are more than enough to use the returned pointer.

There were just 2 cases where this was useful, the quick access menu
that reuses operator property values, this now overrides the id property group
data pointer generated for the operator, also for `uiItemsFullEnumO_items`.

Pull Request: https://projects.blender.org/blender/blender/pulls/139242
2025-05-22 20:19:18 +02:00
RedMser
85dcfe70bc Fix: File Browser: Hiding dot-prefixed data-blocks
When file browsing inside a blend file's contents, allow the optional
hiding or showing of data blocks that have names that start with dot.

Pull Request: https://projects.blender.org/blender/blender/pulls/138875
2025-05-22 19:46:59 +02:00
Bastien Montagne
c31a1729bd Cleanup: Fix incorrect usages of MAX_NAME in BKE main namemap code.
This coe is about ID names, it should only rely on `MAX_ID_NAME`.
2025-05-22 17:57:23 +02:00
Miguel Pozo
e6638d6e5e Refactor: GPU: GPUMaterial & GPUPass compilation
Cleanup and simplification of GPUMaterial and GPUPass compilation.
See #133674 for details/goals.

- Remove the `draw_manage_shader` thread.
  Deferred compilation is now handled by the gpu::ShaderCompiler
  through the batch compilation API.
  Batch management is handled by the `GPUPassCache`.
- Simplify `GPUMaterial` status tracking so it just queries the
  `GPUPass` status.
- Split the `GPUPass` and the `GPUCodegen` code.
- Replaced the (broken) `GPU_material_recalc_flag_get` with the new
  `GPU_pass_compilation_timestamp`.
- Add the `GPU_pass_cache_wait_for_all` and
  `GPU_shader_batch_wait_for_all`, and remove the busy waits from
   EEVEE.
- Remove many unused functions, properties, includes...

Pull Request: https://projects.blender.org/blender/blender/pulls/135637
2025-05-22 17:53:22 +02:00
Miguel Pozo
9222daacb7 Fix: Core: bitscan_reverse_uint64 on Windows
Pull Request: https://projects.blender.org/blender/blender/pulls/139283
2025-05-22 17:30:45 +02:00
Brecht Van Lommel
7614bf9602 Docs: Fix outdated description of update in make help 2025-05-22 17:02:49 +02:00
Thomas Dinges
0379a40627 Build: Update OIIO and Manifold
* OpenImageIO to v3.0.6.1
* Manifold to v.3.1.0

Pull Request: https://projects.blender.org/blender/blender/pulls/138938
2025-05-22 16:46:12 +02:00
Campbell Barton
99a4c93081 Cleanup: inline array sizes in code-comments
Use a similar convention for struct member identifiers,
(the identifiers without surrounding spaces). This allows the values
to be scanned and validated.
2025-05-23 00:41:39 +10:00
Brecht Van Lommel
ee619713f9 Tests: Add test files for new light features
Ref #136958, #134303
2025-05-22 16:32:44 +02:00
Eqkoss / T1NT1N
bb9d5cdaad Lights: Add normalize property
When enabled, this normalize the strength by the light area, to keep
the total output the same regardless of shape or size. This is the
existing behavior.

This is supported in Cycles, EEVEE, Hydra, USD, COLLADA.

For add-ons, an API function to compute the area is added for conversion,
in case there is no native support for normalization.

area = light.area(matrix_world=ob.matrix_world)

Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/136958
2025-05-22 16:32:44 +02:00
Brecht Van Lommel
a428815716 Fix: Cycles light tree poor when light normalize is off
This option was not exposed in the Blender UI, so no user visible effect.
Take into account light area when building light tree.

Ref #136958
2025-05-22 16:32:44 +02:00
Eqkoss / T1NT1N
a12bce039f Lights: Add temperature property
Similar to other renderers, this adds a temperature property to set the
light color using blackbody emission. This can be more convenient than
using nodes, and can improve interop with other software.

This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.

Pull Request: https://projects.blender.org/blender/blender/pulls/134303
2025-05-22 16:32:44 +02:00
Eqkoss / T1NT1N
7e0dad0580 Lights: Add exposure property
Similar to other renderers, this adds an exposure property to multiply
the light power by 2^exposure. This can be more convenient to control
a wide range of values.

This is supported in Cycles, EEVEE, Hydra, USD, COLLADA and FBX.

Pull Request: https://projects.blender.org/blender/blender/pulls/134528
2025-05-22 16:32:44 +02:00
Brecht Van Lommel
a47954fbf2 Lights: Remove units from light power
This has been causing some confusion because it is in radiometric units
rather than photometric, which is how real world lights are typically
specified. With the addition of exposure and normalize options this
also becomes less clear.

Ref #134528
2025-05-22 16:32:44 +02:00
Brecht Van Lommel
6f45aedd85 UI: Move some advanced Cycles light settings to Settings panel
Similar to the material Settings panel. To make room for three new options
that will be added in following commits.
2025-05-22 16:32:43 +02:00
Sybren A. Stüvel
58d0b0e4b4 Py Docs: Gotcha chapter on threading
Update the Python API documentation about crashes with multi-threaded
code.

- Move the "threading gotcha" into a file of its own. That way it's
  immediately clear from looking at the Gotcha table of contents that
  threading is not supported.
- Simplify the example code, so that it doesn't access `bpy`.
  Apparently the problem is much wider than just multi-threaded access
  to `bpy`, and involves _all_ Python threads, regardless of what they
  do / access.
- Add some more explanation and move some text from the bottom to the
  top, so that the first-read part (when reading top to bottom) has
  most of the information.

Pull Request: https://projects.blender.org/blender/blender/pulls/139279
2025-05-22 16:23:23 +02:00
Hans Goudey
881199d92c Fix #139256: For each element uses incorrect default curve type
curves_new_nomain_single should only really be used for creating new
curves completely from scratch.
2025-05-22 10:18:24 -04:00
Guillermo Venegas
ae5a0d3a1b Cleanup: UI: Remove disabled RNA code
As noted in the removed comment, python has better
syntax for assigning operator properties values, as:

``` py
op = layout.operator('my_operator')
op.string_prop = "value"
```

Code has been unused since e0fc6d0c33

Pull Request: https://projects.blender.org/blender/blender/pulls/139243
2025-05-22 16:08:47 +02:00
Michael Jones
8dd9aeb11e Cycles: Fix occasional failure in path_create_directories
This PR adds a global mutex to `path_create_directories` to fix a thread-safety issue which can occur when concurrently creating multiple subdirectories with common stems.

Pull Request: https://projects.blender.org/blender/blender/pulls/139266
2025-05-22 16:06:51 +02:00
Clément Foucault
d955ebce30 EEVEE: Default Startup Speedup
Low hanging fruit optimizations for improving default
startup time.

Went from 7.2sec to 4sec on my system.

Pull Request: https://projects.blender.org/blender/blender/pulls/139278
2025-05-22 15:57:41 +02:00