Commit Graph

3288 Commits

Author SHA1 Message Date
Jonas Holzman
bcb343c597 Python Templates: Add Gizmo Simple 2D
Following discussion to document the `icon_value` property of
`GIZMO_GT_button_2d` in PR #136080, and generally improve the
documentation of this Gizmo Type, this patch adds a new "Gizmo
Simple 2D" Python template, and renames the existing "Gizmo
Simple" template to "Gizmo Simple 3D".

Pull Request: https://projects.blender.org/blender/blender/pulls/136304
2025-03-21 12:20:22 +01:00
Campbell Barton
d037fcd5fb Cleanup: don't redefine built-ins in the key-map
Also remove redundant dictionary unpacking for a single item.
2025-03-21 22:08:31 +11:00
Campbell Barton
5b04f13219 Cleanup: wrap long lines 2025-03-21 22:08:31 +11:00
Campbell Barton
d9edc0c057 Cleanup: replace multiple checks with static sets 2025-03-21 22:08:31 +11:00
Campbell Barton
bf3297aefd Correct error accessing current tags in last commit 2025-03-21 16:30:30 +11:00
Campbell Barton
9789dc8426 Fix #132636: Showing updates doesn't show available theme updates
When updates are available, clicking on the button in the status bar
was only showing "Add-on" updates.

Restore the ability to show "All" extension types which is
set when showing updates.
2025-03-21 16:00:33 +11:00
Campbell Barton
bd2c0f2b49 Cleanup: remove unused variable 2025-03-21 15:07:07 +11:00
Harley Acheson
c13d3e2f7a UI: Color Icons for Red, Green, & Blue
This adds icons for ICON_RGB_RED, ICON_RGB_GREEN, and ICON_RGB_BLUE
that display with those colors. This does not remove the existing
monochrome ICON_COLOR_* icons. This also allows the translation of
the "R", "G", "B" characters shown, for languages that prefer color
words that do not start with these.

Pull Request: https://projects.blender.org/blender/blender/pulls/136154
2025-03-21 01:57:32 +01:00
Julian Eisel
6c1c5e8923 Asset browser import settings popover with collection instancing option
Part of #134755 / #134766.

Adds options to the new Import Settings popover (added in 7a6beb65f4)
to toggle collection instancing for dragging in collections. It can be
toggled separately for linking and appending, since it's typical to use
instancing for linking, but not appending (current default, also with
this change).

Previously, toggling collection instancing was only possible via the
Adjust Last Operation panel but this wasn't obvious, many people were
not aware. Adding this option based on feedback by the Blender Studio.

Pull Request: https://projects.blender.org/blender/blender/pulls/135996
2025-03-20 18:44:24 +01:00
Sybren A. Stüvel
640255bbbf Anim: add keying set support to Copy Global Transform add-on
When the scene settings indicate the active keying set should be used,
this is taken into account for all auto-keying done by the add-on. This
covers:

- Pasting global transform
- Pasting relative transform
- Fix to Camera

Support is limited to *relative* keying sets. Absolute keying sets,
which thus determine what gets keyed regardless of the selection, are
not supported, as the interaction between the "copy this object/bone's
transform" is currently not known.

Fix to Camera has its own settings for what to key; these will be
combined with the keying set. Only those properties that are enabled in
the Fix to Camera settings AND included in the keying set will be keyed.
To give a concrete example: when the "Location & Rotation" keying set is
active, and "Location" and "Scale" are checked in the Fix to Camera
panel, only the location will be keyed.

A message is shown in the Fix to Camera panel to notify users that the
keying set will affect the keys as well.

The keying set will only be considered when the auto-keying option "Only
Active Keying Set" is enabled.

Fixes: #136076

Pull Request: https://projects.blender.org/blender/blender/pulls/136187
2025-03-20 16:08:10 +01:00
Omar Emara
775df8826b Compositor: Add Image Info node
This patch adds a new Image Info node which returns information about
compositor images. The node has three sources:

