Commit Graph

4168 Commits

Author SHA1 Message Date
Falk David
1968f3159f Merge branch 'blender-v5.0-release' 2025-10-13 10:51:28 +02:00
Falk David
d7555b5064 Fix: Grease Pencil: UI: Wrong usage of contains operator
Introduced with 1fa2be8a9b.
This should have used `==` instrad of `in`.
2025-10-13 10:50:14 +02:00
Damien Picard
9d0266280f Cycles: OSL Camera: Allow mm as parameter unit, use as cam distance
Commit 6c6d1a9b63 allowed several units to OSL camera shaders'
parameters. Only meters 'm' were supported as distance units, because
others cannot be converted automatically into the shader' unit.

This commit allows using 'mm' in addition to 'm', and makes the
Blender property use a 'DISTANCE_CAMERA' subtype. This assumes that
someone using 'mm' specifically wants to use the value for camera
parameters, which means it can be used as is, without any conversion
in the shader.

The camera templates were updated to use a focal length in mm.

Pull Request: https://projects.blender.org/blender/blender/pulls/147347
2025-10-13 02:52:16 +02:00
Harley Acheson
3ad589e973 Merge branch 'blender-v5.0-release' 2025-10-12 16:30:01 -07:00
Harley Acheson
6691529dcc Fix #147926: Incorrect Icon used for Generic Collection
We have icons that represent specific individual collections. like
Icon_Outliner_Collection for a default (uncolored) collection, and
Icon_Collection_color_x for ones with colors. For "collections" as a
general thing though we have icon_group. Sometimes we confuse the two,
for example the list of tabs to show in Properties uses a different
icon than the actual category icon. This PR fixes the complaint by
using the correct icon for each of these purposes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147942
2025-10-13 01:26:16 +02:00
Lukas Stockner
c0bec1d068 Merge branch 'blender-v5.0-release' 2025-10-13 01:08:43 +02:00
Damien Picard
a2f94ab1ad Fix #147062: OSL Camera: Aperture size depends on focal length
In OSL custom cameras, the current aperture size depends on the focal
length of the Blender camera, even though it is not usable by the
shader. This gives incoherent values to the depth of field.

To ignore this factor, this commit makes the custom camera behave the
same as the orthographic camera, by not being multiplied by the focal
length.

To compensate for that, the multiplication must happen inside the
shader. This adjustment was done in the advanced camera shader
template.

Pull Request: https://projects.blender.org/blender/blender/pulls/147346
2025-10-13 00:23:25 +02:00
John Kiril Swenson
cf976a7e99 Merge branch 'blender-v5.0-release' 2025-10-12 17:05:41 -05:00
John Kiril Swenson
99b9f6cafc Fix #147655: VSE: Sequencer scene datablock missing in combined view
UI code forgot to check for `SEQUENCER_PREVIEW` view type.
2025-10-13 00:01:38 +02:00
Campbell Barton
7a249222be Cleanup: tweak multi-line parenthesis for Python scripts
Reduce right shift, moving closing parenthesis onto own line
for clarity & reducing diff noise in some cases.

Ref !147857
2025-10-12 03:31:31 +00:00
Howard Trickey
ebd2909123 Merge branch 'blender-v5.0-release' 2025-10-11 20:14:26 -04:00
Casey Bianco-Davis
1fa2be8a9b Fix #147394: Grease Pencil: Opacity operator missing for the menu
The Grease Pencil operator for changing the Opacity of selected strokes
was missing from the transform menu, which is the where the `Radius`
operator lives.

This prevented the operator from being searched.

4.5 backport candidate.

Pull Request: https://projects.blender.org/blender/blender/pulls/147672
2025-10-12 02:10:14 +02:00
Casey Bianco-Davis
9496d941fd Grease Pencil: Add Sample Color operator to Vertex Color Mode
This PR adds the `sample_color` operator to Grease Pencil Vertex Paint
Mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/146951
2025-10-12 01:45:13 +02:00
Nick Alberelli
877283a09a PyAPI: bpy.ops callable type in the C-API
Moving `__call__` logic into Python's C-API means error messages
caused by operators reference the code of the caller instead of the
call from `.scripts/modules/bpy/ops.py`.

