Commit Graph

3809 Commits

Author SHA1 Message Date
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
Habib Gahbiche
53380ed8b2 Cleanup: redundant check for shader type
Pull Request: https://projects.blender.org/blender/blender/pulls/143784
2025-08-01 13:38:54 +02:00
Falk David
4a36f5b2dc Fix: Rigify: Wrong type in create_object_data for Grease Pencil
The code was using the legacy Grease Pencil data type
in `create_object_data`. For the object type `GREASEPENCIL` we should
be using `bpy.data.grease_pencils_v3`.

Pull Request: https://projects.blender.org/blender/blender/pulls/142335
2025-08-01 13:35:10 +02:00
Sybren A. Stüvel
3d40246e94 Python: add HTTP file downloader
Add a new package `scripts/modules/_bpy_internal/http`, containing
classes to download files via HTTP.

The code is intentionally put into the `_bpy_internal` package, as I
don't intend it to be the end-all-be-all of downloaders for general
use in add-ons. It's been written to support the Remote Asset Library
project (#134495), where it will be used to download JSON files (to
get the list of assets on the server) as well as the asset files
themselves.

The module consists of several parts. The main ones are:

`class ConditionalDownloader`
: File downloader, which downloads a URL to a file on disk.

  It supports conditional requests via `ETag`/`If-None-Match` and
  `Last-Modified`/`If-Modified-Since` HTTP headers (RFC 7273, section 3.
  Precondition Header Fields). A `304 Not Modified` response is
  treated as a succesful download.

  Metadata of the request (the response length in bytes, and the above
  headers) are stored on disk, in a location that is determined by the
  user of the class. Probably in the future it would be nice to have a
  single sqlite database for this (there's a TODO in the code about
  this).

  The downloader uses the Requests library, and manages its own HTTP
  session object. This way it can handle TCP/IP connection reuse,
  automatically retry failing connections, and in the future
  HTTP-level authentication.

`class BackgroundDownloader`
: Wrapper for a `ConditionalDownloader` that manages a background
  process for the actual downloading.

  It runs the downloader in a background process, while ensuring that
  its reporters (see below) get called on the main process. This way
  it's possible to do background downloading, while still receiving
  progress reports in a modal operator, which in turn can directly
  call Blender's Python API. Care was taken to [not use Python
  threads][1]

`class DownloadReporter`
: Protocol class. Objects adhering to the protocol can be given to a
  `ConditionalDownloader` or `BackgroundDownloader`. The protocol has
  functions like `download_starts(…)`, `download_progress(…)`,
  `download_error(…)`, which will be called by the downloader to
  report on what it's doing.

  I chose to make this a protocol, rather than an abstract superclass,
  because then it's possible to make an Operator a DownloadReporter
  without requiring multi-classing.

[1]: https://docs.blender.org/api/main/info_gotchas_threading.html

Pull Request: https://projects.blender.org/blender/blender/pulls/138327
2025-08-01 12:27:56 +02:00
Jacques Lucke
f73f9ad477 Geometry Nodes: move closure and bundle nodes to their own menu
This is still only visible if the experimental feature is enabled.

Pull Request: https://projects.blender.org/blender/blender/pulls/143749
2025-07-31 21:08:47 +02:00
Falk David
cd7b933cb6 Fix #143715: Grease Pencil: Replace uses of legacy BlendData type
There were some more uses of the legacy Grease Pencil type
in `BlendData`.

Pull Request: https://projects.blender.org/blender/blender/pulls/143716
2025-07-31 18:14:44 +02:00
Harley Acheson
39187001c4 Fix #141442: Ensure Panel Text Colors Are Opaque
This PR alters the new panel colors introduced in 140726 so that
panel_text and panel_title have full opacity rather than none.

Pull Request: https://projects.blender.org/blender/blender/pulls/142992
2025-07-31 00:41:56 +02:00
Habib Gahbiche
0a0dd4ca37 Compositor: add asset shelf
Add an asset shelf to the compositor node editor.

This is part of simplifying the compositing workflow:
https://projects.blender.org/blender/blender/issues/134214.

The reasoning is:
- Assets will help users get started more easily with compositing
- Assets will help keeping users within Blender and use the compositor
instead of doing post processing in a different software.
- The asset shelf is better than the asset browser because it has a
better user interface; it's easily hidable and doesn't take much space

The asset shelf is hidden by default in this PR, since we have no
assets yet.

Previously, a similar implementation was proposed for all node editors,
see https://projects.blender.org/blender/blender/pulls/110589.
We didn't move forward with this PR for the following reasons:
- For geometry nodes, no concrete use case was known/proposed
- The PR didn't intend to actually show the asset shelf, only
implement the possibility that it can be shown in node editors

Known Issues:
- Can't hide the asset shelf if region overlap is off: #129737

Pull Request: https://projects.blender.org/blender/blender/pulls/138983
2025-07-30 18:41:00 +02:00
Habib Gahbiche
3ba317ad95 Motion Tracking: Create new node tree when creating a tracking setup
The operator 'Setup Tracking Scene' now creates a new compositing node
group if one exists already.

`CLIP_OT_setup_tracking_scene` now creates a node tree manually instead
of relying on `use_nodes = True`.

