Commit Graph

154646 Commits

Author SHA1 Message Date
Richard Antalik
7b7b5a5fcd Fix: Crash when prefetching scene strip
Fix done in 7805a4bfe1 introduced another crash - null dereference when
accessing `strip->scene`.

Also the mentioned fix was not quite correct, because it used incorrect
scene and timeline frame to get rendered strips.

Pull Request: https://projects.blender.org/blender/blender/pulls/147595
2025-10-08 08:53:26 +02:00
Campbell Barton
bd8fc0807c UV: update align, randomize & follow active quads for recent API changes
Recent changes to UV selection missed updating this operator.
2025-10-08 17:45:52 +11:00
Nick Alberelli
0d9ea9d11c PyAPI: add Context.temp_override documentation & examples
Add a new section to the `Context` page that includes an explanation
on how to invoke "on demand" logging for context member access.

Design task: #144746
Logging added in: !144810

Ref !146862
2025-10-08 16:08:09 +11:00
Campbell Barton
f222916c38 Cleanup: simplify BM_attribute_stored_in_bmesh_builtin 2025-10-08 15:39:26 +11:00
Campbell Barton
99ed1bd46b Cleanup: use doxygen style comments for doc-strings 2025-10-08 15:19:01 +11:00
Campbell Barton
f4308aa2d0 UV: remove per-UV-map selection data
Replace per UV map selection with a single UV selection for all UV's.
This uses the same data as UV sync select, meaning that it's no longer
possible to keep a different selection when sync-select is disabled.

There is a minor improvement to functionality - previously not possible
to de-select a single face surrounding by selected faces.
Now this is possible because true face selection is supported.

The selection from the active UV-map is converted to use the shared
selection data.

Ref !147523

Co-authored-by: Hans Goudey <hans@blender.org>
2025-10-08 15:05:20 +11:00
Campbell Barton
377e3cfca5 Cleanup: use a define for BMUVOffsets that doesn't reference any layers
Reduce the number of places that need to be updated when struct members
change and reduces the binary size a little.
2025-10-08 14:56:43 +11:00
Campbell Barton
37382b7c39 UV: track select sticky & sync options with edit-mesh undo
Since recent UV selection changes (!138197), the meshes UV selection
is closely tied to the scenes selection options.

Track these settings with edit-mesh undo, to prevent undoing into a
state where the selection doesn't match the previous state.

Ref !147591
2025-10-08 13:44:08 +11:00
Richard Antalik
7805a4bfe1 Fix #147477: Crash when prefetching scene strip
Check if 3D render would be done by recursing also into sequencer
timeline used by scene strips.

This PR removes check if the scene strip is cached. This was used to
allow rendering from disk cache, but it was removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/147511
2025-10-08 04:41:33 +02:00
Richard Antalik
01a70ae58f Fix #146682: Swap data operator breaks effect strips
Caused by not invalidating lookup cache, which is used for tracking
relations between effects and inputs.

Pull Request: https://projects.blender.org/blender/blender/pulls/147509
2025-10-08 04:39:50 +02:00
Campbell Barton
5d671a4ade Cleanup: correct typos & clarify doc-strings for GHOST/Wayland 2025-10-08 13:30:11 +11:00
Campbell Barton
a6a8fc9619 Fix: crash creating a BMesh when some UV selection layers are missing
Error in !138197, while all UV selection layers should exist,
don't crash if some are missing.
2025-10-08 11:20:31 +11:00
Harley Acheson
0155ad92a4 UI: Decrease Edge Icons Color Saturation
The new colorful edge icons are considered a bit too bright and
distracting in the menus. This PR just tones them down a bit by
changing the layer opacities.