When a full call stack is available this isn't so important,
however when logging callers it's not useful to log the call
from `ops.py`.

There minor performance advantages for moving from Python to C++
however this wasn't a significant consideration for the change.

Note that this is a fairly direct conversion from Python to C++,
there is room for refactoring to simplify the calling logic.

See #144746 for the motivation & #147448 for further improvements.

Ref !145344
2025-10-11 03:04:57 +00:00
Harley Acheson
641a14d312 Merge branch 'blender-v5.0-release' 2025-10-10 09:20:36 -07:00
Janne Nylander
88308e108e Fix #147739: Python animation baking script was checking bone selection from wrong type of bone
The script was checking if a bone was selected via Bone.select.
As of 5.0, this is not available. Instead, PoseBone.select should be used.

Pull Request: https://projects.blender.org/blender/blender/pulls/147743
2025-10-10 17:29:08 +02:00
Bastien Montagne
4cb1564507 Merge branch 'blender-v5.0-release' 2025-10-10 16:02:20 +02:00
Damien Picard
84fc90bb43 I18n: Extract many messages from ED_push_undo
This function is used to add undo steps. It includes a message, for
use in the Undo History menu. This label uses the "Operator" context
for translation.

This commit adds automatic extraction of two functions `ED_undo_push`
and `ED_undo_grouped_push`, as well as manual extraction for many
strings not declared in the function calls.

In order to extract those messages using the proper context, the
extraction logic had to be changed so that a custom context could be
specified. The regexes can now be either a pattern, or
a (ctxt_override, pattern) tuple.

Pull Request: https://projects.blender.org/blender/blender/pulls/147581
2025-10-10 16:01:35 +02:00
Bastien Montagne
d57d76f23d I18n: Refactor: Introduce class for message regexes, includes ctxt
This new class for C++ message extraction regexes includes an optional
translation context override.
2025-10-10 16:01:34 +02:00
irex124
0e9fc94a30 UI: Show Movie Clip frame properties UI template
This patch shows the start and end frames of the Movie Clip in its UI
template, which is now shown in the compositor node N-panel and camera
background image

Pull Request: https://projects.blender.org/blender/blender/pulls/145541
2025-10-10 08:49:36 +02:00
Sean Kim
3b804950ba Merge branch 'blender-v5.0-release' 2025-10-09 12:07:03 -07:00
Sean Kim
c415febbbb Fix #147568: Editable image in texture paint slot grayed out
Introdued with a926f5b67d

Pull Request: https://projects.blender.org/blender/blender/pulls/147578
2025-10-09 21:06:31 +02:00
Omar Emara
db347d0adf Merge branch 'blender-v5.0-release' 2025-10-09 18:28:30 +03:00
Omar Emara
5841cb21f7 Fix #146759: Radial Tilling node crashes in the compositor
The Radial Tilling node crashes in the compositor in GPU mode. This is
because the compositor does not yet support 2D vectors in shader code
generation, but properly supports and expects them in the interface,
which the Radial Tilling node declares. This results in a bad shader
which crashes Blender.

To properly fix this, we need to:

- Support 2D vectors in compositor GPU material shader code generation.
- Support 2D vectors in shader node GPU stack construction.
- Adjust the interface of radial tilling to actually use 2D vectors.

This seems risky for 5.0, so this patch temporarily drops support for
the node in the compositor in 5.0. Then once 2D vectors are supported,
it can be enabled again.

Pull Request: https://projects.blender.org/blender/blender/pulls/147627
2025-10-09 17:23:12 +02:00
Hans Goudey
d445f12070 Merge branch 'blender-v5.0-release' 2025-10-09 10:52:27 -04:00
Christoph Lendenfeld
d68680ed61 Fix #147709: Use correct property for bone selection in Python
Replace all calls to `pose_bone.bone.select` with
`pose_bone.select` since that is where the property lives now