This also fixes an invalid link to the Group Output node.

Pull Request: https://projects.blender.org/blender/blender/pulls/143556
2025-07-30 12:02:50 +02:00
Campbell Barton
503429df1d Cleanup: replace "enabled" with "active" in the NDOF UI
Prefer "active" so the settings can still be changed,
typically this is preferred unless changing them would cause problems.

Also assign "active" immediately after assignment,
following the convention use elsewhere in scripts.
2025-07-30 13:15:09 +10:00
Patryk-Skowronski
865f1f62d0 UI: grey-out NDOF orbit center settings in "Fly mode"
Ref !143457
2025-07-30 13:01:43 +10:00
Harley Acheson
8ba44fe799 UI: Change "Full Screen Area" to "Focus Mode"
Areas can be made to take up more space in two different ways. One we
call "Maximize Area" that just takes up the rest of non-global space,
so leaving Top Bar and Status Bar and everything in the area unchanged.
The other option is shown as "Fullscreen Area" and it calls the same
operator with a use_hide_panels property. This hides the global areas
and also all regions in the area. This was added as an option for the
stereo 3D pipeline for viewing without the distraction of UI elements
that cause depth issue. #142418 further removed text overlays and the
navigation gizmos. This PR just renames the option to better describe
the result, using "Focus Mode".

Pull Request: https://projects.blender.org/blender/blender/pulls/142605
2025-07-29 21:30:25 +02:00
Campbell Barton
3de916ca25 RNA: support for marking properties as deprecated
Deprecation meta-data support for RNA properties.

- Properties may have a deprecated note and version.
- Warnings shown when these are accessed from Python.
- A note is included in the generated documentation.

Support for marking functions as deprecated can be added in the future.

Ref !139487
2025-07-29 22:09:59 +10:00
Philipp Oeser
c634e065b1 Fix #143182: Inconsistency in Menu order in Texture Painting Workspace
The Image Editor had a different menu order compared to the 3DView (this
came with fb74dcc5d6).
Now made the order in the Image Editor match the one of the 3DView.
Also matches the order in the sidebar now.

Pull Request: https://projects.blender.org/blender/blender/pulls/143222
2025-07-29 09:53:52 +02:00
Philipp Oeser
cba028f052 Fix #143421: python error using freestyle.utilities.get_strokes()
Codewise, it seems we just need to import the Operators type and use
that.

Pull Request: https://projects.blender.org/blender/blender/pulls/143432
2025-07-29 09:53:35 +02:00
Sybren A. Stüvel
301a86d700 Modeling: new shape key operator Make Basis
Add a new operator "Make Shape Key the Basis Key", shown in the Shape
Key menu as "Make Basis". Effectively this does the same thing as moving
the active shape key to the top of the list of shape keys: applying it
to the mesh.

This operator is added now, because !141930 will prevent moving shape
keys to the top of the list. This hopefully prevents accidentally making
other keys the basis key, which can cause issues that are hard to
recover from.

Pull Request: https://projects.blender.org/blender/blender/pulls/143200
2025-07-28 15:28:21 +02:00
Habib Gahbiche
445eceb02a Nodes: Remove "Use Nodes" in Shader Editor for World
Part of https://projects.blender.org/blender/blender/pulls/141278

Blend files compatibility:
If a World exists and "Use Nodes" is disabled, we add new nodes to the
existing node tree (or create one if it doesn't) that emulates the
behavior of a world without a node tree. This ensures backward and
forward compatibility.

Python API compatibility:
- `world.use_nodes` was removed from Python API => **Breaking change**
- `world.color` is still being used by Workbench, so it stays there,
although it has no effect anymore when using Cycles or EEVEE.

Python API changes:
Creating a World using `bpy.data.worlds.new()` now creates a World with
 an empty (embedded) node tree. This was necessary to enable Python
scripts to add nodes without having to create a node tree (which is
currently not possible, because World node trees are embedded).

Pull Request: https://projects.blender.org/blender/blender/pulls/142342
2025-07-28 14:06:08 +02:00
Bartosz Kosiorek
bd6f32559c Fix #104074: Cloth simulation presets missing internal springs and pressure
Pull Request: https://projects.blender.org/blender/blender/pulls/142191
2025-07-28 12:47:37 +02:00
Brecht Van Lommel
eb8dc8f535 Fix: Operator, app template and benchmarking script errors after media type
Always set the media type before the file format.

Ref #142955

Pull Request: https://projects.blender.org/blender/blender/pulls/143433
2025-07-28 11:55:11 +02:00
Campbell Barton
8355451700 Cleanup: quiet unused warnings for Python scripts 2025-07-27 20:36:07 +10:00
Campbell Barton
2d0a418a47 Fix #141853: Enum values aren't quoted in API doc function signatures
Regression in [0] which used string literals for enum lists
unintentionally removed the quotes for function signatures.

[0]: 0fb80f698a
2025-07-27 16:45:03 +10:00
Aaron Carlisle
735ad2cb7b UI: List node in alphabetical order
After "Z Combine" was renamed in b35971ad08 it needs to be placed earlier in the list.
2025-07-25 22:25:19 -04:00