The node returns the following information:

- Pixel Coordinates: The coordinates of the centers of the pixels in the
  image. Those are essentially the integer coordinates with half pixels
  offsets added.
- Texture Coordinates: Zero centered pixel coordinates normalized along
  the greater dimension. Somewhat analogous to Object coordinates in
  shader nodes.
- Resolution: The resolution of the image.
- Location: The location of the image in the virtual compositing space.
- Rotation: The rotation of the image in the virtual compositing space.
- Scale: The scale of the image in the virtual compositing space.

This node is very useful to allow greater flexibility and procedural
creations. For instance, coordinates can be used to create procedural
effects like vignette using very simple math nodes. And size can be used
to compute size-relative parameters for pixel-parameter nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/135104
2025-03-19 11:38:29 +01:00
Omar Emara
0a80f470f8 Compositor: Add common nodes to compositor
This patch adds common nodes that are used in Geometry Nodes and Shader
Nodes to the compositor. The following new nodes were added:

- Vector Math.
- Vector Rotate.
- Vector Mix.
- Value Mix.
- Clamp.
- Float Curve.
- Blackbody.

The follow nodes were replaced by common counterparts:

- Value.
- Color Ramp.
- Mix Color.
- Map Range.
- Math.
- Combine XYZ.
- Separate XYZ.
- Vector Curves.

Some new features were gained in the process:

- Mix Color can now clamp both factor and result.
- Map Range can map different types and interpolations.
- Vector Curves gained a new Factor input.

Some behaviors were changed:

- Map Range previously forcibly clamped values whose magnitude is larger
  than the arbitrary value of 10000. This is no longer the case.

Some nodes were removed:

- Map Value. This was Map Range without the maximum 10000 limitation
  followed by a Clamp node. Both are now available as nodes.

Some common nodes remain separate:

- Separate/Combine Color. Shader counterpart does not yet support all
  color modes, and does not support alpha.
- RGB Curves. Shader variant does not support Film-Like curves or
  Black/White balancing.

Texture nodes will also be added soon in a separate patch. Nodes that
were replaced are now deprecated but still exist and will later be
removed in v5.0. Backward compatibility code was introduced to convert
from the deprecated nodes to the new nodes.

Pull Request: https://projects.blender.org/blender/blender/pulls/135300
2025-03-19 10:54:36 +01:00
Julian Eisel
7a6beb65f4 Asset Browser: Add import settings popover, move import method into it
Part of #134755 / #134766.

Replaces the current import method menu in the middle of the Asset
Browser header with a "Import Settings" popover. The import method is
located there now, because it doesn't need to be as prominent as it used
to be, especially with #104686.

Plan is to add further settings to this popover, e.g. see #135996 or
 #134943.
2025-03-18 17:49:44 +01:00
Martin-Vignali
985f6f82b6 UI: Output > FFmpeg Video hide useless parameters for some codecs
Before this patch, Video Output using FFmpeg video
display lot of parameters.

But some of theses have a meaning only for some codec
(mainly lossy gop codecs : H264, H265, AV1...)

Hide not useful parameters for codec :
'DNXHD', 'FFV1', 'HUFFYUV', 'PNG', 'QTRLE'

- DNXHD : intra frame codec, encoding setting depends of a profile
- FFV1/QTRLE : Intra or P frames only. Lossless codec
- HUFFYUV/PNG : Intra lossless codec

Co-authored-by: mvji <33432858+mvji@users.noreply.github.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/135827
2025-03-18 09:11:14 +01:00
Hans Goudey
835696f152 Geometry Nodes: Move import nodes out of experimental
The import nodes are considered complete enough to expose without
the experimental option. This commit removes the option so they will
be exposed in 4.5. There are still some possible future improvements,
including automatic caching, possibly exposing more input sockets,
and possibly including imported paths in the "Internal Dependencies"
panel. Those are considered non blocking though.

