Commit Graph

150877 Commits

Author SHA1 Message Date
Sybren A. Stüvel
d08c4e8cc9 Fix: Overlay: Invalid RGB order in overlay theme colors
Fix an accidental swap of the green & blue channel when drawing theme-
colored elements in the overlay engine.

Thanks @fclem for finding the issue.

Pull Request: https://projects.blender.org/blender/blender/pulls/141382
2025-07-03 11:57:33 +02:00
Pratik Borhade
fa1f9226d7 Fix #140845: Outliner: Allow reordering linked collections
Drag-drop operation of outliner doesn't allow dragging linked collection
ID. Poll function returns false for non-editable IDs. This make
sense if drop target is `INTO` linked collection.To fix this, support
drag-drop operation for `before/after` case and return false when
insert type is `TE_INSERT_INTO`.

Pull Request: https://projects.blender.org/blender/blender/pulls/140848
2025-07-03 11:26:53 +02:00
Thomas Dinges
c94d5340b6 Cleanup: Make format 2025-07-03 11:14:58 +02:00
Andrej730
1a9e90e965 PyDoc: bpy_struct, add missing types and more explicit signatures
- `bpy_struct.id_data` - provide a type.
- `bpy_struct` - add missing return types to
  `bpy_struct.get`, `bpy_struct.pop`, `bpy_struct.path_resolve`.
- `bpy_struct` - add missing argument types to some methods.
- `bpy_struct` - provide explicit `/` and `*` in signatures to make it
  clear which arguments are positional / keyword-only.

Ref !141334
2025-07-03 18:25:09 +10:00
Campbell Barton
4127f5c47c Extensions: suppress errors printed because of missing directories
When dropping an extension onto Blender, the URL lookup would print
errors to the STDOUT if a repository directory was missing.

While this didn't break installation, these kinds of errors should
only be shown when the directory is expected to exist.

The issue was raised in #141212.
2025-07-03 18:21:16 +10:00
Campbell Barton
6f954e5c1a Extensions: strip the "www." prefix when creating repository names
Exclude this prefix as it's not useful to include in the name.
The issue was raised in #141212.
2025-07-03 18:21:16 +10:00
Campbell Barton
e0d2a0bc1a Fix URL's in extension errors accessing remote data
The base URL was used when reporting errors accessing a URL,
use the full URL being accessed instead since anything else
is misleading, the full URL is needed to troubleshoot issues.
2025-07-03 18:21:16 +10:00
Jeroen Bakker
eeb2dc8a9e Fix #141305: Vulkan: Animation player memory leak
When playing back render result a separate process is started for
playback. This process didn't call the GPU_context_frame_begin/end
functions resulting in post-poning destroying discarded resources until
the playback process was 'exited'.

Pull Request: https://projects.blender.org/blender/blender/pulls/141376
2025-07-03 09:55:09 +02:00
Jeroen Bakker
5e17f5f41a Fix #141347: Assert in polybuild
Polybuild didn't select a point shaders when
drawing points.

Pull Request: https://projects.blender.org/blender/blender/pulls/141373
2025-07-03 09:54:45 +02:00
Jeroen Bakker
2d00580471 Fix #141274: Assert drawing debug drivers
Fixes an assert when drawing debug drivers. Here a poly shader was used
to draw points. This isn't valid and Vulkan backend warns developers
about it.

Pull Request: https://projects.blender.org/blender/blender/pulls/141372
2025-07-03 09:54:21 +02:00
YimingWu
95259228d9 Fix #140430: Nodes: Hide panel names when socket is shown on modifier UI
Previously, if a socket inside a panel has the same name prefix as the
panel name, the panel name will be removed from socket names when
displayed inside nodes, but this is not done when displaying them on the
modifier interface, which is too verbose visually. Now panel names are
removed from these property labels as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/140448
2025-07-03 08:58:34 +02:00
Campbell Barton
b50a525076 Fix #141336: Modeling: Don't assume gizmo available in polybuild tool
Check the polybuild gizmo is drawn before using it,
also account for it being empty (the cause of the crash), although this
shouldn't happen in practice.
2025-07-03 14:50:23 +10:00
YimingWu
abbd4eb9b8 Fix (unreported): Prevent crash when duplicating linked collections
If any of the selected collection entries in the outliner is a linked
collection, `outliner_collection_from_tree_element` can return null and
it will crash in `BKE_collection_child_find`. This patch handles this
case by skipping those entries and modified the warning message to show
how many selected entries have failed.