Pull Request: https://projects.blender.org/blender/blender/pulls/147567
2025-10-08 02:01:43 +02:00
Campbell Barton
0fcbae8c00 Cleanup: spelling, duplicate terms (check_spelling_*)
Also add colon after argument params.
2025-10-07 23:55:12 +00:00
Campbell Barton
68d280fc36 Build: unbreak building with GCC 15.2 2025-10-08 10:55:06 +11:00
Jesse Yurkovich
60325c7a9c Fix #147465: Distribute Points in Volume node has inaccurate offset
Account for recent changes in how volumes are offset from
blender/blender@12f0bc7736

Pull Request: https://projects.blender.org/blender/blender/pulls/147495
2025-10-07 20:38:23 +02:00
Jesse Yurkovich
8a99ab4463 Fix #145919: Enable BKE_reports to be seen when file is loaded from CLI
There were two issues conspiring to prevent most BKE_reports from
surfacing when loading a file from the command line.

The first is that the "print_level" was left initialized to only
RPT_ERROR which prevents this particular warning from being traced to
the console.

The second is that, in order for us to display reports in the
notification area, we need to give the reports to the window manager.
This is typically all wired up during normal operator execution, but not
when just starting up from the command line.

Pull Request: https://projects.blender.org/blender/blender/pulls/147251
2025-10-07 20:37:15 +02:00
Christoph Lendenfeld
a09d0cfd8c Anim: Move pose bone selection state to bPoseChannel
Move the selection flag for pose bones, from the (edit)bone to the
pose bone.

Previously having multiple instances of armatures in pose mode at the
same time caused issues because selecting a pose bone on one armature
would automatically select it on all instances of it.

This is now fixed since the selection state is stored on the pose bone
(Object level) Doing so breaks API compatibility with 4.5 since the
RNA property on the Bone no longer affects the pose bone. Instead,
there is a new property on the pose bone for that.

Due to this change, some runtime flags for the transform system also
had to be moved to the pose bone. This is due to the fact that these
flags are used by the transform system to pass information between
functions. If we keep the flag at the bone level, this wouldn't work
with armature instances. See `bPoseChannelRuntimeFlag`

Fixes #117892

Pull Request: https://projects.blender.org/blender/blender/pulls/146102
2025-10-07 19:59:36 +02:00
Bastien Montagne
37a676212c Fix: Some undo crashes related to packed data.
The owner library could keep invalid references to removed archive
libraries after undo.

This should fix the immediate issues reported as #147236, #147095 and #147036.

There is still a known crash, although it is harder to reproduce reliably
from the UI, so it will be handled separately. It is tracked by #147317.
2025-10-07 19:48:39 +02:00
Sean Kim
5e6c3e720d BKE: CurveMap: Update more curve presets
Similar to 9b5f23c7a3

This commit updates the remaining three non-trivial preset curve types:
* CURVE_PRESET_ROUND - approximating `sqrtf(2x - x^2)`
* CURVE_PRESET_ROOT - approximating `sqrtf(x)`
* CURVE_PRESET_SHARP - approximating x^2

Like in the above commit, this change only affects the defined presets,
but does not change any existing curves in any files.

Related to #145208

Pull Request: https://projects.blender.org/blender/blender/pulls/147012
2025-10-07 19:47:42 +02:00
Jonas Holzman
043d9e77b0 UI: Slightly shorten 3D cursor colored axis tips
This commit slightly shorten the new 3D cursor colored axis tips,
allowing for a larger part of the dark part of the axis to show,
improving readability. Discussed during the last UI meeting.

Pull Request: https://projects.blender.org/blender/blender/pulls/147563
2025-10-07 19:44:12 +02:00
Jacques Lucke
a73b7f883d Fix #147556: missing volume grid output when accessing subframe of bake
The code attempted to mix the grids as single values. In theory, we could
attempt interpolating between grids, but that can be done separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/147557
2025-10-07 18:45:40 +02:00
Brady Johnston
7921e8a5b1 Geometry Nodes: Change order of sockets for Set Grid Transform
Changes the order of sockets for the Set Grid Transform node.