Pull Request: https://projects.blender.org/blender/blender/pulls/147725
2025-10-09 16:52:06 +02:00
Falk David
d975766c58 Merge branch 'blender-v5.0-release' 2025-10-09 15:46:31 +02:00
Falk David
f9a76822a8 Fix #147437: VSE: Some python operators are broken
Since the introduction of the sequencer scene,
some of the sequencer python operators have
been using `context.scene` when they should be using
`context.workspace.sequencer_scene`.

This fixes `SequencerFadesAdd`, `SequencerFadesClear`,
`SequencerDeinterlaceSelectedMovies`,
`SequencerSplitMulticam`, and `SequencerCrossfadeSounds`.

Pull Request: https://projects.blender.org/blender/blender/pulls/147560
2025-10-09 15:46:05 +02:00
Richard Antalik
6a085cbc9d Cleanup: Use tuple for an immutable sequence of items
Pull Request: https://projects.blender.org/blender/blender/pulls/147675
2025-10-09 12:46:26 +02:00
Bastien Montagne
3aed0aa7ba Merge branch 'blender-v5.0-release' 2025-10-09 12:10:58 +02:00
Damien Picard
86ea2bd1ce I18n: Sort sockets in translation extraction, for stable .po files
Socket names and descriptions were not sorted, which could result in
changes between invocations of the translation extraction script.
2025-10-09 12:09:56 +02:00
Damien Picard
98814c1dcd I18n: Translate reports using "WM_global_report(f)"
In bd06baf6e6, "WM_report" was renamed to "WM_global_report", but this
name was not changed in the translation extraction regex. Same for the
format version of this function.

Reported by Ye Gui in #43295.
2025-10-09 12:09:56 +02:00
Damien Picard
09f9edb38c I18n: Translate "Hide Hotkey List" in Node Wrangler preferences
The button used a custom text that could be the same as the default,
properly extracted text ("Show Hotkey Text"), or a different
one ("Hide Hotkey Text"), and was thus not always shown.

Reported by Ye Gui in #43295.
2025-10-09 12:09:56 +02:00
Damien Picard
7ec15a3a98 I18n: Use rpt_ instead of tip_ to translate reports
This was the case in:
- FBX add-on
- Cycles OSL
2025-10-09 12:09:56 +02:00
Damien Picard
2750cc1a70 I18n: Translate Geometry Nodes modifier warnings
Geometry Nodes can generate warnings inside node trees using a Warning
node. This is used to report warnings in the modifier interface.

This commit allows translation of these warnings in the interface
template, and extracts the messages from built-in asset node groups,
by looking at each warning node.

Pull Request: https://projects.blender.org/blender/blender/pulls/147584
2025-10-09 12:09:44 +02:00
Damien Picard
c35de6f92d I18n: Translate labels using node UI function from node_add_menu.py
In 2a1a658492, layout functions for nodes were refactored and new
methods were introduced, but this change was not applied to the
translation extraction script.

This commit adds these method names and argument order to Python
extraction: "node_operator", "node_operator_with_outputs",
"simulation_zone", "repeat_zone", "for_each_element_zone",
"closure_zone".

Tooltips specified in a special structure are manually extracted using
`n_()`.

Actual translation is done manually in the UI methods inside NodeMenu,
in order to override the context, which by default would have been
"Operator".

Reported by Ye Gui in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/147582
2025-10-09 12:09:25 +02:00
Jacques Lucke
3fe28cbfab Merge branch 'blender-v5.0-release' 2025-10-09 11:23:45 +02:00
Sybren A. Stüvel
8b5c13ac28 Anim: do not access clipboard in Paste Global Transform poll function
Remove access to the clipboard from the Paste Global Transform operator
poll function, as it can cause slowdowns when there is a lot of data on
the clipboard.

