Commit Graph

3830 Commits

Author SHA1 Message Date
Aras Pranckevicius
3d9155eb0a PointCache: improve performance and compression, always compress
Point Caches (used by particle system, cloth, boids etc.) are now
always compressed, uzing zstd coupled with lossless data filtering.

- This is both smaller cache files _and_ faster than the old
  "Heavy" compression mode,
- And smaller data files and same or slightly faster speed than
  using no compression at all,
- There was not much difference between compression levels once
  data filtering got added, so option to pick them was removed.
- So there's no downside to just always using the compression,
  which makes for a simpler UI.
- RNA change: removes PointCache.compression property.

More details and cache size / performance numbers in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/144356
2025-08-13 16:38:46 +02:00
Falk David
2f852d4f00 VSE: Add scene assets through strip add menu
Adds scene assets (including the catalogue tree) to the `Add` > `Scene` menu.

When selecting a scene asset, the asset import setting is used:
* Link: Scene is linked (cannot be edited, but will be used by the strip)
* Append: Appends the full scene including all IDs to the file.
* Append/Reuse: Appends the scene but will reuse IDs (like mesh data, materials, etc.).
   Objects, collections, and the scene itself are not reused.

Part of #144063.

Pull Request: https://projects.blender.org/blender/blender/pulls/141213
2025-08-13 13:11:47 +02:00
Julian Eisel
3c3c01a67c UI: Gray out or hide asset shelf toggle if not available
The "Asset Shelf" checkbox can be confusing for people, they enable it
but it still can't get the shelf to show up. This is because the shelf
is only available in certain contexts (e.g. pose mode and paint modes
in the 3D view, more is planned see blender/blender#135061). Gray out
the toggle with a disabled hint when not available.

The region toggle pie menus will hide the item.

Pull Request: https://projects.blender.org/blender/blender/pulls/113063
2025-08-13 11:38:11 +02:00
Jonas Holzman
da781fd685 UI: Allow Preferences editor to be opened in Maximized Area
This commit adds the option to open the Preferences editor in a
maximized area instead of a new window. This is done by adding a
"Preferences" field to the Interface > Editor > Temporary Editor
preferences. The default value is set to "New Window" keeping the
current behavior.

Implements: #142665

Pull Request: https://projects.blender.org/blender/blender/pulls/142681
2025-08-13 11:26:50 +02:00
Weizhen Huang
a7283fc1d5 Cycles: Shade volume with null scattering
The distance sampling is mostly based on weighted delta tracking from
[Monte Carlo Methods for Volumetric Light Transport Simulation]
(http://iliyan.com/publications/VolumeSTAR/VolumeSTAR_EG2018.pdf).

The recursive Monte Carlo estimation of the Radiative Transfer Equation is
\[\langle L \rangle=\frac{\bar T(x\rightarrow y)}{\bar p(x\rightarrow
y)}(L_e+\sigma_s L_s + \sigma_n L).\]
where \(\bar T(x\rightarrow y) = e^{-\bar\sigma\Vert x-y\Vert}\) is the
majorant transmittance between points \(x\) and \(y\), \(p(x\rightarrow
y) = \bar\sigma e^{-\bar\sigma\Vert x-y\Vert}\) is the probability of
sampling point \(y\) from point \(x\) following exponential
distribution.

At each recursive step, we randomly pick one of the two events
proportional to their weights:
* If \(\xi < \frac{\sigma_s}{\sigma_s+\vert\sigma_n\vert}\), we sample
scatter event and evaluate \(L_s\).
* Otherwise, no real collision happens and we continue the recursive
process.

The emission \(L_e\) is evaluated at each step.

This also removes some unused volume settings from the UI:

* "Max Steps" is removed, because the step size is automatically specified
by the volume octree. There is a hard-coded threshold `VOLUME_MAX_STEPS`
to prevent numerical issues.
* "Homogeneous" is automatically detected during density evaluation

An option "Unbiased" is added to the UI. When enabled, densities above
the majorant are clamped.
2025-08-13 10:28:50 +02:00
Sean Kim
1b2856f566 Cleanup: Remove python references to deprecated brush types
Missed in 922e40eefe

Pull Request: https://projects.blender.org/blender/blender/pulls/144399
2025-08-12 21:37:53 +02:00
Harley Acheson
42b6c7f804 Fix #132460: Remove File Browser Path Validation
This PR removes validation of saved bookmarks and system paths in File
Browser. The act of checking validity of a path can result in a timeout
that can last many seconds. Blender will have a very long startup time
if any such items are disconnected, invalid, offline, or removed. Even
if these paths are not used during the Blender session, like network
shares used only at work, web storage for some non-Blender use, a
shortcut to a USB drive, etc. Items will not be greyed out, and
clicking on one will result in a timeout _at that time_ but this seems
like expected behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/138218
2025-08-12 21:22:52 +02:00
Mohamed Hassan
ce7759bae6 Compositor: Removing Sun Beams node
This patch removes the Sun Beams node since it is now part of the
Glare node. It is versioned using a Glare node of Sun Beams type.

Pull Request: https://projects.blender.org/blender/blender/pulls/144110
2025-08-12 19:53:54 +02:00
Campbell Barton
eb57af250c Cleanup: consistent doc-string comment block style
Mixing different newline style with doc-strings is error prone.
2025-08-12 12:17:45 +10:00
Aaron Carlisle
0d8a19c790 PyDocs: Fix syntax formatting errors 2025-08-11 21:15:58 -04:00
Campbell Barton
729b76f454 Cleanup: use str.format to format strings in Python
Also replace redundant `{!s}` with `{:s}`.
2025-08-12 10:21:38 +10:00
Ramon Klauck
1a9817cdca VSE: add copy and paste operators to preview keymap
This feature allows the user to use `ctrl + C`, `ctrl + V` and
`ctrl + shift + V` directly in the sequencer preview. It adds these
operators also to the preview Strip menu.

It works the same as in the sequencer timeline.

Pull Request: https://projects.blender.org/blender/blender/pulls/143371
2025-08-11 21:40:04 +02:00
Falk David
6eea75e928 VSE: "Duplicate Strips" also duplicates referenced IDs
Duplicating a strip that references an ID like the scene strip would not
duplicate the scene. This is wanted in some workflows.

To align with the rest of Blender, this changes the behavior for how
strips are duplicated:
* `Shift + D` ("duplicate"): Duplicate the strip and also duplicate the
   IDs referenced by the strip. Currently this only affects `Scene`,
   `MovieClip`, and `Mask` strips.
* `Alt + D` ("duplicate linked"): Duplicate the strip, but reference the
  same IDs. This is the current behavior in `main`.

Part of #144063.

Pull Request: https://projects.blender.org/blender/blender/pulls/144138
2025-08-11 15:20:35 +02:00
Brecht Van Lommel
7acd5b3397 Fix: Image as planes add-on sets wrong alpha for OpenEXR files
This simply removes the operator property to set the alpha mode, so that
this can be automatically determined. The None case was already handled
by Use Transparency, and Channel Packed doesn't make sense here.

Ref #144009

Pull Request: https://projects.blender.org/blender/blender/pulls/144074
2025-08-11 13:58:47 +02:00
Campbell Barton
eb2cc80cd0 PyAPI: move bpy_types.py to a private module
Use an underscore prefix as this module should not be accessed directly.
2025-08-10 13:45:40 +10:00
Campbell Barton
b3e36d6983 Cleanup: replace unused RNA doc-string with comment
The doc-string used in the manual is stored in RNA.
2025-08-10 11:23:45 +10:00
Aaron Carlisle
8c932cb507 Docs: Update RNA to user manual URL mapping 2025-08-09 19:28:54 -04:00
Aaron Carlisle
86cd240c57 PyDocs: Add Macro example
- Adds a doc string for the Macro class
- Adds a basic example

Fixes #blender-manual/issues/51387
2025-08-09 18:43:14 -04:00
Nika Kutsniashvili
a459556ebd UI: Theme: Move more animation properties in common
Next step of #140360, continuing after 39c066ee53
Moves more animation theme properties shared by different editors to the new Common panel.

- Playhead (was shared by 7 editors)
- Marker Line (was shared by 5 editors)
- Marker Line Selected (was shared by 5 editors)
- Channel (was shared by 3 editors)
- Sub-channel (was shared by 3 editors)
- Channel Group (was shared by 2 editors)
- Active Channel Group (was shared by 2 editors)

In total, 27 properties are replaced with 7.

---

User Visible Changes:
- "Current Frame" is renamed to "Playhead". It was general sentiment among
Anim and UI modules to rename this everywhere after "Playhead Snapping" was
added, and this is first step towards that. Name is more recognizable and it's
clear it refers to UI element, rather than something as generic as "current frame".

- Channel, Sub-channel, Channel Group, and Active Channel Group colors in
Dope Sheet had alpha, but ones in Graph and NLA editors didn't. New common
property is used for all three of them and has alpha, meaning two editors gain
alpha as well, but they don't use alpha, still only Dope Sheet does.

- Channel and Sub-channel had different color in NLA and didn't match Dope Sheet
and Graph Editor, now since it's shared it has same color, which is a visual change
(slighlty lighter blue).

Pull Request: https://projects.blender.org/blender/blender/pulls/144060
2025-08-09 09:04:53 +02:00
Pratik Borhade
af44aada51 UI: Shape key menu sanitization
As mentioned in #143058, rearrange operators inside shape key specials
menu. Move top/bottom will be shifted to context menu: !143444

See image in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/144118
2025-08-08 17:43:17 +02:00
Pratik Borhade
7fd85e28ce Fix #143638: Spreadsheet Generic context is missing from Keymaps list
Spreadsheet generic keymap was missing from the keymap UI. To fix this,
add entry in `keymap_hierarchy.py`.

Pull Request: https://projects.blender.org/blender/blender/pulls/143689
2025-08-08 15:46:06 +02:00
Jacques Lucke
24c4e0a3f7 Geometry Nodes: move bundle and closure nodes out of experimental
This moves the bundles and closures features out of experimental,
making them an official part of Blender 5.0.

Also see #134029.

Pull Request: https://projects.blender.org/blender/blender/pulls/143750
2025-08-08 13:48:02 +02:00
Falk David
816da3c63b VSE: Copy settings of active scene when adding new scene
The `Add` > `Scene` > `New Scene` operator was behaving as follows:
* If there is no active scene strip, create an empty blank scene and
   assign it to a new scene strip.
* Otherwise, use the scene referenced by the active scene strip and
  use one of the copy scene methods (blank, copy settings, copy linked,
  or full copy) to create a new scene and assign it to a
  new scene strip.

This was not ideal for 2 reasons:
1. With no strip selected, creating blank scenes is generally not very
   useful as it means that the user has to e.g. update all the render
   settings, add a camera, etc.
2. The behavior of copying an existing scene by using the active strip
   is very hidden. Also because adding the strip immedialty calls the
   move operator, so you cannot even adjust the copy method of the
   scene.

This PR changes 3 things:
1. Don't use at the active scene strip. Instead use the active scene.
2. Don't create an empty blank scene, copy the settings of the active
   scene by default. This means that e.g. render settings can be reused.
 3. The operator entry in the `Add` > `Scene` menu is now called `Empty Scene`.

Part of #144063.

Pull Request: https://projects.blender.org/blender/blender/pulls/144069
2025-08-08 10:50:58 +02:00
Jacques Lucke
e72e049c84 Nodes: remove experimental option for new socket shapes
This removes the experimental feature flag for the new socket shapes,
making them official. This only affects the UI and does not affect the evaluation.

Pull Request: https://projects.blender.org/blender/blender/pulls/144119
2025-08-08 09:41:06 +02:00
Campbell Barton
1c0b17fb3d Cleanup: use single quotes for enum literals 2025-08-08 06:32:03 +00:00
Campbell Barton
3d0cff02c1 Fix: incorrect icon ID in the UV menu 2025-08-08 16:27:23 +10:00
Campbell Barton
73afa1c94f UV: support island selection with sync-select in vertex/edge mode
This was disabled because island selection used to be exposed as a
UV selection mode (along with vertex/edge/face) where selecting
parts of other islands would seem like a bug.

Now island selection has been moved to a separate toggle it makes
sense to allow connected geometry to be included in the selection when
other selection options enforce this.
2025-08-08 05:58:04 +00:00
Campbell Barton
53cae68ee8 Cleanup: hyphenate the term data-blocks in strings/doc-strings 2025-08-08 08:47:13 +10:00
Sean Kim
63cee26814 Fix #144135: Weight Paint gradient toolbar missing
Introduced in 4434a30d40

Pull Request: https://projects.blender.org/blender/blender/pulls/144165
2025-08-07 21:00:32 +02:00
Maxime-Cots
7f8d01f809 UI: "Delete Other Workspaces" operator
Adds a context menu entry to delete all workspaces but the one the menu
was spawned from.

Co-authored-by: Nig3l <nig3lpro@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/138530
2025-08-07 16:07:05 +02:00
Christoph Lendenfeld
a43359eb88 Anim: Store pose bone visibility flag on pose bone
This PR adds a flag to the pose bone that determines its visibility.
Doing so allows to hide a pose bone and
* don't affect other instances of the same armature
* save the visibility even if the rig is linked

The visibility of the bone in object mode is now also determined by the
pose bone whereas before it was the `Bone`.

**This breaks backwards compatibility** on the Python API since the visibility property,
on the `Bone` behaves differently now as it hides the edit bone instead of the pose bone.

In order to remove all active uses of `BONE_HIDDEN_P` the changes in `armature_skinning.cc` are required.

Part of #138482

Pull Request: https://projects.blender.org/blender/blender/pulls/139167
2025-08-07 15:54:58 +02:00
Pratik Borhade
0f8f9057a9 UI: Shape key right click context menu
Invoke context menu for shape key with right click.
Added `MESH_MT_shape_key_tree_context_menu`, this include operators
that takes action on selected/active tree items:
- Make Basis
- Duplicate
- Move to Top -> Move After Basis
- Move to Bottom -> Move to Last

See Video in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/143444
2025-08-07 12:41:26 +02:00
Pablo Vazquez
840310f607 UI: Add Icons for Edge/Vertex Crease and others
Edge and Vertex marks such as Crease, Bevel Weight, Seam, Sharp, have
specific use cases and colors assigned to them that users get familiar
with over time.

It can be hard to remember which color belong to what, this PR tries to
address this by introducing colored icons that follow the theme setting
for that edge mark/flag.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/144075
2025-08-07 11:09:56 +02:00
Sean Kim
5066173fbf Fix #143110: Custom keymaps missing versioning for unified settings
Introduced in 4434a30d40

The above commit changed many of the `wm.radial_control` default
keybinds used in various paint modes to support accessing the "unified"
properties on a per-mode basis. While the base Blender keymap and the
industry compatible keymap were updated, this change was not applied
to custom keymaps, leading to confusing behavior for the users.

Pull Request: https://projects.blender.org/blender/blender/pulls/143872
2025-08-06 18:23:11 +02:00
Sybren A. Stüvel
9b0b011f5d HTTP Downloader: ensure __main__.__file__ is not set when spawning process
Ensure that `__main__.__file__` is not set to "<blender string>" when
spawning the subprocess for the background downloader. Blender sets this
value when executing a Python string from C++ code. However, this value
causes issues with Python's `multiprocessing` module, as it expects that
IF the attribute is set, it contains the actual file of the actual main
module. Clearing it works fine, as `__file__` is optional anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/143985
2025-08-06 14:22:47 +02:00
Nig3l
4bede1b555 Image Mask Editor: Expose tools in the Toolbar
Expose existing mask operators as tools in the toolbar.

The primitive tools are commented out since interactively placement
isn't currently supported by the operators.

Ref !136086
2025-08-06 09:44:24 +00:00
Sybren A. Stüvel
0fa67c3ea2 Fix #142464: Add customizable color for W quaternion channel
The W channel in quaternion and axis-angle F-Curves is now themeable
(defaulting to yellow), instead of incorrectly blending the X and Y axis
theme colors.

The original blending math did not take into account that the hue
channel actually wraps around, and so the blended color became blue
instead of the intended yellow.

Instead of fixing the math, the theme has been expanded for this W axis.
The default color is set to the mathematically correct yellow.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/143211
2025-08-05 17:55:12 +02:00
Pratik Borhade
58d078fa3d UI: Tree View: Rename with F2
Luckily operator to rename already exists `UI_OT_view_item_rename`, just
need to add that in the keymap

Pull Request: https://projects.blender.org/blender/blender/pulls/143978
2025-08-05 11:58:39 +02:00
Damien Picard
5998795aa6 UI: Replace contractions with long-form text
Avoid using contractions for can't, aren't, doesn't, and shouldn't.
Following the writing style guide in the Human Interface Guidelines.

Pull Request: https://projects.blender.org/blender/blender/pulls/143852
2025-08-05 11:16:22 +02:00
Christoph Lendenfeld
befe6062c0 UI: Icons for playhead snapping
The recently introduced feature of playhead snapping (#137278)
added a popover menu for snap targets.
This used text to indicate the contents of said popover.
In order to bring it in line with the other snapping menu, this PR adds
icons to indicate the enabled state of snapping.

Part of #135794

Pull Request: https://projects.blender.org/blender/blender/pulls/139271
2025-08-05 09:01:56 +02:00
Sean Kim
a007c309b3 Fix: Grease Pencil Vertex Paint uses old path for unified_paint_settings
Introduced in 4434a30d40

Pull Request: https://projects.blender.org/blender/blender/pulls/143948
2025-08-04 23:27:33 +02:00
Ramon Klauck
efef8a201a VSE: delete keyframes from preview
This PR makes it easier to delete strip keyframes from the preview.
It works similarly to the 3D viewport and also works with keying sets.
Pressing "alt + I" deletes the keyframe on the current frame of the
selected strips, when a keyset is active it only deletes the keyframes
of the selected keyset.

Pull Request: https://projects.blender.org/blender/blender/pulls/140385
2025-08-04 19:15:00 +02:00
Bastien Montagne
6acdca7b92 I18N: Add Malayalam language to UI translations. 2025-08-04 12:08:17 +02:00
Casey Bianco-Davis
dfeeaa98fd Grease Pencil: Use Curve overlay for Bezier handles
This makes it so that Grease Pencil Bezier handles use the same colors and shaders as `Curves` Objects.

This also makes the handles follow `handle_display` and add the option the the edit mode overlay.

Pull Request: https://projects.blender.org/blender/blender/pulls/141524
2025-08-02 15:37:59 +02:00
Jacques Lucke
252b983c0c Geometry Nodes: change idnames of experimental bundle and closure nodes
This removes the "Geometry" part from their name because we want to use them in
other node tree types too (see #141936).

Usually, we don't change idnames because they are the primary identifier of
nodes and is expected to stay the same. Since they are generally not shown to
users (just Python developers), it's also not urgent to change them. However, in
this specific case we have the opportunity to update the idname before the node
becomes an official feature, so it's not as bad to change it.

This patch has full backward compatibility, but no forward compatibility (for
files that used the experimental feature).

Pull Request: https://projects.blender.org/blender/blender/pulls/143823
2025-08-02 10:17:39 +02:00
Campbell Barton
9c29815d00 Docs: include a note on when key-map versioning runs 2025-08-02 13:37:19 +10:00
Harley Acheson
1ecd193488 Fix #143439: Explicit Properties for Knife Tool
This adds "use_occlude_geometry=True" and "only_selected=False" to the
keymap entry for K, mesh.knife_tool, even though these are the default
values for this operator. This fixes the complaint. And these same
props are set  for "Knife Topology Tool" on the VIEW3D_MT_edit_mesh
menu so that it displays the shortcut correctly (#139393 remains
corrected).

Pull Request: https://projects.blender.org/blender/blender/pulls/143673
2025-08-01 18:55:36 +02:00
Sybren A. Stüvel
3ca28acbb3 Introduce Python code generator for OpenAPI spec to dataclasses
Add a [Python code generator][1] that takes an OpenAPI definition and
outputs the corresponding data model as [dataclasses][2]

This is intended to be used in the Remote Asset Library project, to
create, download, parse, and validate information of a remote asset
library.

[1]: https://koxudaxi.github.io/datamodel-code-generator/
[2]: https://docs.python.org/3/library/dataclasses.html

## Running the Generator

The generator is a Python script, which creates its own Python
virtualenv, installs the dependencies it needs, and then runs the
generator within that virtualenv.

The script is intended to run via the `generate_datamodels` CMake
target. For example, `ninja generate_datamodels` in the build
directory.

## Details

The virtualenv is created in Blender's build directory, and is not
cleaned up after running. This means that subsequent runs will just
use it directly, instead of reinstalling dependencies on every run.

## Generated Code & Interaction with Build System

It is my intention that the code generation _only_ happens when the
OpenAPI specification changes. This means that the generated code will
be committed to Git like any hand-written code. Building Blender will
therefore _not_ require the code generator to run. Only people working
on the area that uses the generated code will have to deal with this.

Pull Request: https://projects.blender.org/blender/blender/pulls/139495
2025-08-01 16:33:56 +02:00
Nika Kutsniashvili
7158e02aed Modeling: Set shape key default value to 1.0
When adding a shape key, set its blend value to 1.0 / 100%.

There is no practical use case where user wants to add shape key but
not work on it. New shape keys at value 0 have no purpose. Adding
shape key should be interpreted by Blender as user wanting to
sculpt/model on it. Also, being at 1.0 initially doesn't change
anything visually, because key isn't edited yet and it doesn't deform
mesh.

The default value of the shape key is also set to 1.0. When using
right-click to reset values, user most often wants to return to 1
(which is "correct" state of deformation without multiplication)
rather than 0 (which is no deformation at all).

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/133399
2025-08-01 15:43:31 +02:00
Campbell Barton
2c27d2be54 Cleanup: grammar corrections, minor improvements to wording 2025-08-01 21:41:24 +10:00