Pull Request: https://projects.blender.org/blender/blender/pulls/135957
2025-03-17 13:54:48 +01:00
Pratik Borhade
e82c22f55e Cleanup: Grease Pencil: Remove old IO operator reference
Operator code is removed though they are still referenced in list of
"cleanup operator preset"

Pull Request: https://projects.blender.org/blender/blender/pulls/136062
2025-03-17 07:56:26 +01:00
Jun Mizutani
9dae51a3d4 UI: Blender theme colors matching the default theme for the face orientation front
Face Orientation Front Color has been changed to transparent for the
default theme (8bcb714b9e). This PR makes the Blender Light theme for
the face orientation front match the default theme alpha.

Pull Request: https://projects.blender.org/blender/blender/pulls/136034
2025-03-17 01:08:45 +01:00
Nika Kutsniashvili
7e3e093254 Anim: Add 12, 8, and 6 FPS presets
Add 12, 8, and 6 FPS presets often used in stylized animation,
especially in 2D/Grease Pencil animation.

12 FPS to animate on 2's, 8 FPS on 3's, 6 FPS on 4's or for
early blocking stages or storyboard.

Pull Request: https://projects.blender.org/blender/blender/pulls/135712
2025-03-16 19:46:40 +01:00
Campbell Barton
4654855d20 Fix error running edit-mode extrude operators for non-mesh objects
The poll functions for: VIEW3D_OT_edit_mesh_* operators only checked
for an edit-mode object which failed with an unhandled exception for
non-mesh objects.
2025-03-16 19:33:30 +11:00
Yury
5b3952d11a FBX Export: Add Smoothgroups option.
Add 'Smoothing Groups' option for exporting polygon smoothing groups.

Generates 'bitflags' smoothgroups values, ensuring no faces from different
groups sharing a same boundary edge or vertex have the same bitflag value.

NOTE: This type of smoothgroups will run out of group values (aka bitflags) with
some specific topologies, e.g. a fan of over 31 flat faces sharing a same vertex
(like the sides of a cone). In such cases, once all available values have been used,
the remaining faces will get  `0` (aka 'no group') value assigned.

Original issue https://projects.blender.org/blender/blender-addons/issues/104434

Pull Request: https://projects.blender.org/blender/blender/pulls/135646
2025-03-14 17:13:41 +01:00
Julian Eisel
4499fad40e UI: Horizontal list view for asset browser
Part of #134755 / #134766.

The asset browser currently lacks a compact view that leaves names
readable. Especially when managing asset libraries (e.g. to prepare it
for sharing or set up a production library), this is quite a usability
issue. A column view like the file browser has can solve this, allowing
a quick overview and fast browsing of libraries, while keeping names
readable.

Adds a new "Horizontal List" display mode to the asset browser that
distributes assets over multiple columns, with horizontal scrolling.
Asset previews are shown in this mode, plus an asset type icon if
there's enough space. The size of previews and the columns can be
configured next to the display mode, for optimizing the display.

Pull Request: https://projects.blender.org/blender/blender/pulls/135306
2025-03-14 16:43:12 +01:00
Pratik Borhade
f5ceb3822a Grease Pencil: Stroke split operator
An operator to split selected points into a separate stroke.
Use `split_points()` function implemented in 2c42294557

Resolves #113643

Pull Request: https://projects.blender.org/blender/blender/pulls/135845
2025-03-14 12:37:25 +01:00
Habib Gahbiche
d8d09cdadb Geometry Nodes: shortcuts for viewer nodes
Implement shortcuts for viewer nodes. Viewer nodes are now activated using the operator `bpy.ops.node.activate_viewer()` instead of activating the viewer by setting the node to active.

This also unifies the behavior with viewer shortcuts in the compositor (see attachment in the original PR).

Pull Request: https://projects.blender.org/blender/blender/pulls/134555
2025-03-14 11:26:57 +01:00
Sybren A. Stüvel
565377b8f1 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-13 11:27:13 +01:00
Pratik Borhade
5a09715db9 Fix #135847: Grease Pencil: Empty material slot doesn't show icon
Move those material specific conditions below so that `icon` is always
drawn in UI even when material does not exist at specific slot.

