Commit Graph

3959 Commits

Author SHA1 Message Date
Dalai Felinto
420dfebbb8 UI: Add Modifier: Move Geometry Nodes last
With Blender 5.0 a few modifier assets are bundled. This makes the
Geometry Nodes modifier even more of a special modifier which isn't
intended for many people to use.

As such this PR moves it to the end to be a bit less prominent.

| 4.5 | PR | PR |
| - | - | - |
|<img width="217" alt="Screenshot 2025-09-22 at 16.10.17.png" src="attachments/c12fedc4-549e-4b7b-bc28-c990e17a679e">|<img width="182" alt="Screenshot 2025-09-22 at 16.11.18.png" src="attachments/ce80702e-95dd-441a-8d36-c41f64d03a64">|<img width="214" alt="Screenshot 2025-09-22 at 16.11.45.png" src="attachments/5b07d5e9-b133-4fc5-a5a4-a1989929e58e">|

The PR column shows the changes proposed here in two scenarios: with and another without Unassigned assets.

Ref: !146590
2025-09-22 18:59:36 +02:00
Dalai Felinto
851e5b55af VSE: Story Tools: Add Scene Strip Menu improvements
- Show unassigned scene assets directly under Assets.
- Use Icons for Assets label.
- Only show "Scenes" when there are Assets.
- Don't show scene assets on the "Scenes" list.

The design about changing the operator default behaviour will be
addressed separately. This patch only changes the UI.

Design ref: #145522
Ref: !146574
2025-09-22 17:19:03 +02:00
Tenkai Raiko
f8d579d153 Nodes: Add Radial Tiling Node
On its own, the main functionality of the Radial Tiling node
is the ability to divide a 2D Cartesian coordinate system into
as many radial segments as specified by the "Segments" input.
Each segment has its own affinely transformed coordinate system,
provided through the "Segment Coordinates" output, which can be
used to tile textures in a radially symmetric manner.

Additionally, a unique index is provided for every segment through
the "Segment ID" output, the width of each segment at Y-coordinate
of the "Segment Coordinates" output without normalization = 0 is
provided through the "Segment Width" output and the rotation value
of the affine transformation of the coordinate system of each segment
is provided through the "Segment Rotation" output.

The roundness of the coordinate lines of the "Segment Coordinates"
output can be controlled through the "Roundness" inputs.
This can be used to make the coordinate systems of the segments
a mix of Cartesian and polar coordinates.

Lastly, the lines of points of the "Segment Coordinates" output with
constant Y-coordinates have the shape of polygon with rounded corners,
which can be used to procedurally create rounded polygons.

Pull Request: https://projects.blender.org/blender/blender/pulls/127711
2025-09-22 16:02:37 +02:00
Philipp Oeser
af601e01fa Fix #145987: Brush selector available in Image Editor Mask mode
The keymap `km_image_paint` righfully includes both
`VIEW3D_AST_brush_texture_paint` and `IMAGE_AST_brush_paint` since
painting can be done in both Editors.

So we want to improve upon polling.

Three parent classes involved: `ImageAssetShelf`, `View3DAssetShelf`,
both inherit from `BrushAssetShelf`

`IMAGE_AST_brush_paint` (inherits from `ImageAssetShelf`) was already
checking for being in paint mode (so that Asset Shelf already wasnt
showing), but `VIEW3D_AST_brush_texture_paint` (inherits from
`View3DAssetShelf`) was permissive (doesnt have specialized poll, relies
on the "mother" classes `BrushAssetShelf` which only checks for an
active object and if that active objects `mode` equals the Assets Shelfs
"mode"). This can be true if you have an object in Texture Paint mode in
the 3DView.

So to make shelves like `VIEW3D_AST_brush_texture_paint` **not** pass
their poll in the Image Editor, add a specific poll case.

NOTE: the report also mentiones a crash when actually selecting a "bad"
brush from the "bad" asset shelf. Since that scenario is now impossible
to reach, the crash has not been investigated further.