No other node in GN has a blank gap in the input sockets, this PR moves the `Is Valid`
output above the grids to remove the gap.

Pull Request: https://projects.blender.org/blender/blender/pulls/147380
2025-10-07 18:44:43 +02:00
Demeter Dzadik
f5428c51e0 Rigify: Full Action Slot Support in Blender 5.0
This commit tries to make the bare minimum changes to add a meaningful
level of support for Action Slots in Rigify:

- You can now select an Action Slot in each Action Set-up, and that
  will be assigned to the generated Action Constraints.
- For this to be meaningful, we have to support selecting the same
  Action in multiple Action Set-ups, which would previously throw an
  error.
- For that to be possible however, it was necessary to make the
  trigger selectors of Corrective Action Set-ups select one of the
  other set-ups directly, rather than selecting an Action (datablock),
  and then making an association to one of the action set-ups based on
  that action pointer. (The necessity to allow users to point at
  another action set-up was the reason behind not allowing user to use
  the same action datablock multiple times.)

Pull Request: https://projects.blender.org/blender/blender/pulls/146182
2025-10-07 18:37:44 +02:00
John Kiril Swenson
76c03744a8 VSE: Add render options for sequencer scene and active scene
Addresses #146305.

Ever since moving to the "sequencer scene" paradigm, attempting to
render an image or animation when a sequencer with strips is present
often seems to outright ignore the sequencer in most cases. This is
because the sequencer scene usually differs from the active scene (which
is the true render target), so one must first switch their active scene
to the sequencer scene before rendering.  This is confusing and
seems like a regression in behavior. To improve clarity, this patch does
the following:

When a sequencer scene with at least one strip (and the sequencer step
enabled in the pipeline) exists in the current workspace, new options
"Render Sequencer Image" and "Render Sequencer Animation" appear.  These
options may be invoked by alt-F12 and ctrl-alt-F12, respectively.

Additionally, if such a valid sequencer scene is the same as the active
scene, then only the regular render options are listed, since in this
case they are identical to the sequencer render operators, meaning F12
still works predictably.

To switch back and forth between sequencer and main scene render
outputs, a new toggle has been added to the image editor to "Show
Sequencer Scene" output. This button only appears for the render result
if there is a valid sequencer scene that differs from the active scene.

Pull Request: https://projects.blender.org/blender/blender/pulls/146934
2025-10-07 18:12:08 +02:00
Falk David
0c18c1cfc2 Anim: VSE: Add overlay to visualize scene strip range when using scene syncing
This adds an overlay to the animation editors to visualize the current scene strip
in and out points in the scene timeline when the `Sync Scene Time` option in
the sequencer is used.

* Adds an overlay toggle + panel to the dopesheet.
* Adds a new theme setting (for the overlay) under
  `Common` > `Animation` > `Scene Strip Range`.
* Adds the overlay drawing to the dopesheet.

Pull Request: https://projects.blender.org/blender/blender/pulls/146165
2025-10-07 17:34:47 +02:00
Cartesian Caramel
b67dd35e1f Constraint: order Geometry Attribute alphabetically in menu
Reorder the constraint menu to correctly place the Geometry Attribute
constraint.

Pull Request: https://projects.blender.org/blender/blender/pulls/147552
2025-10-07 17:32:20 +02:00
Omar Emara
7d99ac26cc Fix #146886: Zero division in Distance Key node
Pull Request: https://projects.blender.org/blender/blender/pulls/147550
2025-10-07 17:22:36 +02:00
Omar Emara
a113121562 Compositor: Perform LGG Color Balance in linear space
This patch adjusts the LGG Color Balance mode to operate in linear space
as opposed to sRGB space, which is more inline with other software and
is more expected to the user.

Versioning was added using pre and post gamma correction, but it is
very slightly different in the blacks because the gamma node only does
power correction.

