Commit Graph

150013 Commits

Author SHA1 Message Date
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
Habib Gahbiche
a4a60959b0 Refactor: Move anim data bmain ops to own file
The reason is #135223 will introduce a `#define DNA_DEPRECATED_ALLOW`
which is only relevant for the function `BKE_animdata_main_cb()`.

Pull Request: https://projects.blender.org/blender/blender/pulls/139265
2025-05-22 15:56:53 +02:00
Miguel Pozo
7654be9e88 Fix: GPU: Profiling for compilation contexts 2025-05-22 15:55:27 +02:00
Jacques Lucke
9ac3e44ce6 Spreadsheet: move context path to left side bar
Previously, we were drawing the context path in the header of the spreadsheet.
However, that had some problems:
* When using a viewer that's somewhere deep in a node group, the viewer path
  wouldn't fit.
* Standard editor menus didn't fit in. Also we wanted to add spreadsheet
  specific operators that should be in a new menu.
* Couldn't fit more useful data for the context path (like the inspection index
  for repeat zones).

This patch solves this by moving the entire context path to the left side bar.
This frees up the header for menus.

The new context panel information is added at the top of the side bar because
then there is a proper hierarchy: `Object > Evaluation State > Viewer Path
(optional) > Instance Selection > Domain Selection`

This patch also adds information about the current inspection index for for-each
and repeat zones. They are not editable yet, but that can be implemented
separately as it might require a few more changes for everything to update
correctly.

The new Viewer Path panel is only displayed when actually showing viewer data.

Pull Request: https://projects.blender.org/blender/blender/pulls/138477
2025-05-22 15:04:41 +02:00
Bastien Montagne
4be7dad854 Cleanup: Replace incorrect MAX_ID_NAME-2 string length by MAX_NAME.
Also make use of recent 4e7b9185a4 change, and move size-hint comments
inside the brackets of the char array declaration.
2025-05-22 14:35:19 +02:00
Jeroen Bakker
de19775ab3 Fix #139141, #139169: Vulkan: Incorrect depth24s8->float conversion
The stencil value was also considered and could lead to out of range
depth values. These were ignored by operators and could lead to
printing errors, canceling operators, or inaccurate depth
selection.

This is a NVIDIA only issue as these GPU support DEPTH24S8 textures.
We should consider defaulting to DEPTH32FS8.

Pull Request: https://projects.blender.org/blender/blender/pulls/139272
2025-05-22 14:32:40 +02:00
Jeroen Bakker
b2a3caac5b Fix #138140: Vulkan: First few frames squashed on X11
Previous swapchain fixes didn't solve the issue on X11 so for X11 we still need
to disable VK_EXT_swapchain_maintenance1.

