Commit Graph

146130 Commits

Author SHA1 Message Date
Thomas Dinges
eaef5e87c2 Revert "Release: Bump branch to 4.4 Beta."
This reverts commit 8a6e3a0bd7.
2025-02-05 11:25:54 +01:00
Thomas Dinges
50651145e4 Merge branch 'blender-v4.4-release' 2025-02-05 11:25:43 +01:00
Thomas Dinges
8a6e3a0bd7 Release: Bump branch to 4.4 Beta.
Splash screen by Flow.
2025-02-05 11:24:33 +01:00
Thomas Dinges
2fb881b65a Release: Bump main to 4.5 2025-02-05 11:09:47 +01:00
Omar Emara
96f56da030 Fix #134073: Compositor crash with viewer inside muted group
The compositor crashes when the user goes into a muted group that has a
viewer node while the backdrop is enabled. The compositor should not
schedule viewer nodes inside muted contexts, so we need to add checks to
prevent this.

Pull Request: https://projects.blender.org/blender/blender/pulls/134093
2025-02-05 10:41:46 +01:00
Pratik Borhade
b545f8d223 Fix #133927: Image editor not syncing with active image node
When active node is clicked again, the image editor does not update and
keeps showing the old image. Always run `ED_space_image_sync`, when
clicked node is image texture node to resolve this issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/133956
2025-02-05 10:39:02 +01:00
Pratik Borhade
90ae533aa1 Fix #101612: Viewport switched to perspective mode from camera view
When camera view is active, regardless of camera view type, view changes
to perspsective mode in local view. Now fixed with extra case of camera
view type.

Pull Request: https://projects.blender.org/blender/blender/pulls/132103
2025-02-05 09:48:00 +01:00
Pratik Borhade
12b426d87e Fix #66367: Refresh view setting when exiting camera view
Send notifiers to redraw side panel when view exits from camera (similar
to smooth view)

Pull Request: https://projects.blender.org/blender/blender/pulls/132980
2025-02-05 09:38:55 +01:00
Pratik Borhade
b2a2aae237 Fix #133751: Render pass warning with GPU device
`compositor_is_in_use` sets `used_by_compositor` true when GPU device is
selected. This draws render pass warning even when viewport
compositor is disabled. Remove the condition to fix the unintentional
warning. Following function is just used in node drawing, seems safe to
remove then.

Pull Request: https://projects.blender.org/blender/blender/pulls/133753
2025-02-05 09:34:12 +01:00
Philipp Oeser
a44b12dd6b Fix #134031: Set Parent menu lists unsupported armature options
What is (or isnt) supported here depends on object types (but we were
getting most of the options for all object types):

| **obtype** | **supports Armature modifier**  | **supports vertex groups** | **supports envelopes** | **supports automatic weights** |
| -- | -- | -- | -- | -- |
| OB_MESH | yes | yes | yes | yes |
| OB_CURVES_LEGACY | yes | no | yes | no |
| OB_CURVES | no | no | no | no |
| OB_SURF | yes | no | yes | no |
| OB_MBALL | no | no | no | no |
| OB_FONT | yes | no | yes | no |
| OB_VOLUME | no | no | no | no |
| OB_GREASE_PENCIL | yes | yes | yes | yes |
| OB_LATTICE | yes | yes (broken though) | yes | no |
| OB_EMPTY | no | no | no | no |
| OB_SPEAKER | no | no | no | no |
| OB_LIGHTPROBE | no | no | no | no |
| OB_LAMP | no | no | no | no |
| OB_ARMATURE | no | no | no | no |
| OB_POINTCLOUD | no | no | no | no |

This PR does two things:
- tidy up the popup menu we get for parenting (removing non-funtional
options)
- enable "With Empty Groups" for lattices (no reason why this should not
work)

What this PR does not touch:
- the poll function for parenting (since this acts on selected objects,
checking all of them can be a costly operation which should not be part
of a poll function)

Pull Request: https://projects.blender.org/blender/blender/pulls/134037
2025-02-05 09:14:21 +01:00
Campbell Barton
3952c58183 Fix buffer overflow from an one error accessing environment variables 2025-02-05 19:08:58 +11:00
Campbell Barton
256f3cd52f Fix missing call to va_end(..)
Own regression in [0] replacing BLI_dynstr with BLI_vsprintfN.