Pull Request: https://projects.blender.org/blender/blender/pulls/147533
2025-10-07 17:04:34 +02:00
Jacques Lucke
d343889930 Geometry Nodes: show single value in viewer node directly
This was originally developed for #144050 but was removed there because wanted to do another UI pass.

Pull Request: https://projects.blender.org/blender/blender/pulls/147525
2025-10-07 16:50:47 +02:00
Brady Johnston
56bb70fee8 Geometry Nodes: Advect Grid node
Given a grid of velocities, this node advects the values of the input
grid. Different options for integration scheme and clamping are
exposed. Currently their names are just as defined in OpenVDB.

Pull Request: https://projects.blender.org/blender/blender/pulls/147273
2025-10-07 16:19:19 +02:00
Lukas Tönne
abba67fd79 Fix #147283: Socket lookup by index fails when the node group is missing
The link-insert operator was doing index lookup for node socket declarations
based on the `bNodeSocket` index, which fails when the node group data block
is missing. The safe approach to this is to use the existing declarations and
look up the node socket from that.

Pull Request: https://projects.blender.org/blender/blender/pulls/147528
2025-10-07 16:18:34 +02:00
Bastien Montagne
a6cea64b3a Fix #147461: Implement packed data support for generic ID copy-paste.
Adding support for packed IDs in the PartialWriteContext was completely
missed in initial work...

This somewhat complexifies the handling of libraries in
PartialWriteContext, as packed IDs need to be handled in specific ways.

It also exposes `bke::library::ensure_archive_library` as a public function,
to avoid duplicating this complex logic of finding or creating a new
archive library for a given ID.

Finally, prevent attempts to copy a packed ID for now, as pasting them
is not supported (linking/appending these directly is not supported).

Pull Request: https://projects.blender.org/blender/blender/pulls/147468
2025-10-07 16:11:47 +02:00
Lukas Tönne
025c401dca Fix #144250: Crash when mantaflow solver does not converge and skips cleanup
Mantaflow likes to throw exceptions when things go wrong, which includes a
simple case of the solver not converging sufficiently. This should not be
catastrophic, but cleanup of buffers is omitted when such an exception occurs.
This then leads to yet another failure when the solver is stopped because of
incorrect buffer refcounts. That exception bubbles up through the python layer
and causes errors in the Blender integration wrapper that cause crashes.

Pull Request: https://projects.blender.org/blender/blender/pulls/147527
2025-10-07 15:49:07 +02:00
Jacques Lucke
5df3dd9768 Geometry Nodes: remove default geometry in bake node
This is sometimes annoying now, because sometimes one wants to bake stuff
without a geometry. Most notably, volume grids. It's still very easy to bake
geometries though. Link-drag-search from a geometry socket still adds the
geometry bake socket automatically.

Pull Request: https://projects.blender.org/blender/blender/pulls/147519
2025-10-07 15:35:59 +02:00
Miguel Pozo
610555dbe3 Fix #147340: EEVEE: Crash on failed world material compilation
- Check for failed World materials.
- Remove invalid links (unsure about this one).

(4.5 LTS backport candidate)

Pull Request: https://projects.blender.org/blender/blender/pulls/147445
2025-10-07 15:28:46 +02:00
Thomas Dinges
d71151df4c Fix license info for PThreads
Pull Request: https://projects.blender.org/blender/blender/pulls/147545
2025-10-07 15:23:34 +02:00
Cartesian Caramel
8f41d46d74 Constraint: Geometry Attribute
Add a new constraint called "Geometry Attribute", which directly
samples vector, quaternion, or 4x4 matrix attributes from geometry and
applies these to an object's or bone's transform.

This can be used to transfer data generated by geometry nodes to the
object or bone level. By default the constraint will sample a vector
on the vertex domain. The default attribute is `position` for
simplicity, but the attribute value does not have to have anything to
do with neither the transform of the geometry object nor the geometry
itself.