----

This is how the message looks like now:

<img width="746" alt="image.png" src="attachments/b91f2a64-7f2d-42d4-8657-7deaf00e90b6">

Pull Request: https://projects.blender.org/blender/blender/pulls/140847
2025-07-03 09:53:13 +08:00
Andrej730
b06bf220b9 Fix: PyDocs - add missing Context.copy() return type
Ref !141359
2025-07-03 10:15:32 +10:00
Jonas Holzman
b0ffd4cb07 Fix: macOS: Support multi-monitor window positioning
This commit brings multi-monitor window positioning support to the macOS
GHOST backend. This fixes a plethora of issues with macOS window
creation and positioning, such as:

 * Windows not being properly restored when loading a file with Load UI
 * Users default startup windows not being properly restored on multiple
   screens
 * Temporary windows (Settings, Render, Playblast, etc..) wrongly
   appearing in unexpected places / other screens
 * Duplicating an area into a new window (AKA popping out an editor) not
   working on non-primary screens.
 * etc..

Internally, this makes all macOS windows coordinates be relative to the
user primary monitor, instead of being local to the currently focused
one. I have tested this to properly work using all sorts of multiple
screen arrangements, and can also confirm that restoring windows from
screens that do not exist anymore / are now out of bounds (due to being
unplugged or re-arranged) also works properly, in which case they get
snapped back to the closest available screen similarly to other backends.

This fixes issue #126410 and implements behavior described in TODO task #69819.

Pull Request: https://projects.blender.org/blender/blender/pulls/141159
2025-07-03 00:05:52 +02:00
Clément Foucault
bdad5325a7 Fix #141112: Plane Probe is cut off in camera view if Shift X/Y in certain way
Previous fix 531bc5ca69 broke the tracing part of planar
probe. This is because the code was relying on assumption that
are no longer true. Fix this by passing the correct
projection matrix and inverse proj mat to the tracing code.

Pull Request: https://projects.blender.org/blender/blender/pulls/141349
2025-07-02 17:46:45 +02:00
Jacques Lucke
ebf9449518 Fix #141070: missing viewport update after disabling viewer
Pull Request: https://projects.blender.org/blender/blender/pulls/141320
2025-07-02 17:32:37 +02:00
Falk David
92d72467a7 Fix #141222: Assert hit when resizing CurvesGeometry to 0
The `CurvesGeometry::resize` function would not work properly when
passing a new size of zero.
1) The `CustomData_realloc` would allocate an array with zero size.
2) A new size of 1 is passed to `implicit_sharing::resize_trivial_array`
   for the curve offsets when it should pass 0.
3) A value is written out-of-bounds to `curve_offsets`

This fixes the issues in the following ways:
1) `CustomData_realloc` now doesn't allocate any data when the new
    size is 0 and sets the `layer->data` to `nullptr`.
2) When the new number of curves is 0, resize the `curve_offsets` to 0
  not to 1. This also ensures that the data pointer is `nullptr`.
3) Make sure to only write the first and last curve offset when the
  number of curves is greater than 0.

Pull Request: https://projects.blender.org/blender/blender/pulls/141333
2025-07-02 17:16:50 +02:00
Hans Goudey
37a8e5c06a Fix: "Layer" shows as mesh attribute domain option
Use a more consistent pattern to filter domains that aren't
supported for each geometry type.
2025-07-02 10:54:00 -04:00
Falk David
dd16e5f96d Fix #94253: Grease Pencil: Transparency yellow color shift in viewport
In the viewport, semi-transparent strokes could appear more yellowish.

This was because the `reveal_tx` uses the `GPU_R11F_G11F_B10F` format
(loosing precision in the blue channel).

Now using `GPU_RGB10_A2` for `reveal_tx` to fix the issue.
We don't need to change the format for the `color_tx`.

Pull Request: https://projects.blender.org/blender/blender/pulls/141335
2025-07-02 14:50:59 +02:00
Falk David
4990edd94d Fix #136560: Grease Pencil: Alpha issue with "multiply" layer blending
The alpha channel wasn't properly handled when using "multiply" layer
blending.