[0]: 6fbe467021
2025-02-05 19:00:05 +11:00
Andrej730
380e8455e8 PyDoc: Fix typing issues with bpy.utils.register_tool
- Add `type[]` for the `tool_cls` as it's expecting tool type class,
  not the instance (similar to #132420)
- Add `set[str]` to `after` type as it's seems to be the way it's used
  the most widely, e.g. in "UI Tool Simple" example that comes with Blender:

`bpy.utils.register_tool(MyTool, after={"builtin.scale_cage"}, separator=True, group=True)`

Pull Request: https://projects.blender.org/blender/blender/pulls/133975
2025-02-05 07:06:53 +01:00
Campbell Barton
4083b9ce62 Cleanup: use a more specific name for NDOF's guide
Prepare for having a second guide (!129594).
2025-02-05 15:19:35 +11:00
Campbell Barton
c3a80b5b19 Fix driver "Update Dependencies" doing nothing
Regression in [0] which disabled the functionality for an unrelated
change.

[0]: ba3f26fac5
2025-02-05 14:45:57 +11:00
Campbell Barton
8f80e373a0 Cleanup: pass std::string arguments by reference instead of value 2025-02-05 14:38:56 +11:00
Campbell Barton
4ed5776990 Cleanup: avoid double precision loss when converting to/from floats 2025-02-05 14:38:56 +11:00
Campbell Barton
5add20a131 Cleanup: remove redundant checks 2025-02-05 14:38:56 +11:00
Campbell Barton
df3d1bf506 Cleanup: use const arguments & variables where appropriate 2025-02-05 14:38:56 +11:00
Campbell Barton
378e49059e Fix invalid null checks (caught by cppcheck)
Resolve two instances where values were null checked
after use.
2025-02-05 14:38:56 +11:00
Campbell Barton
77fca5b15a Fix 3D viewport depth calculation for comparison
Replace ED_view3d_calc_zfac with a matrix multiply because the "zfac"
is never negative and near zero values are set to 1.0.

This makes sense for tools & viewport logic that use the value for
division and don't handle negative values but not for depth comparison.
2025-02-05 12:27:13 +11:00
Campbell Barton
b02bbbdb37 Cleanup: rename "GL" selection to "DEPTH"
The reference to OpenGL is no longer relevant.
2025-02-05 11:21:50 +11:00
Campbell Barton
e9de621159 Docs: improve doc-string for OPTYPE_REGISTER
Include another example where the REGISTER flag is set without UNDO.
2025-02-05 11:14:32 +11:00
Campbell Barton
4186175af8 Cleanup: improve code-comments & naming for window decoration styles
- Expand on the code-comment regarding tests & WM_capabilities_flag and
  move it from the caller into the functions body since this is useful
  for other callers, also mention in the doc-string.
- Use a common prefix for `WM_window_decoration_style_*` functions.
- Add a doxy-section for decoration style functions.
2025-02-05 10:56:54 +11:00
Campbell Barton
bc6dc89d50 Cleanup: quiet check_spelling_* warnings, use doxygen doc-strings 2025-02-05 10:29:00 +11:00
Nicola
6f80dba66c Sculpt: Add 'Plane' brush type
This patch introduces the `Plane` brush, a generalization of the
existing `Flatten`, `Fill` and `Scrape` brushes, with the objective of
providing more flexibility when sculpting.

This brush has the following key features:
* `Height` and `Depth` parameters to control the range of the brush in
  the local z-axis.
* Stabilizers for the normal and center of the brush plane.

When inverting, the user can choose between two options:
* `Invert Displacement`: Identical to the existing behavior, displacing
  vertices away from the plane.
* `Swap Height and Depth`: Exchanges the roles of `Height` and `Depth`.
  For example a brush with `Height` = 0.7 and `Depth` = 0.3 behaves as
  if it had `Height` = 0.3 and `Depth` = 0.7. In particular, this
  ensures that a scrape brush (`Height` = 1, `Depth` = 0) becomes
  equivalent to a fill brush (`Height` = 0, `Depth` = 1)  when inverted,
  and viceversa.

In the existing planar brushes, the influence on a vertex is determined
by the 3D Euclidean distance between the vertex and the cursor position,
multiplied by the vertex's distance from the brush plane (and other
factors common to all brushes).

In the `Plane` brush, the 3D distance is between the vertex and the
plane center instead of the cursor position.

The Plane brush introduces two parameters — `Stabilize Normal` and
`Stabilize Plane`. These can be thought of as the non-binary version of
the `Original Normal` and `Original Plane` options found in existing
brushes. These values are a weighted moving average across a window of
previous stroke steps.

Pull Request: https://projects.blender.org/blender/blender/pulls/132723
2025-02-04 22:38:23 +01:00
Alex
c6d7bee181 Cycles: Burley diffuse closure for MaterialX compatibility
Add Burley diffuse to OSL for MaterialX compatibility. It is OSL only and
isn't a closure that will be looked for in SVM.