Pull Request: https://projects.blender.org/blender/blender/pulls/135849
2025-03-13 10:17:05 +01:00
Campbell Barton
6ef7dae8ef Cleanup: spelling in comments (make check_spelling_*) 2025-03-13 13:41:17 +11:00
Sybren A. Stüvel
6def7c3276 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-12 11:47:31 +01:00
Sybren A. Stüvel
9c1845dbf2 Fix #135775: Bake to an empty Action using bake_action_objects throws error
Fix a few small mistakes in the action baking code:

- Assigning an action slot should only happen after the action itself has
  been assigned.
- `_ensure_channelbag_exists()` didn't actually ensure the channelbag
  always exists; now it also creates the layer & strip if necessary.

Pull Request: https://projects.blender.org/blender/blender/pulls/135853
2025-03-12 11:46:34 +01:00
John Kiril Swenson
7356e72e1b VSE: Snap to Frame Range, Snap by Default
This patch adds the ability to snap to the frame range bounds in the VSE
timeline, on by default. End frame snap location is offset by 1 to
ensure the snap point aligns with the visible end frame boundary
(otherwise e.g. right handle of strip would be one frame short).

Timeline and preview snapping is also turned on by default using the
same versioning block.

Pull Request: https://projects.blender.org/blender/blender/pulls/135753
2025-03-12 03:36:32 +01:00
Jeroen Bakker
32999913ef SubDiv: Enable GPU subdivision on Metal
This PR enabled GPU based subdivision on Metal.
Most work is done in #135296.

- Metal max storage bindings for compute shaders were never set.

Some performance figures: Suzanne 6 subdivision levels

| Machine         | CPU Subdivision | GPU Subdivision |
| --------------- | --------------- | --------------- |
| M1 Studio Ultra | 7fps            | 12 fps          |
| M2 Air          | 3fps            | 11 fps          |

Pull Request: https://projects.blender.org/blender/blender/pulls/135628
2025-03-11 11:12:01 +01:00
Jeroen Bakker
c7f7c03f4c Subdiv: Enable GPU subdivision on Vulkan
This PR enabled GPU subdivision on Vulkan backend. Measured
performance is slower compared to CPU on my system. But it is
expected that other bottlenecks should be solved in order to
fully benefit from this feature.

We enable it so we keep track of the performance bottlenecks.

Pull Request: https://projects.blender.org/blender/blender/pulls/135777
2025-03-11 11:08:59 +01:00
Sybren A. Stüvel
2cdd75def0 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-11 10:38:55 +01:00
Pratik Borhade
46086bc1c1 Fix #135436: Attribute "name collisions" show on every UIList
draw_attribute_warnings() called in every attribute panel code.
Following function iterates through entire attribute list
mesh.attributes along with vgroup list to identify the colliding name.
This results in printing collision names in irrelavant panels. Now fixed
by passing relevant attributes to compare in `draw_attribute_warnings`.
First find colliding names, add them to the list if they exists in current attribute list
passed to the function

Pull Request: https://projects.blender.org/blender/blender/pulls/135495
2025-03-11 10:28:34 +01:00
Campbell Barton
1974fbc443 Merge branch 'blender-v4.4-release' 2025-03-10 20:39:55 +11:00
Campbell Barton
3d49186a4a Fix #132843: Wheel's with "Root-is-Purelib: false" fail to install
Some wheels don't use "Purelib", meaning the directory layout of the
wheel needs to be manipulated on installation.

Add partial support for Python's "Binary distribution format" when
Purelib is false, since paths such as `includes` & `scripts` are not
remapped into user accessible locations - they will remain in the
wheels "*.data" directory, these could be supported if it's needed
although it seems like a fairly niche use case.