The formula in `blend_mode_output` for `MODE_MULTIPLY` was first
multiplying the `color.a` by `opacity`, storing the result back into
`color` but then multiplying by `color.a` again.

Instead, multiply `color.a` and `color` by the `opacity` separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/141337
2025-07-02 14:50:24 +02:00
Guillermo Venegas
d83610e701 Fix #129232: Regression in drag toggle keyframe with upward motion
While drag toggle decorators, the button where drag started
still is active, so it can conflict with the button to add/remove
keyframe while dragging upward.

Use `UI_BUT_ACTIVE_OVERRIDE` flag since it has precedence in
`ui_context_button_active`.

Last tested to work in 2.83.

Ref !141317
2025-07-02 21:54:24 +10:00
Sebastian Parborg
48b5906cba Fix #141111: Time remapping should not affect the audio playback
We do not do any audio time stretching when doing time remapping.
As we also use the audio to keep track of time passed, we should always
pass the actual timestamp we are starting playback from.

The issue was that the old logic would try to undo time remapping on cfra.
However cfra is already correct and is not remapped. I'm guessing that
this changed at some point and we forgot to fix it up in the sound code.

Pull Request: https://projects.blender.org/blender/blender/pulls/141288
2025-07-02 13:44:51 +02:00
Bastien Montagne
78d78223b8 Fix #139715: Issue when duplicating Scene/Collection/Object with objects in EditMode.
Detection of whether an object is in Edit mode can rely on checking its
obdata ID status (for meshes e.g.), which will falsly make remapping
code think it is remapping the obdata of an edited object.

Somewhat work around the issue by forcing such remapping for the time
being. On the long run, check should be updated to only rely on the
Object's status.
2025-07-02 12:24:54 +02:00
Campbell Barton
8ce2756b18 Fix brush toggle not working when using tools with multiple scenes
Follow up to #140668 that fixes the same issue when using multiple
windows & scenes. This is needed as the active tool can apply to
multiple scenes.

Ref !141260
2025-07-02 20:10:53 +10:00
Michael Jones
681eed7e4d Fix #135659: Some types of motion are incorrect at low step counts with MetalRT
Following #136253, this PR enables decomposed MetalRT motion
interpolation on macOS 15.6. The bounding box issue is fixed
in the latest macOS 15.6 beta (24G5054d).

Pull Request: https://projects.blender.org/blender/blender/pulls/141207
2025-07-02 10:41:42 +02:00
Aras Pranckevicius
21870da9e2 Fix #141282: VSE cache issues when rendering at reduced resolution scale
If render settings resolution scale had lowered resolution, cached
images from render image/animation session could "stay around"
and be incorrectly used in the VSE preview area. Two cases I found are
fixed here:
- Intra-frame cache was not flushed upon actual final resolution
  change,
- "Source images" for effect/scene strips were not removed when
  requested resolution no longer matches their rendered resolution.