Pull Request: https://projects.blender.org/blender/blender/pulls/133845
2025-02-04 19:38:56 +01:00
Clément Foucault
6f9dedcdc4 Fix #134011: Overlay: Wireframe with object color isn't shown selected
This was an oversight and the shader was using the old API.
2025-02-04 19:19:55 +01:00
Brecht Van Lommel
f80f97ca0d Refactor: Cycles: Rename rcp to reciprocal
To avoid symbol conflicts with upcoming HIP changes. Also remove
unused implementations for float4 and float8.

Pull Request: https://projects.blender.org/blender/blender/pulls/134045
2025-02-04 18:59:24 +01:00
Brecht Van Lommel
7b976eb810 Build: Add OpenSubdiv patch to silence ASAN warnings
Until upstream PR #1343 is merged.
2025-02-04 18:02:34 +01:00
Brecht Van Lommel
f29e0546e3 Build: Enable custom USD namespace for Blender again
This was removed to make building USD plugins easier, without the need to
compile them for Blender specifically. However it also causes errors when
using the bpy module together with the usd-core pip package.

In practice there are not many USD plugins, and often need to be compiled
for Blender specifically anyway due to the monolithic library and DCCs being
on different USD versions.

Additionally, this adds a patch to avoid conflicts when loading the
same USD library version through Blender and usd-core on Windows and macOS.

Fix #127132: Crash using bpy and usd-core pip package together.

Co-authored-by: Ray Molenkamp <github@lazydodo.com>

Pull Request: https://projects.blender.org/blender/blender/pulls/133083
2025-02-04 18:02:34 +01:00
Hans Goudey
fc1fe4e78c Cleanup: Rename object materials "test" functions
"test" wasn't descriptive. Rename that part to "sync_length".
Also expose documentation from the function implementation
to describe what the functions do.

Pull Request: https://projects.blender.org/blender/blender/pulls/134058
2025-02-04 17:46:08 +01:00
Falk David
b760c5d6ef Cleanup: Grease Pencil: Add comments about attributes assumptions
In some places of the code we expect some attributes to not exist
and therefore always be created successfully.
2025-02-04 17:42:23 +01:00
Sybren A. Stüvel
7bb4611e50 Fix: compiler warning for case-fallthrough
No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/134057
2025-02-04 17:41:57 +01:00
Nathan Vegdahl
33b9d54abb Anim: add RNA Channelbag.slot property
This allows Python scripts to easily determine what Slot a Channelbag is
for. This is particularly important because we're trying to discourage
the use of Slot handles in the Python APIs, and before this the only
way to identify which Slot a Channelbag was for was via the Channelbag's
`slot_handle` property.

Pull Request: https://projects.blender.org/blender/blender/pulls/134053
2025-02-04 17:39:03 +01:00
Bastien Montagne
e5bf3a28aa install_linux_packages: updated USD and materialX versions.
USD: 24.11
MaterialX: 1.38.10

See also #128577.
2025-02-04 17:29:56 +01:00
Bastien Montagne
5ea5cb9b13 install_linux_package: update OpenEXR, OCIO, OpenVDB versions.
OpenEXR: 3.3.2
OpenColorIO: 2.4.1
OpenVDB: 12.0.0

Also sync up exact FFMPEG version with reference (6.1.1, from
`versions.cmake`), and accept 7.x versions since Blender should also be
compatible with this major release.

See also #128577.
2025-02-04 17:29:56 +01:00
Bastien Montagne
f871815663 install_linux_packages: Updated Boost and OneTBB versions.
Boost: 1.85.0
OneTBB: 2021.13.0 (min is now 2021.0.0).

See also #128577.
2025-02-04 17:29:56 +01:00
Bastien Montagne
92d2544aa1 install_linux_package: Update python-related packages versions.
Python3: 3.11.11
CPython: 3.0.10
NumPY: 1.26.4

See also #128577
2025-02-04 17:29:56 +01:00
Bastien Montagne
66aa535faf install_linux_packages: Fix debian package query invalid results.
Turns out, `apt-cache` will not use exact package names match, leading
to invalid successful results in case a given package does not exist,
but a extended-name one does (e.g. looking for `python3.11` will return
results for packages like `libpython3.11-stdlib`...).

So add a first check using `apt show`, to ensure the requested package
name does exist first!