This also means that the parsing code has to be a bit more lenient to the
contents of the clipboard. And, because the error message that there is
no matrix on the clipboard is now going to be shown more often, I made it
a bit more friendly.

Pull Request: https://projects.blender.org/blender/blender/pulls/147562
2025-10-09 11:01:25 +02:00
Falk David
87fb5aa303 Merge branch 'blender-v5.0-release' 2025-10-09 10:44:56 +02:00
Damien Picard
227ce1711a Cleanup: Remove unused color balance modifier draw function
Sequencer modifiers are no longer drawn from Python since 866fcd0a09.
The function `draw_color_balance` that draws the Color Balance
modifier is no longer called anywhere, so it can be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/147571
2025-10-09 10:42:22 +02:00
Richard Antalik
415f4b08fa Merge branch 'blender-v5.0-release' 2025-10-09 04:55:22 +02:00
Richard Antalik
a82f3a0fe0 UI: Add tab filter popover to vertical tabs
This adds unobtrusive tab button for selecting displayed tabs to the
tabs region. The idea is, that this way, the filter is much more
discoverable than it being hidden in options popover. The button is
grayed out, when all tabs are visible.

To only draw arrow, is achieved by setting `UILayout.emboss` to `NONE`
or `NONE_OR_STATUS`

Pull Request: https://projects.blender.org/blender/blender/pulls/135132
2025-10-09 04:51:18 +02:00
Harley Acheson
33457d8723 Merge branch 'blender-v5.0-release' 2025-10-08 14:05:47 -07:00
Harley Acheson
2eaac0ad74 Fix #147574: Icon_Group Use Instead of Icon_Outliner_Collection
We have icons that represent specific individual collections. like
Icon_Outliner_Collection for a default (uncolored) collection, and
Icon_Collection_color_x for ones with colors. For "collections" as a
general thing though we have icon_group. Sometimes we confuse the two,
for example the list of tabs to show in Properties uses a different
icon than the actual category icon. This PR fixes the complaint by
using the correct icon for each of these purposes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147652
2025-10-08 23:04:11 +02:00
Julien Duroure
8dcbf4a527 glTF: Bump addon version to 5.1.0 after 5.0 branch creation 2025-10-08 21:18:32 +02:00
Jacques Lucke
4ca8cf27aa Fix: quick fur operator reads asset from wrong file
The assets files were moved a couple of days ago.
2025-10-08 20:00:15 +02:00
Hans Goudey
085276d8ba UI: Nodes: Sort packed groups below assets in add menu search
Previously items in the "Group" list would usually show up first because
their menu path is shorter. Now, adjust their search weight so they show
up lower than the corresponding asset. That this is just a heuristic,
because we don't have a good way to directly deduplicate groups
that are just packed assets in the add menu currently.

Pull Request: https://projects.blender.org/blender/blender/pulls/147629
2025-10-08 16:15:03 +02:00
Pablo Vazquez
6a109a75dd Fix: Compositor: Add Asset Shelf toggle to View menu
Add missing Asset Shelf entry in the View menu in the Compositor.

Pull Request: https://projects.blender.org/blender/blender/pulls/147615
2025-10-08 14:57:53 +02:00
Andrej730
dec032e12e Anim: Indicate Parent Inverse Matrix State in UI
Show the Parent Inverse matrix in the Object properties, Transform
panel. The matrix is shown decomposed as location/rotation/scale.

Pull Request: https://projects.blender.org/blender/blender/pulls/113364
2025-10-08 11:13:24 +02:00
Pratik Borhade
3432c0b238 Fix #147431: Node Editor: 'Join in Named Frame' missing from menus
Operator isn't exposed in UI, now added inside Node menu.
Missed in 8ec093a2d8

Pull Request: https://projects.blender.org/blender/blender/pulls/147499
2025-10-08 11:10:36 +02:00