Pull Request: https://projects.blender.org/blender/blender/pulls/146071
2025-09-22 15:56:52 +02:00
Alaska
2f02866519 Fix #146322: Spelling mistake and missing return type for axis_conversion
Fix typo in PyApi doc of `axis_conversion` and add return type

Pull Request: https://projects.blender.org/blender/blender/pulls/146353
2025-09-22 15:48:11 +02:00
Simon Thommes
40ecce9843 Fix: Geometry Nodes: Move to Nodes operator not disabled on linked data
This operator can only be used if the data-block the modifier belongs to
is editable.
2025-09-21 13:44:06 +02:00
Julien Duroure
9f3770b949 Fix #142867 - glTF importer: Fix crash trying to import an empty glTF scene 2025-09-21 11:26:48 +02:00
Mohamed Hassan
48ba7b7745 Compositor: Add a kernel convolution mode to glare node
This patch adds a kernel convolution mode to the Glare node, which is
basically a wrapper around the Convolve node for extra control.

Pull Request: https://projects.blender.org/blender/blender/pulls/145379
2025-09-19 14:33:08 +02:00
tariqsulley
c2319f8293 Modeling: support adding lattices to selected objects
Support adding lattices to selected objects,
deforming them with with the lattice modifier.

By default the lattice fits to the object bounds and is oriented
to the active object (if it's set).

Resolves #144076

Ref !144888
2025-09-19 11:33:12 +10:00
Weizhen Huang
eae0a33dd4 Revert "New bone color presets"
This reverts commit ab98959af0.
Did not mean to push
2025-09-16 18:04:25 +02:00
Weizhen Huang
a0daebb4a7 Revert "New Colors v4"
This reverts commit a1dfd67cbf.
Did not mean to push
2025-09-16 18:02:07 +02:00
demeterdzadik@gmail.com
a1dfd67cbf New Colors v4 2025-09-16 17:59:54 +02:00
demeterdzadik@gmail.com
ab98959af0 New bone color presets
See design task:
https://projects.blender.org/blender/blender/issues/112635
2025-09-16 17:58:22 +02:00
Pablo Vazquez
fa6be590d9 UI: Move OpenGL render operators to sub-menu
Move 3D Viewport and Sequencer OpenGL render operators into a
"Render Preview" sub-menu.

The goal is to make the operation more clear, and being able to add
new entries to render the active scene or Sequencer scene (handy when
using the new "Sync Scene").

This also reduces the length of the `View` menu which in some cases
can get quite long.

See PR for details and screenshots.

Resolves #146302

Pull Request: https://projects.blender.org/blender/blender/pulls/146316
2025-09-16 10:44:29 +02:00
Pablo Vazquez
ae7f3a0d18 Fix #146284: Missing Navigation Bar in Preferences
Follow up to !146169

- Add versioning so the new sidebar shows up in old files.
- Remove the hidden flag so it shows up in new Preferences editors.
- Add "Sidebar" toggle to the View menu, and expose region toggle.

Pull Request: https://projects.blender.org/blender/blender/pulls/146321
2025-09-15 18:11:37 +02:00
Sean Kim
5b02341a11 UI: Add ability to collapse paint pressure curves
This commit builds off of 5f8311f596 to support collapsing the custom
paint curve to reduce the amount of information shown to the user.

To support this, a new field is added to the `Paint` struct for this
visibility flag. This value is stored on a per-mode level, not a
per-brush level, as a user editing this curve is likely to not need
the visibility granularity on a per-brush basis.

Additionally, changes are included here to draw the curve button
itself as inactive if the parent layout it is part of is inactive.
Notably, this does not make the curve read only - it only changes
the appearance.

Pull Request: https://projects.blender.org/blender/blender/pulls/145699
2025-09-15 14:45:50 +02:00
Habib Gahbiche
1b4daf9d2e Nodes: remove "Use Nodes" in Shader Editor for Object Materials
"Use Nodes" was removed in the compositor to simplify the compositing
workflow. This introduced a slight inconsistency with the Shader Node
Editor.

This PR removes "Use Nodes" for object materials.

For Line Style, no changes are planned (not sure how to preserve
compatibility yet).
This simplifies the state of objects; either they have a material or
they don't.

Backward compatibility:
- If Use Nodes is turned Off, new nodes are added to the node tree to
simulate the same material:
- DNA: Only `use_nodes` is marked deprecated
- Python API:
  - `material.use_nodes` is marked deprecated and will be removed in
6.0. Reading it always returns `True` and setting it has no effect.
  - `material.diffuse_color`, `material.specular` etc.. Are not used by
EEVEE anymore but are kept because they are used by Workbench.

Forward compatibility:
Always enable 'Use Nodes' when writing blend files.

Known Issues:
Some UI tests are failing on macOS

Pull Request: https://projects.blender.org/blender/blender/pulls/141278
2025-09-14 17:53:54 +02:00
Eitan Traurig
a9a54c88b9 UV: add pack to custom region option to "Pack Islands" operator
This commit implements the design task #78398

- Box region
  - Set Custom UV Region (Ctrl-B).
  - Disabled with Custom Region checkbox in the menu or (Ctrl-Alt-B).
- Box Select (Pinned) changed to (Alt-B).
- When the Custom Region enum is chosen the islands are packed
  into the bounding box of the drawn region.

Ref !140020
2025-09-14 05:23:47 +00:00
Damien Picard
56d52a7070 I18n: Disambiguate "Value" in colors
In some languages, a color value (as in Hue, Saturation, Value), is
not the same as a numeric or other variable value.

Pull Request: https://projects.blender.org/blender/blender/pulls/145839
2025-09-12 18:31:03 +02:00
Damien Picard
eedc381f87 I18n: Disambiguate "Split" in the context of the sequencer
Issue reported by Joan Pujolar.
2025-09-12 18:30:56 +02:00
Damien Picard
ddbc6ed858 I18n: Allow translation of some messages using string formatting
- Add `iface_` translation functions and `translate=False` to a few UI
  elements.
- Add `rpt_` translation functions to a few reports.
2025-09-12 18:30:56 +02:00
Damien Picard
2963fc12f9 I18n: Disambiguate "Marker" in tracking editor
Most "Marker"s are time markers in the timeline, but these ones are
the tracking points in the Video Clip editor.
2025-09-12 18:30:56 +02:00
Pablo Vazquez
2898ef0a5c UI: Preferences: Move sections to a regular sidebar region
While perhaps it is more accurate to draw the sidebar navigation in a
"Navigation Bar" region, the navigation "tabs" are not real tabs, so
the darker background usually used for tabs doesn't look good here.

Draw the sections radio buttons in a regular sidebar region instead.

See PR for details and screenshots.

Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/146169
2025-09-12 18:20:11 +02:00
Nika Kutsniashvili
250384dd57 UI: Theme: Scrubbing/Markers shared region
Continues and depends on #145609, part of #140360 project.

Previously, all 5 animation/video editors had different properties
for Scrubbing/Markers region. This PR adds new Region panel for it,
so that all editors can share one color.

Text color in this region was coming from regular editor text color.
To differentiate between editors (as is the pattern already with other editors),
and allow more modular themeability of regions, new Text color is added
for that region as well.

Video in PR

Pull Request: https://projects.blender.org/blender/blender/pulls/146113
2025-09-12 16:25:56 +02:00
Nika Kutsniashvili
7f62d5d85e UI: Theme: Common colors for animation channels
Continuation of #140360

New common properties for Channel and Channel Selected,
used in animation editors.
Previously Dope Sheet, Graph Editor, NLA, and Movie Clip Editor
had separate properties for them.

Video and images inside the PR.

---

> [!important]

- Channels looked different in Dope Sheet and Graph Editor. In the former,
they were same color as the background, so only labels and icons were visible,
in the latter they had a darker color, so their outline was visible. We need to pick
which design we go for now that they're combined. I chose color from Graph
Editor for now, with alpha from Dope Sheet, since only that editor uses alpha.

---

There is a confusion with names of channel colors. In 4.5 there is:
- - "Channel" (singular, blue color) which refers to objects, actions,
and action slots that hold/combine channels.
- - "Channels" (plural, black color) which refers to individual channels.

This goes against how we name things. In theme, especially, we refer to object
colors as "Object", singular, not Objects, plular. Same goes for all elements except
this one, where individual elements are referred in plural.

To lessen the confusion, and also avoid unnecessary breaking changes in the
future (in case we want to rename blue things, which seems likely), in this PR
I swap those names. Main reason is that black color marks individual channels,
so it should be singular, and blue colors are combination of many channels,
so they should be plural. Otherwise even talking about them is awkward.

Note that renaming isn't a breaking change, because we already "broke" them
by moving them to common path from individual editors.

Pull Request: https://projects.blender.org/blender/blender/pulls/146091
2025-09-12 14:49:27 +02:00
Nika Kutsniashvili
534b5f1f4f UI: Theme: Shared regions
Continuing recent attempts to combine theme settings
and reduce complexity. part of #140360
This PR adds new root panel in theme called "Regions" which for now
includes two subpanels:

# Asset Shelf
This is just moving asset shelf from root to regions, where
it's more appropriate and less noisy.
No functional changes. (alternative to #144267)

# Channels
Previously known as "Theme Space List", or "Source List",
but in user interface we refer this region as "Channels".
This region is shared by all animation/video editors, and each had
a separate panel for theme properties. Now they're combined, and all
editors follow settings defined in Regions -> Channels.

Additionally, "Source List Title" property, which was never used is removed.
Properties are also renamed to be more intuitive and shorter.

# Toolbar / Sidebar
Previously was registered separately on every single editor. This allowed
for some extra customization, but in 5.0 need for this is reduced very much,
because elements drawn in those regions (tabs & tools) are also generalized,
so it makes sense to want same background color for them as well.

> This replaces 46 properties with 5, reducing the total by 41.
> Videos in PR

Pull Request: https://projects.blender.org/blender/blender/pulls/145609
2025-09-12 13:22:50 +02:00
Pratik Borhade
080d996501 Fix #146122: Grease Pencil: Duplicate cursor panel in draw mode
Caused by cc5d111078
Same parent panel being used for brush panel in sculpt, draw modes.
Add poll function that checks the current mode to avoid duplicate generation.

Pull Request: https://projects.blender.org/blender/blender/pulls/145916
2025-09-12 03:06:14 +02:00
Sean Kim
4c2ea47aec UI: Add 'Developer Tools' section to user preferences
This PR introduces a 'Developer Tools' section of the user preferences,
enabled when the `Developer Extras` option is enabled. This menu will
not be hidden when the release cycle is no longer in alpha, allowing
developers to use this for common debug options instead of having to use
`G.debug_value` and arbitrary values.

This has the benefit of allowing for an ease of debugging in non-alpha
builds as well as being able to use multiple options that would have
been considered exclusive debug options at once.

None of the existing values bound to a specific `G.debug_value` have
been migrated yet.

Pull Request: https://projects.blender.org/blender/blender/pulls/145215
2025-09-11 23:53:43 +02:00
Pablo Vazquez
535c25800b UI: Timeline: Improve Keying popover label
Display the active keying set name as label, and an icon to indicate
the current keyframe type.

This also adds a descripition/tooltip to the keying popover, so it's
easier to understand when the keying set name is not clear.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/145963
2025-09-11 14:43:42 +02:00
Philipp Oeser
ed547afcd2 Fix #146045: wrong modifier list in audio strips, crash when selected
8dcd01907d added Video strip modifiers for Audio strips as well, now
corrected.

Pull Request: https://projects.blender.org/blender/blender/pulls/146067
2025-09-11 11:31:14 +02:00
luz paz
072f956ce0 Cleanup: Fix typos in scripts subdirectory
Fix spellings from comment and string
Found via codespell

Pull Request: https://projects.blender.org/blender/blender/pulls/145834
2025-09-11 11:29:06 +02:00
Jacques Lucke
c3f49cd24e Shader Nodes: add Python API for inlined shader nodes
This makes the shader node inlining from #141936 available to external renderers
which use the Python API. Existing external renderer add-ons need to be updated
to get the inlined node tree from a material like below instead of using the
original node tree of the material directly.

The main contribution are these three methods: `Material.inline_shader_nodes()`,
`Light.inline_shader_nodes()` and `World.inline_shader_nodes()`.

In theory, there could be an inlining API for node trees more generally, but
some aspects of the inlining are specific to shader nodes currently. For example
the detection of output nodes and implicit input handling. Furthermore, having
the method on e.g. `Material` instead of on the node tree might be more future
proof for the case when we want to store input properties of the material on the
`Material` which are then passed into the shader node tree.

Example from API docs:
```python
import bpy

# The materials should be retrieved from the evaluated object to make sure that
# e.g. edits of Geometry Nodes are applied.
depsgraph = bpy.context.view_layer.depsgraph
ob = bpy.context.active_object
ob_eval = depsgraph.id_eval_get(ob)
material_eval = ob_eval.material_slots[0].material

# Compute the inlined shader nodes.
# Important: Do not loose the reference to this object while accessing the inlined
#   node tree. Otherwise there will be a crash due to a dangling pointer.
inline_shader_nodes = material_eval.inline_shader_nodes()

# Get the actual inlined `bpy.types.NodeTree`.
tree = inline_shader_nodes.node_tree

for node in tree.nodes:
    print(node.name)
```

Pull Request: https://projects.blender.org/blender/blender/pulls/145811
2025-09-11 06:08:30 +02:00
Falk David
491a39b0c6 VSE: Strip Modifier Icons
Add missing icons to Video Sequencer modifiers:

- [x] Brightness/Contrast
- [x] Color Balance
- [x] Curves
- [x] Hue Correct
- [x] Mask (uses the existing `MOD_MASK`)
- [x] Tone Map
- [x] White Balance

Co-authored-by: Pablo Vazquez <pablo@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/145739
2025-09-10 19:27:43 +02:00
Sergey Sharybin
3ef2df3893 Cycles: Remove Use Tiling option
Always enforce tiling of some size, up to the 8k tile size.

Rendering very big images without tiles have a lot of challenges.
While solving those challenges is not impossible, it does not seem to
be a practical time investment.

The internals of the way how Cycles work, including Cycles Standalone
is not affected by this change.

A possible downside is that path guiding might not work exactly how one
would expect it to due to lack of information sharing across multiple
tiles. This is something that never worked nicely, and camera animation
and border render has the same issues, so it is not considered a stopper
for this change.

Fixes #145900

Co-authored-by: Brecht Van Lommel <brecht@blender.org>

Pull Request: https://projects.blender.org/blender/blender/pulls/146031
2025-09-10 17:15:07 +02:00
Brecht Van Lommel
6d25aad41f Cycles: Remove Alembic procedural
This was added for a fairly specialezed use case and is no longer being used
as far as we know. A future replacement would be to add a USD/Hydra procedural,
for which most of the groundwork already exists.

Pull Request: https://projects.blender.org/blender/blender/pulls/146021
2025-09-10 16:39:01 +02:00
Habib Gahbiche
ac84e076db Nodes: Deactivate viewer if shortcut exists and viewer is active
Original right click select:
https://blender.community/c/rightclickselect/wRzz/

Pressing 1,2,3,... to activate a viewer with shortcut now toggles that
viewer instead of always activating it. See PR description for examples

The code is generic but the compositor requires one viewer to be active
so only geometry nodes viewers are supported.

Pull Request: https://projects.blender.org/blender/blender/pulls/145509
2025-09-10 15:17:16 +02:00
Leon Schittek
c954d6cdfd Nodes: Add tools for "Mute Links" and "Add Reroute" operator
Expose the "Mute Links" add "Add Reroute" operator as active tools
in the node editor similar to the "Links Cut" tool.

This also works around #134153 by adding additional tools in the same
button group to the toolbar.

Pull Request: https://projects.blender.org/blender/blender/pulls/140429
2025-09-10 15:12:37 +02:00
Campbell Barton
85788f3dea Cleanup: resolve pylint warnings 2025-09-10 11:31:23 +10:00
Pablo Vazquez
4bc240696e VSE: Update Video Editing App Template
Minor update to the Video Editing app template.

The main motivation is to better expose Sync Scene Time which sits in
the footer. This could be done via versioning code, but the existing
Timeline gets on the way and it's not easy to remove via code.

A few other small changes were made without affecting the current
functionality.

The changes are:
1. Show Sequencer footer.
2. Remove Timeline editor.
3. Properties: Hide irrelevant tabs, leave only Render, Output, Scene.
4. Rename Scene to Edit.
5. Rendering: Make `Image` tab active so users can see render slots,
  instead of the less useful `Tool` tab.
6. Rendering: Hide irrelevant tabs, leave only Render, Output, Scene.
7. Save.

See PR for details and screencaptures.

Pull Request: https://projects.blender.org/blender/blender/pulls/145802
2025-09-10 00:09:35 +02:00
Jacques Lucke
32c301e3cf Shader Nodes: support repeat zones, closures and bundles
This adds a function that can turn an existing `bNodeTree` into an inlined one.
The new node tree has all node groups, repeat zones, closures and bundles
inlined. So it's just a flat tree that ideally can be consumed easily by render
engines. As part of the process, it also does constant folding.

The goal is to support more advanced features from geometry nodes (repeat zones,
etc.) in shader nodes which the evaluator is more limited because it has to be
able to run on the GPU. Creating an inlined `bNodeTree` is likely the most
direct way to get but may also be limiting in the future. Since this is a fairly
local change, it's likely still worth it to support these features in all render
engines without having to make their evaluators significantly more complex.

Some limitations apply here that do not apply in Geometry Nodes. For example,
the iterations count in a repeat zone has to be a constant after constant
folding.

There is also a `Test Inlining Shader Nodes` operator that creates the inlined
tree and creates a group node for it. This is just for testing purposes.

#145811 will make this functionality available to the Python API as well so that
external renderers can use it too.
2025-09-09 16:15:43 +02:00
Falk David
8dcd01907d VSE: UI: New strip modifier "Add" menu
This replaces the "Add modifier" type enum UI with a menu,
similar to the object modifiers "Add modifier" menu.

The "Copy to Selected Strips" operator was a bit out of place
and already exists in the "Strip" menu.
Togther with the "Add" menu, these are now moved into a
"Modifiers" submenu, similar to the "Objects" > "Modifiers" menu.

Also updated for the strip context menu (right-click).

Pull Request: https://projects.blender.org/blender/blender/pulls/145981
2025-09-09 16:00:50 +02:00
Damien Picard
3611b8a592 Fix: Operator cheatsheet error due to property items not available
When collecting operators for the operator cheatsheet (Help menu),
`node.interface_item_new` gave an error because its property
`active_item` could not gather items. This happened because `context`
was unavailable to its `get_items` method at that time.

This commit refactors the method to return early in case the context is not
found.

Pull Request: https://projects.blender.org/blender/blender/pulls/145930
2025-09-09 12:05:20 +02:00
Pratik Borhade
4a4bf82de0 UI: Shape key properties in Dopesheet
Similar to Grease Pencil layer, include shape key properties in side
panel of dopesheet for ease of access.

See images in PR description

Pull Request: https://projects.blender.org/blender/blender/pulls/143033
2025-09-09 11:38:19 +02:00
Eitan Traurig
919acbbf7f Refactor: Convert Copy Mirror UV Coordinates operator from Python to C++
Migrate Copy Mirror UV Coordinates operator to C++. The ID has changed
from `mesh.faces_mirror_uv` to `uv.copy_mirrored_faces`

Ref !145531
2025-09-09 13:03:48 +10:00
Eitan Traurig
f7f4c154b6 UV: arrange and align selected UV islands
Arranges selected Islands along a selected Axis.
Islands can be aligned to center/left/right/top/bottom.

Initial Implementation of #78408

Ref !139658

Co-authored-by: Campbell Barton <campbell@blender.org>
2025-09-09 12:32:20 +10:00
Sean Kim
635f42c023 Fix: 'Reset Curve' on brush falloff curve applies incorrect default
Introduced in f4e670af2c

The `use_negative_slope` parameter was effectively ignored when `brush`
was also passed in as a parameter, always defaulting to a positive
slope (ascending from left to right).

Additionally, the `use_negative_slope` property was incorrectly
specified for many properties: In general, most brush properties have
positive slope as they correspond to a pressure value being modulated.

This commit fixes the behavior and updates the corresponding
properties so they continue to work.

Pull Request: https://projects.blender.org/blender/blender/pulls/145823
2025-09-09 04:00:03 +02:00
Sybren A. Stüvel
d1962be44c Anim: remove deprecated SpaceAction::action pointer
Other code that needs to operate on "the Action that's shown in the
Dope Sheet" now accesses the newly-added
`bAnimContext::active_action`, which is now also used by
`context.active_action`. I've also added
`bAnimContext::active_action_user` in case the ID that is animated by
this Action is needed. That's either the active `Object` or the active
`Key`, again depending on the mode of the Dope Sheet editor.

The active Action can also be obtained via
`ANIM_active_action_from_area(scene, view_layer, area)`. This is a
faster method than the usual `ANIM_animdata_get_context(C, &ac)` and
it doesn't need the entire `bContext`.

The "Stash Action" and "Push Down Action" to the NLA were also
implemented by writing to `SpaceAction::action` via RNA. They now use
`ANIM_animdata_get_context()` to get the active action owner ID, and a
direct call to `blender::animrig::assign_action()` instead.

The remaining use of `SpaceAction::action` was for display &
manipulation of Scene/Action markers. This required some work to get
addressed, as there was quite a bit of spaghetti and duplicate logic
to churn through. More can be improved there, but I had to limit the
time I spent on this.

Python code that was still using `context.space_data.action` to find
the currently-showing Action has been migrated to
`context.active_action`.

Related: #119626
Pull Request: https://projects.blender.org/blender/blender/pulls/145672
2025-09-08 18:12:18 +02:00
Pratik Borhade
08cf64315d Cleanup: Grease Pencil: Remove legacy UI code
Remove stale legacy python UI code, not used anymore by new grease
pencil structure.

Pull Request: https://projects.blender.org/blender/blender/pulls/135507
2025-09-08 11:52:00 +02:00
Casey Bianco-Davis
cbdf12d2a9 Curves: Pen Tool
This PR adds the `Pen Tool` to `Curves` objects.
The logic and keybinds are shared with the Grease Pencil `Pen Tool`

Unlike the legacy pen tool, this version can works with multiple objects.

Note: Some changes have been made from the legacy curve object's pen tool.
A list of changes can be found at #142646

Pull Request: https://projects.blender.org/blender/blender/pulls/144833
2025-09-07 16:29:07 +02:00
Damien Picard
f2b61b0874 UI: Fix and improve a few messages
- "grease pencil" -> "Grease Pencil": title case.
- "Display type" -> "Display Type": title case for property name.
- "Bezier" -> "Bézier": proper noun.
- "Mem:%dM, Peak %dM" -> "Mem:%dM, Peak: %dM": missing colon.
- "cannot save image while rendering" -> "Cannot": Sentence case.
- "Linked data cannot text-space transform" -> "Cannot create
  transform on linked data": rephrase strange sentence.
- "Unsupported object type for text-space transform" -> "... for
  texture space transform": unnecessary abbreviation.
- "Cannot write to asset %s:  %s": remove double space.
- "Failed to set tmpact" -> "temporary action": unclear abbreviation.
- "luminance at which the midetones of the image" -> "midtones: typo.
- "Line angle where the image should be split." -> trailing full stop.
- "... instances all the children in the collection" -> "... instances
  of all the children...": missing "of".
- "Curves to generated rounded corners on" -> "generate": typo.
- "Instances that converted to a point per instance" -> "Instances to
  convert to points": rephrase unclear sentence.
- "Great Pencil to set the depth order of" -> "Grease Pencil": typo.
- "Description to set the smoothness of" -> "Geometry to set the
  smoothness of": typo.
- "A cannot use current file as library" -> "cannot use...": typo.

Pull Request: https://projects.blender.org/blender/blender/pulls/145840
2025-09-07 00:26:31 +02:00