Pull Request: https://projects.blender.org/blender/blender/pulls/139270
2025-05-22 14:15:28 +02:00
Sebastian Herholz
5abf42012d Cycles: Guiding cleaning up and refactoring the guiding code
In detail:
- Direct accesses of state attributes are replaced with the INTEGRATOR_STATE and INTEGRATOR_STATE_WRITE macros.
- Unified the checks for the __PATH_GUIDING define to use #  if defined (__PATH_GUIDING__).
- Even if __PATH_GUIDING__ is defined, we now check if the feature is enabled using if ((kernel_data.kernel_features & KERNEL_FEATURE_PATH_GUIDING)) {. This is important for later GPU ports.
- The kernel usage of the guiding field, surface, and volume sampling distributions is wrapped behind macros for each specific device (atm only CPU). This will make it easier for a GPU port later.
2025-05-22 13:46:30 +02:00
Philipp Oeser
1d0c11987f Fix: Scale/Rotate proportional editing for Grease Pencil / Curves
If the `transdata_check_local_islands` check does not succeed, we end up
with `CTX_NO_PET` for scaling/rotation.

For `Grease Pencil`, this was lost in the transition from GPv2 > GPv3
(type was renamed to "legacy", then removed from
`transdata_check_local_islands` in a804320138, but the new type was
never added).

Curves never specified support for this, but both types are (in theory)
taking into account `V3D_AROUND_LOCAL_ORIGINS` in
`curve_populate_trans_data_structs` (logic from 9d86fada03 might be a
bit broken for proportional editing "islands" without anything selected
as reported in #139101, but that will be corrected in another PR).

So to resolve, add `Grease Pencil` and `Curves` as supported object
types in `transdata_check_local_islands`

NOTE: `transdata_check_local_center` already has these two types as
well.

Part of #139101

Pull Request: https://projects.blender.org/blender/blender/pulls/139209
2025-05-22 13:38:22 +02:00
Clément Foucault
3d8854b021 Fix #138823: GPU: Python: Incorrect color when using widelines
Add a deprecation warning and a helper to draw with
polyline shaders.

Pull Request: https://projects.blender.org/blender/blender/pulls/139216
2025-05-22 12:42:56 +02:00
Julian Eisel
ca4b485413 Tools: Adress mypy errors in recent weekly report script additions
5a5e1b7d14 added caused some errors when running `make check_mypy`, see
https://projects.blender.org/blender/blender/pulls/138615#issuecomment-1581404.
2025-05-22 12:37:29 +02:00
Clément Foucault
57d9c2c098 GPU: Python: Temporarily add back non-4bytes aligned formats
Add back the deprecated format to avoid asserts.
GPU backends should still have the code to support them.

Also add deprecation warnings as these types will be
removed for 5.0.

Pull Request: https://projects.blender.org/blender/blender/pulls/139213
2025-05-22 12:14:52 +02:00
Nikita Sirgienko
980624cc91 Build: Introduce new Device ID to OIDN 2.3.3
This ensures that OIDN 2.3.3 will support additional
Intel IP, which is important for the LTS version that
will be supported for two years into the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/139267
2025-05-22 12:04:10 +02:00
Clément Foucault
e40a9c6193 GPU: Python: Add workaround to support INT_TO_FLOAT
This promotes any INT_TO_FLOAT attribute to F32 and
to the float promotion inside python `attr_fill`.

We issue a deprecation warning when hitting this path.

Raise an error is the component type is not integer.

Pull Request: https://projects.blender.org/blender/blender/pulls/139206
2025-05-22 11:55:22 +02:00
Clément Foucault
8768e8553d Fix: GPU: Wrong colorspace on context swap
It can happen that the previous context drew with a different
colorspace. In the case where the new context is drawing with
the same shader that was previously bound (shader binding
optimization), the uniform would not be set again because the
dirty flag would not have been set (since the color space of
this new context never changed). The shader would reuse the same
colorspace as the previous context framebuffer (see #137855).

Fix #137855

Pull Request: https://projects.blender.org/blender/blender/pulls/139226
2025-05-22 11:54:29 +02:00
Clément Foucault
781b80c017 GPU: Python: Add missing diagonal constructors for square matrices
This was missing from #139185
2025-05-22 11:51:20 +02:00
Clément Foucault
f55e97a83a Documentation: Python: Add notice about MSL compatibility
See #139185
2025-05-22 11:47:06 +02:00
Habib Gahbiche
eb51e0a206 Compositor: gizmo for Split node
The gizmo is a line (implemented as a 2d cage gizmo) that can be
dragged accross the image vertically or horizontally.

Pull Request: https://projects.blender.org/blender/blender/pulls/139107
2025-05-22 11:19:09 +02:00
Campbell Barton
4e7b9185a4 makesdna: support C-style comments in array definitions
Support parsing C style comments such as:

`char filepath[/*FILE_MAX*/ 1024]`

This is done by skipping white-space inside square brackets
so the value is read as:

`char filepath[1024]`.

Ref: !139196
2025-05-22 19:08:33 +10:00
Habib Gahbiche
5e12caba08 Gizmo: Support translation without cross drawing
Add an enum entry `ED_GIZMO_CAGE_DRAW_FLAG_NOP` to be able to set enums
explicitly to draw no handles.
The current code already supports this case implicitly.

See https://projects.blender.org/blender/blender/pulls/139107 for an
example use case.

Pull Request: https://projects.blender.org/blender/blender/pulls/139210
2025-05-22 10:54:18 +02:00
Clément Foucault
16aee8efff Fix: #138928: Metal: Custom pyGPU shader has a compilation error in 4.4
This was caused by the removal of some compatibility code
in the metal backend.

This patch reintroduce this compatibility code in a cleaner
way than before.

This should be followed up by a documentation commit that
explains what is supported and what is not.

Pull Request: https://projects.blender.org/blender/blender/pulls/139185
2025-05-22 10:36:04 +02:00
Christoph Lendenfeld
87a28fa117 Anim: Common Playhead snapping for all editors
This patch adds snapping options for the playhead to all animation editors.
The options can be modified through a new dropdown in the editor header.

All editors will show all those options, and they are shared,
so toggling the option in on editor will change it for all other editors too.
Some options are not working/relevant in some editors for example
Strips in the Dope Sheet. However for consistency the option is still shown.
This is a separate menu from the transform snapping menu because
you can toggle the snapping for transform and playhead separately.
Putting it in the existing snapping transform menu would imply that it can
be turned off with the magnet which is not the case.

Playhead snapping is explicitly disabled for the drivers editor
because there is no playhead to drag around.

Snapping to Frame/Second intervals takes the scene start as a starting point.
That means you can snap to the n-th second of the animation even though
it might not start at frame 1. The preview range is NOT taken into account
by design since the use case is working on a sub-section of the animation
in which case the snap target should not change.

Snapping is toggled by pressing CTRL as indicated by the status bar.

Snapping to Frames/Seconds is absolute, meaning no matter
how far away your cursor it will snap to the closest snap point.
All others only snap to things if they are close to the cursor in pixel values.
When mixing those two behaviors, it prefers relative snapping.
If no point is close enough to snap relative,
it will fall back to absolute snapping.

Based on the prototype #135913
Part of #135794

Pull Request: https://projects.blender.org/blender/blender/pulls/137278
2025-05-22 10:17:19 +02:00
Nathan Vegdahl
b734eae387 Core: refer to Path Template docs in supported props' type info
When landing #134860 we didn't yet have documentation for the Path
Templates feature. Now that we do, we can refer users to it.

This PR adds a reference to the docs in the type info of properties that
are marked as supporting Path Templates.

Pull Request: https://projects.blender.org/blender/blender/pulls/139099
2025-05-22 09:58:25 +02:00
Bastien Montagne
647927a330 Fix IDP_MergeGroup_ex not taking 'ID management' flags as parameter.
For IDProperties, this flag is mostly used only to controll whether
IDProperty code should also handle ID refcounting or not (through
`LIB_ID_CREATE_NO_USER_REFCOUNT`).

Without this fix, IDProp Group Merge could end up trying to modify ID
refcount of its data-block properties (via `IDP_FreeProperty`), which
can lead to data corruption or even crashes (e.g. when used in readfile
code, before lib-linking process).

Issue discovered while working on the system IDProperties split project
(!135807).

Pull Request: https://projects.blender.org/blender/blender/pulls/139230
2025-05-22 09:19:21 +02:00
Campbell Barton
b5d3b3c1a3 Refactor: const-correctness in BLI_array_store API 2025-05-22 17:18:39 +10:00
Clément Foucault
78170cbf90 Fix #139189: Vulkan: UV Display Issues When Selecting Specific Mesh Regions
The format was not 4 byte aligned and not compatible with the new
format enums.

Pull Request: https://projects.blender.org/blender/blender/pulls/139202
2025-05-22 09:18:08 +02:00
Jacques Lucke
74751f985d Fix #139218: implicit group inputs show input value 2025-05-22 08:36:33 +02:00
Jacques Lucke
45ee859c22 Cleanup: make format 2025-05-22 08:29:55 +02:00
Mukhesh
615eb54ef4 Fix: VSE Duplicating strips in preview operates on all strips
Deselect strips not intersecting current frame, when operator is
invoked from preview.

Pull Request: https://projects.blender.org/blender/blender/pulls/139026
2025-05-22 07:34:14 +02:00
Campbell Barton
03f292c99b Fix assert adding particle system with an active float color layer
Updating the active legacy face data layers assumed the active color
layer was a byte layer.
2025-05-22 15:03:17 +10:00
Campbell Barton
50d3516fe5 Fix #139177: Realize Instances Node results in empty curves
Regression in [0] caused by new curve data blocks being created without
"ob_type" being set.

[0]: 8fea423e00
2025-05-22 14:51:39 +10:00
Sean Kim
f5276ac09e Cleanup: Rework sculpt_undo.cc for readability
* Avoid usage of `applied` in favor of helper methods to indicate
  undo and redo requirements
* Rename `bmesh_restore_begin` and `bmesh_restore_end` to avoid
  similarity with geometry methods
* Swap `geometry_original` and `geometry_modified` to match
  expected meaning

Pull Request: https://projects.blender.org/blender/blender/pulls/139244
2025-05-22 06:39:02 +02:00
Aaron Carlisle
22a2582844 Docs: Update RNA to user manual URL mapping 2025-05-22 00:11:19 -04:00
Jacques Lucke
47e84f1486 Cleanup: Nodes: remove unused method 2025-05-22 06:06:54 +02:00
Campbell Barton
e9aca43d89 Cleanup: use bool for comment variable in makesdna.cc
Also assert the value is set as expected when entering/exiting comments.
2025-05-22 13:51:29 +10:00
Campbell Barton
dbf86f291c Cleanup: prefer term "unreliable" over "flaky"
Avoid slang terms, also correct typo.
2025-05-22 13:51:29 +10:00