Ref !135709
2025-03-10 20:38:02 +11:00
Julien Duroure
8f79bf6a8a Merge branch 'blender-v4.4-release' 2025-03-09 05:36:28 +01:00
Julien Duroure
1326eaff09 Fix #135549 - glTF: Fix exporting only def bones + add leaf bones 2025-03-09 05:35:19 +01:00
Falk David
39ceab03be Merge branch 'blender-v4.4-release' 2025-03-07 16:23:53 +01:00
Nathan Vegdahl
b634fd04ed Fix #133010: Rigify operators for copying rig-type parameters fail
The underlying issue was that the code was trying to directly assign a Python
dictionary to an add-on defined Group Property accessed via `[]` syntax, like
this:

```
to_bone['rigify_parameters'] = param_dict
```

That only works if 'rigify_parameters' does *not* already exist according to the
`[]` lookup, so this was failing whenever it already did.

This PR fixes that by simply deleting the property first when it already exists.

Co-authored-by: Ayoub ibn Muhammad <cl3m3c7@riseup.net>
Co-authored-by: Sybren A. Stüvel <sybren@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/135233
2025-03-07 12:53:56 +01:00
Hans Goudey
9287bb759b Geometry Nodes: Import Text node
As a small addition to the import node features for 4.5,
this simple node imports a text file as a string. Potential
use cases include retrieving text for motion graphics.

Currently this just allows .txt files. More extensions could
be allowed in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/135459
2025-03-06 18:47:30 +01:00
Christoph Lendenfeld
ba1e51cff9 Merge branch 'blender-v4.4-release' 2025-03-06 15:54:03 +01:00
Christoph Lendenfeld
a485bf6556 Fix #134034: Baking a custom property with a name existing in Blender failed
When baking custom properties that were named exactly the same
as a property already in Blender (in this case `scale`), it would fail.
The issue was introduced with eee32726c7 where the goal was
to not key addon defined properties.
The problem with that approach was that `obj.bpy_rna.properties`
not only contains addon defined properties but also all that are native to Blender.
So the rna path would be created to be identical as for e.g. transform properties.

The fix is to test the property for `is_runtime` which is true for addon
defined properties but false for blender internal properties

I tested with the test file of #121349 to confirm that doing so
doesn't bring that original bug back.

Pull Request: https://projects.blender.org/blender/blender/pulls/135297
2025-03-06 15:51:44 +01:00
Campbell Barton
5558491bf1 Merge branch 'blender-v4.4-release' 2025-03-06 15:54:01 +11:00
Campbell Barton
1635595f94 Fix exceptions in node operator poll functions 2025-03-06 15:24:52 +11:00
Nika Kutsniashvili
e35582b73c Fix #135346: Cavity missing from Workbench render properties
Commit 9627bdfab3 moved Cavity properties to a new panel, but forgot to
include it in Workbench render properties as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/135504
2025-03-05 11:45:00 +01:00
Campbell Barton
214d6edcc0 Merge branch 'blender-v4.4-release' 2025-03-05 15:38:03 +11:00
Campbell Barton
378cc32efa Fix #83819: Toolbar tooltip missing with custom-keymap
When accessing the key-map for tooltips it's important to use
the final "user" keymap, combine from "active" & "default".

Using the active keyconfig would only keys from key-maps that had
been modified.
2025-03-05 15:34:45 +11:00
Sean Kim
5b04b4ac18 Sculpt: Add Mask by Color to menu bar and enable redo panel
This commit adds the `sculpt.mask_by_color` operator to the 'Mask' menu item in Sculpt Mode. This
allows users to access it via operator / property search. Additionally, the Redo panel is exposed
for general usage.

Pull Request: https://projects.blender.org/blender/blender/pulls/135210
2025-03-04 17:33:45 +01:00
Campbell Barton
4177b75e7a Cleanup: quiet warnings from ruff, use static sets 2025-03-04 16:02:55 +11:00
Campbell Barton
302532921f Docs: add docs & code comments for extensions 2025-03-04 15:58:21 +11:00