Also add a `__repr__` callback to the `PackageInstaller` class.
2025-02-04 17:29:56 +01:00
Julian Eisel
21e626ced3 Refactor: Assets: Improve asset system APIs for asset operators
Brush and pose asset operators were doing some avoidable roundtrips
through asset types, lookups and rather low level operations. This
indicates that the asset system APIs need some improvements. Moving
lower-level logic there can help avoiding errors, since implementation
details are kept inside the corresponding module.

- Avoid lookups for asset library reference in operator code, make asset
  library itself construct it.
- Avoid redundant lookups for asset library definition (was looking up
  the asset library definition in the Preferences from the library
  reference type, just to turn it into the reference type again).
- Add utility for refreshing loading asset libraries
- Add utility for saving asset catalogs for an asset
- Remove unused function
2025-02-04 17:28:23 +01:00
Sybren A. Stüvel
134a846d14 Fix: Anim, crash when deleting both action slot and F-Curve group
Fix a crash that happened when trying to delete an action slot and an
F-Curve group contained within it.

Pull Request: https://projects.blender.org/blender/blender/pulls/134048
2025-02-04 17:09:11 +01:00
Nathan Vegdahl
c4e2e09c65 Cleanup: Anim: rename identifier_prefix_for_idtype to idtype_string
The previous name was confusingly similar to the new method
`identifier_prefix()` that was introduced in #133983. This new name
better distinguishes them while also reflecting its actual functionality
better and being shorter.

Pull Request: https://projects.blender.org/blender/blender/pulls/134046
2025-02-04 16:55:22 +01:00
Thomas Dinges
d66b10bac0 Cleanup: Remove transform parameter now that asset folder was updated. 2025-02-04 16:43:54 +01:00
Jeroen Bakker
3d20d39115 Cleanup: Vulkan: Use is_link_to_buffer
Previous implementation used the resource state tracker which is a hash
table lookup. `is_link_to_buffer` is a bit cheaper as it is compares
already loaded data.
2025-02-04 16:28:46 +01:00
Thomas Dinges
21873221f8 Fix make_source_archive using outdated path to assets. 2025-02-04 16:19:54 +01:00
Jonas Holzman
ce42d92503 macOS: Colored Titlebar and WM Window Decoration Styles API - GSoC 2024
As part of the GSoC 2024 project "Improvements to the Blender macOS User
Interface Experience" [1], this patch implements colored titlebar window
decorations on macOS, based on the current Blender theme colors.

Additionally, this patch introduces a new WM/GHOST API for implementing
and enabling custom decoration styles on any system/desktop environment
that support customizing window decorations.

[1]: https://devtalk.blender.org/t/gsoc-2024-proposal-improvements-to-the-blender-macos-user-interface-experience/34022)

Pull Request: https://projects.blender.org/blender/blender/pulls/123982
2025-02-04 16:18:19 +01:00
Sybren A. Stüvel
2b5946da4e Anim: make copy-paste of keyframes slot-aware
Copy-paste of keyframes is now slot-aware. See [1] for the design.

[1]: https://developer.blender.org/docs/features/animation/tools/action-editor-copy-paste/

In short:

- Copy-paste still works broadly as it used to. Only the visible
  F-Curves are pasted into.
- Slot identifiers matter when copying from multiple slots. When
  copying from one slot, they don't.
- Selection of channels (either F-Curves or Slots) determines where
  keys get pasted into.
- Pasting will either copy from the slot with the same identifier
  (when identifiers matter), or paste whatever was copied (when they
  do not).
- If both F-Curves and slots are selected, only the selected F-Curves
  get pasted into, and slots without any selected F-Curves are ignored
  (i.e. target is only defined by selected F-Curves, or only by
  selected slots, never by a mixture).

Fixes #129690

Pull Request: https://projects.blender.org/blender/blender/pulls/133979
2025-02-04 16:12:57 +01:00
Brecht Van Lommel
f5dd13826d Fix: Conflict between bpy.app.translations and PySide
Some versions of PySide give errors when imported together with
bpy.app.translations, because the latter uses a tp_name that does not
exist. The only other tp_name we have with a dot in it (bgl.Buffer)
does exist.

Pull Request: https://projects.blender.org/blender/blender/pulls/134033
2025-02-04 16:03:40 +01:00
Sybren A. Stüvel
c7900cc905 Fix: #125354: Assert with box/lasso select in driver editor
The box/lasso select code called `evaluate_fcurve()` to evaluate the
driver F-Curve, which is not meant for drivers. It now calls
`evaluate_fcurve_only_curve()`, which is meant for this purpose (only
evaluates the F-Curve part of the F-Curve, and ignore the driver).

Pull Request: https://projects.blender.org/blender/blender/pulls/134042
2025-02-04 16:03:01 +01:00