Pull Request: https://projects.blender.org/blender/blender/pulls/136477
2025-10-07 15:14:22 +02:00
Nick Alberelli
e2872c0bfe Core: de-duplicate bpy.context and context logging
Merges the existing `bpy.context` logging with the new `context` logging
added in [0]. In most cases `bpy.context` & `context` log the same thing.
Where the new `context` logging produces more accurate results.

Ref !146407

[0]: 439fe8a1a0
2025-10-07 23:45:16 +11:00
Iliya Katushenock
157e7e0351 Mesh: Propagate attributes in automatic edge calculation
Support propagation of attributes from the original mesh edges when
generating mesh edges. This implies both deduplication of original edges
and creation of new edges needed for faces. While original edges are not
propagated, attributes are still propagated if an edge was part of any
face. To make original edges distinct we simply choose the first one to
be a value source.

One important part of this patch is definition of invariant of the
mesh on input:
1. All edges must be valid (their vertices must be correct). The
   algorithm only deal with duplicate and implicit edges.
2. There is no way to provide info about corner edges attribute (whether
   it'svalid or not). If all input edges are valid and there are no new
   edges then we could skip re-generation of already valid corner edge
   indices. But for now we always do.

The new implementation depends on input mesh invariant so this drops an
old patch to fix hard crash related with duplicate edge vertices. New
code will crash independently to such patch. Hopefully there must be
no problems after #138633.

The changes don't affect performance much. If anything, in some cases
the edge calculation can become a few percent faster. See the PR for
more performance testing details.

Pull Request: https://projects.blender.org/blender/blender/pulls/132492
2025-10-07 14:36:15 +02:00
Habib Gahbiche
7e38ffe508 Assets: Compositor: Add tag color
Use colors for assets instead of the default one.

See PR for example images.

Pull Request: https://projects.blender.org/blender/blender/pulls/147458
2025-10-07 14:26:07 +02:00
Campbell Barton
3b980419dd Fix: out of bounds write when reading color
Resolve regression in [0] which wrote into the 4th index of a float[3].

[0]: b9e1e2a8ee
2025-10-07 23:11:18 +11:00
Aras Pranckevicius
8a74f7c0b0 VSE: Execute modifiers in strip-local space (#145688)
Currently when a strip has a transform that does not fill the whole
render area, first the image of the strip is transformed, and then
any modifiers are applied on that. This is mostly in the new
Compositor modifier, where procedural textures, gradients, image
coordinates "stick to the screen" instead of following the transformed
strip.

This changes the behavior so that first the modifiers are applied
to the strip image, and then the strip is transformed. This is
potentially a visually breaking change:
- This can alter visual look of existing strip, especially if they are
  scaled. Previous behavior was first scale filtering, then modifier;
  now it is first modifier, then scale filtering.
- Most obvious change is Compositor modifier (which is new in 5.0).
- Compositor modifier can actually expand the input image (e.g. Blur
  node with "expand bounds" option set), and that works.
- Note that Masks continue to be applied in global/screen space. There
  can be small look differences with rotated/scaled strips that use
  masks, due to Mask application now needing to do filtered mask image
  lookups.
- If anyone needs previous behavior (modifier is applied on the
  "whole screen"), they can put transformed strip into a meta strip,
  and apply the modifier on the meta strip itself.

Compositor modifier examples with images in the PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/146181
2025-10-07 13:51:41 +02:00
Nika Kutsniashvili
f145e1f7e2 Anim: Time jump operator
Adds a new operator that jumps time by a given number of frames or seconds, forward or backward.
Surprisingly, it was lacking in Blender, and prompted many users (including me) to create extensions.

This PR adds two properties: `time_jump_unit` for choosing whether to jump by frames or seconds
and `time_jump_delta` property that defines by how many frames or seconds the operator should jump,
as well as an actual operator that changes the current frame (`screen.time_jump`).

`time_jump_delta` is a float that gives users the ability to jump by half a second, for example, or by subframes.
Default is set to 1 second, which translates to as many frames jump as frame rate / frame base.
The operator is intentionally not bound by frame range, and can go in negative frames as well.
This is very important because it's extremely common to set frame range to the current workload,
but wish to see animation beyond that.

Operators are added in the new footer for animation editors alongside with pop-up menu where
properties can be changed.

Shortcuts are also added: Ctrl+Left/Right Arrow, which was surprisingly free in Blender.
Now timeline controls are:
- **Right Arrow**: Next Frame
- **Ctrl + Right Arrow**: Jump Forward (by default also Next Second)
- **Shift + Right Arrow**: Jump to End

Pull Request: https://projects.blender.org/blender/blender/pulls/140677
2025-10-07 13:43:20 +02:00
Campbell Barton
7c52aa1250 Fix #147530: Proportional factor from transform may exceed 1.0
The factor for transform data must be in the 0..1 range however
float imprecision could cause values above 1.0 to be set.

Resolve by clamping.
2025-10-07 22:40:34 +11:00
Christoph Lendenfeld
5eafc97198 Fix #146242: Crash when aligning bones of different armatures
When trying to align bones of 2 different armatures, with different mirror settings
it would crash.
The reason it crashed is that a pointer was not set to anything.
The whole function is not set up to do multi object editing and assumes that all bones gotten
from `selected_editable_bones` are part of the same armature. This is explained by the
comment above that explains that any unselected bones returned from this function are
assumed to be the mirrored bones.

Pull Request: https://projects.blender.org/blender/blender/pulls/147521
2025-10-07 13:39:09 +02:00
Pablo Vazquez
14cf38a49e UI: Remove Tutorials from Help menu
As mentioned in !146730, blender.org does not provide a list of
tutorials anymore, instead, the "Support" section has links to user
communities, enterprise support, and mentions tutorials as part of
a community activity.

Also add "Get Involved", which is a hub for inviting contributors in
all areas.

Pull Request: https://projects.blender.org/blender/blender/pulls/147414
2025-10-07 13:10:39 +02:00
Pablo Vazquez
b9e1e2a8ee UI: 3D Cursor style and contrast adjustments
Recent changes made the 3D Cursor hard to see in some situations,
according to user feedback.

Roll-back most changes to bring back the old style and improve
readability and contrast.

* Keep the same size as the old cursor.
* Keep the crosshair inside the circle.
* Use red-white for the circle as before.

See PR for details and screenshots.

Pull Request: https://projects.blender.org/blender/blender/pulls/147404
2025-10-07 12:56:37 +02:00
Bastien Montagne
854db34385 Fix (unreported) RNA_pointer_is_null returning true on no-ID pointers.
This behavior seems to have been there since initial implementation of
this function in aed1320b24, 8 years ago.

However, it is clearly wrong, and would return wrong positives in many
cases (the Main RNA pointer itself is generated with a nullptr ID by
`RNA_main_pointer_create`, and a _lot_ of code generates RNA pointers
without any ID owner, as shown by a search e.g. on
`RNA_pointer_create_discrete(nullptr`).

WARNING: While logically correct, there is no real way to tell if this
change is not going to break some weird corner case based on wrong
assumption. in addition to unittests, this has also been checked against
several production files.
2025-10-07 12:37:18 +02:00
Bastien Montagne
20a65fd7f4 Fix #147469: Hard Crash when Modifying Addon Keymaps.
Indirectly caused by ada45519a7, the actual issue has been there for
years in the PointerRNA diffing code, which was way too basic and unsafe
in non-liboverride case.

Also fixed a copy/paste assert mistake in related code (same thing was
checked twice, instead of also checking another condition).

Finally, make the more general `RNA_struct_equals` call handle properly
cases where one or both of the given PointerRNA operands are Null ones.
2025-10-07 12:37:18 +02:00