Pull Request: https://projects.blender.org/blender/blender/pulls/141297
2025-07-02 09:58:11 +02:00
Jacques Lucke
0596c7f119 Fix: crash using tab in attribute search
The crash happens when hitting tab while using attribute search in the Geometry
Nodes modifier. This triggers some auto-completion code (which doesn't work here
currently, but that's potentially a separate problem). However, the
auto-completion code did not handle the case when the string that's
auto-completed does not have a maximum length, i.e. it is dynamic.

This patch adds some handling for the case when the auto-completed string
storage has a dynamic size.

Pull Request: https://projects.blender.org/blender/blender/pulls/141200
2025-07-02 06:22:34 +02:00
Sean Kim
531bc5ca69 Fix: SubdivCCG uses 2x as much memory as needed for edge adjacency
On a Suzanne mesh with 125k faces subdivided at level 3, this patch
results in a 40MB savings of memory, from 1.24 GB measured in Blender
itself to 1.20 GB with this patch applied.

Pull Request: https://projects.blender.org/blender/blender/pulls/141167
2025-07-01 19:07:10 +02:00
Sean Kim
5b89f6d973 Tests: Add multires subdivision performance test
Add performance test for subdividing a multiresolution mesh from level
2 to 3. This test ends with a total fine vertex count of approximately
10m, similar to the stroke and BVH tests for multires.

Pull Request: https://projects.blender.org/blender/blender/pulls/141168
2025-07-01 18:40:21 +02:00
Christoph Lendenfeld
8da357f1ea Fix #140669: Graph Editor Gaussian smoothing causing artifacts for keys on subframes
This adds to the fix done with #110059.
With the changes of this patch, the smoothing still happens ONLY on full frames.
Any subframe data is linearly interpolated to reduce the stepping seen before this PR.

As a side effect, the operator now has to store the original y values of the keys in question.
This is needed for correct blending, whereas before it was assumed that the samples
contain the original y values.

No changes to the butterworth filter, because that already has a property to increase the
sample rate for sub-frame data.

Pull Request: https://projects.blender.org/blender/blender/pulls/140928
2025-07-01 16:02:49 +02:00
Falk David
cac2806ee2 Fix: Grease Pencil: Use correct "aspect_ratio" in draw tool
The `aspect_ratio` was defaulting to 0 when drawing. Now use the correct
brush setting values. This also ensures that the default is 1.
2025-07-01 15:33:01 +02:00
Miguel Pozo
e2b898fea7 Fix #141132: Crash on background GP render
The crash seems to come from libepoxy GL functions pointing to null.
It seems that libepoxy "Automatically initializes as new GL functions are used."
and that to call a function without a GL context bound, the function
must have been called before with a bound context.

This just modifies the scope of the context binding from
DRW_module_exit to  RE_engines_exit, which seems the safest solution
for 4.5.

Pull Request: https://projects.blender.org/blender/blender/pulls/141233
2025-07-01 15:24:45 +02:00
Thomas Dinges
61d51a5643 Cleanup: Make format 2025-07-01 15:14:37 +02:00
Christoph Lendenfeld
3233ddc3b3 Fix #141243: Crash when removing constraints with drivers via python
The issue was that the depsgraph was not rebuilt, thus
the driver node still stuck around. This then crashed when the
depsgraph evaluated.

The reason why this wasn't caught in the unit tests, was because the
depsgraph was not updated between creating and removing the data.

Pull Request: https://projects.blender.org/blender/blender/pulls/141272
2025-07-01 14:28:27 +02:00
Michael Jones
03183c3328 Fix #135194: Deleting the last object in a scene leaves it visible in the viewport with MetalRT
TLAS wasn't being refreshed when empty.

This PR removes a spurious early-exit during BVH build that was preventing
the TLAS from being recreated when it was empty.

Pull Request: https://projects.blender.org/blender/blender/pulls/141215
2025-07-01 14:25:09 +02:00
Philipp Oeser
c261718085 Fix #141117: Sculpt mode edit voxel size stuck at certain values
It seemed "stuck" if the initial voxel size value under the remesh tab
was larger than or equal to the longer side of the bounding plane. It
actually was not stuck, but needed long mouse travels to get into the
range that we were clamping to (behavior from 4221f827cf clamps to
"sane" values on modal that make sense for differently sized meshes).

The "sane" sizes are kept, but this PR makes sure we actually start off
with an `init_voxel_size` that is already based on the clamped minimum/
maximum (so we dont have to mousetravel that far)

Pull Request: https://projects.blender.org/blender/blender/pulls/141208
2025-07-01 12:11:20 +02:00
Aras Pranckevicius
5cbb1c62c4 Fix #139552: VSE strips wrongly occlude others, when render resolution scale is small
get_strip_screen_quad function was not taking render scale into account,
unlike all other places that did a similar calculation.

Pull Request: https://projects.blender.org/blender/blender/pulls/141229
2025-07-01 10:49:10 +02:00
Damien Picard
301274f398 I18n: Translate user preferences GPU device tooltips
GPU devices can only be selected in the user preferences if a suitable
device is available. This uses a dynamic enum and the items are not
always defined in RNA, so they need to be extracted manually using
`n_()`.

Also rephrase one message slightly to respect the style guide
("Don't" -> "Do not").

In addition, fix my mistake where an import was mixed up
(`pgettext_tip` was imported as `n_`).

Pull Request: https://projects.blender.org/blender/blender/pulls/141244
2025-07-01 10:47:10 +02:00
Damien Picard
81fa28fa26 I18n: Translate two report messages needing manual translation
This call to `BKE_reportf()` uses a tertiary operator to select a
message using singular or plural, which cannot be translated
automatically. This commit adds `RPT_()` translation for both
variants.

Reported by Ye Gui in #43295.
2025-07-01 10:47:09 +02:00
Damien Picard
ac1f875a2f I18n: Translate Insert Unicode Character Cancel/Confirm Buttons
These buttons use `uiDefIconTextBut`(), which needs manual translation
for the label using `IFACE()`.

Reported by Ye Gui in #43295.
2025-07-01 10:47:09 +02:00
Damien Picard
860b632670 I18n: Translate "MB" (megabyte)
In some languages, MB uses a different symbol (Mo in French for
mégaoctet).

Reported by Ye Gui in #43295.
2025-07-01 10:47:09 +02:00
Damien Picard
0ba83d8958 I18n: Translate GN Add > Input > Import menu items
Geometry Nodes' Add > Input > Import menu includes file format items
such as "Standford PLY (.ply)", "STL (.stl)", "Text (.txt)". The
latter needs to be translated because "Text" is a generic format.

These items are declared using a custom function
`node_add_menu.add_node_type`, with a `label` argument. This commit
adds the `label` argument to the function arguments that can be
extracted from specific node declaration functions, and specifies the
argument position for each:

"add_node_type", "add_node_type_with_outputs", "add_simulation_zone",
"add_repeat_zone", "add_foreach_geometry_element_zone",
"add_closure_zone".

There is currently no facility to specify a translation context but it
could be easily added if the need arises.

Most of these functions do not actually declare new, unique messages,
but it could happen in the future. In addition, two messages were
extracted using manual `iface_()` calls, which are no longer needed
after this change.

Reported by Ye Gui in #43295.
2025-07-01 10:47:09 +02:00
Clément Foucault
1b499bdffb Fix #141112: EEVEE: Plane Probe is cut off in camera view if Shift X/Y
The projection matrix Y offset was not inverted properly to compensate
the view matrix Z axis flip.

Pull Request: https://projects.blender.org/blender/blender/pulls/141227
2025-07-01 10:06:56 +02:00
Aras Pranckevicius
ff5e9c66e7 Fix #141033: VSE proxies have inaccurate colors for YUV444 or full-range videos
When converting from say YUV444 to the YUV420 that proxies use,
ffmpeg libswscale was not being told of the full vs limited value
ranges as needed.

Pull Request: https://projects.blender.org/blender/blender/pulls/141241
2025-07-01 09:27:48 +02:00
Campbell Barton
cbfa328327 Fix: memory leaks in SVG & WEBP thumbnail loader on error 2025-07-01 16:32:55 +10:00
Jorn Visser
46f23bd066 Fix: memory leaks in OpenEXR thumbnail loader on error
Delete file and stream when the file is incomplete, and free ibuf when
an exception occurs.

Found while working on !139739.

Ref !139885
2025-07-01 16:32:55 +10:00
Sean Kim
c45727c9d0 Fix #141247: Assert while using sculpt filter tools
Introduced with 906a27bdb2

Pull Request: https://projects.blender.org/blender/blender/pulls/141248
2025-07-01 01:51:32 +02:00
Jesse Yurkovich
2a1ad5bf6c Fix: USD: Use correct ReportList if collection cannot be found for export
The `worker_status` hasn't been initialized yet because the job hasn't
started. Use the incoming `reports` list directly.

Pull Request: https://projects.blender.org/blender/blender/pulls/141242
2025-06-30 23:59:01 +02:00
Sean Kim
081aaa6c55 Fix #140668: Toggle brush support doesn't work with tool selection
Toggle support for brushes was added back in 4.5 with
9e1e9b0859. The intent of this feature is
to allow for easy switching between a specified brush upon using a
hotkey.

Whils this behavior works well in the case of switching between brushes,
the initial implementation didn't account for using other non-brush
tools.

To fix this issue, when activating a tool, if it doesn't handle brushes,
clear the last active brush.

Pull Request: https://projects.blender.org/blender/blender/pulls/141161
2025-06-30 23:01:10 +02:00