Commit Graph

150077 Commits

Author SHA1 Message Date
Pratik Borhade
8eb2a9ef02 Fix #136415: Regression: Color management settings can't be animated
Caused by 9855c11d2c
Pass correct values when scene idtype exists, otherwise
`RNA_path_from_ID_to_property` won't return valid path

Pull Request: https://projects.blender.org/blender/blender/pulls/136423
2025-03-25 10:15:59 +01:00
Philipp Oeser
caf8951a0c Fix #136317: Mantaflow moving Collision not detected
Caused by 024d7d12e2

To resolve ( similar to d0a89a0950 ), add missing dirty tagging for
the positions.

Pull Request: https://projects.blender.org/blender/blender/pulls/136443
2025-03-25 10:08:55 +01:00
Omar Emara
79743b68a8 UI: Use a red alert theme color for unsupported nodes
Undefined nodes are currently drawn using a red alert theme color to
make it easier to spot them and replace them. On the other hand, nodes
that are unsupported, that is, nodes whose poll method fail, are not
reported to the user in any way. So this patch also uses the same red
alert color for unsupported nodes.

The node_type_is_undefined function is moved to the draw file since it
seems to be specific to it and not used anywhere else.

Pull Request: https://projects.blender.org/blender/blender/pulls/136451
2025-03-25 09:25:17 +01:00
Omar Emara
577c46c081 Fix #136360: Crash in older versions for files from v4.5
Blender crashes in older versions when loading files saved from v4.5 and
contain nodes like Mix in the compositor. That's because those nodes do
not exist in older versions, that is, this is a forward compatibility
issue.

The compositor already has protections in place to not crash when
loading files from future versions containing new nodes. However, for
nodes like Mix which existed in other node trees, the node is not new,
it is just new to the compositor, so it goes undetected and the
compositor tries to execute it leading to a crash.

To fix this, we also check the poll method of the node when verifying
compositor node trees. This should be backported to the corrective
release, as well as LTSs. But for v4.5, a change will later follow to
make the compositor execute such undefined/unsupported nodes using a
default operation that initializes the output with default values.

Pull Request: https://projects.blender.org/blender/blender/pulls/136438
2025-03-25 09:15:04 +01:00
Lukas Tönne
93576e5832 Fix #136327: Deleting group node crashes when there are multiple outputs
The group output node is updated as part of the topology cache.
When there are multiple group output nodes the first one with an "active"
flag is picked. However, if no group output is flagged this will leave
the group output unchanged in the cache, even if that node has been deleted.

Always initialize the group output runtime cache to null to avoid invalid
pointers.

Pull Request: https://projects.blender.org/blender/blender/pulls/136436
2025-03-25 08:23:52 +01:00
Campbell Barton
debef6b78f Fix: NDOF HID mapping ignored on Unix
Changes in [0] caused NDOF support on Unix to ignore the `hid_map_`.

- Add updateButtonRAW which takes the RAW button values and maps them
  using `hid_map_` (what `updateButton` did before [0]).
- Keep the existing `updateButton` function using mapped events as
  updateButtonsBitmask & updateButtonsArray GHOST_NDOF_ButtonT ordered
  values.

[0]: c3d92f32dc
2025-03-25 06:36:52 +00:00
Alaska
573f182ff7 Release tools: Update the example for the bug fixes per release script for Blender 4.5
This commit updates the bug fixes per release script with small changes
to the readme.

- It removes the example script for Blender 4.4 as it's no longer
under development.
- It updates the example for Blender 4.5 to include the 4.4 backports task

Pull Request: https://projects.blender.org/blender/blender/pulls/136224
2025-03-25 07:09:08 +01:00
Alaska
b805980c20 Release tools: In bug fixes per release script, add a check for when a user puts the word "broken" in the working field
Occasionally users will fill out a bug report with the fields like:
```
Broken: A
Working: Also Broken in B
```

This can lead to bug fixes per release script classifying the report
incorrectly.

This commit adds a small check that sees if "broken" is in the working
field, and if it is, then avoid adding the versions in that working
field to the list of working versions used for classifcation since we
can't trust it.

Pull Request: https://projects.blender.org/blender/blender/pulls/136392
2025-03-25 07:09:04 +01:00
Campbell Barton
e87827834b WM: print the NDOF progress identifier instead of a number
Gives more useful output when debugging events.
2025-03-25 13:36:33 +11:00
Campbell Barton
d513433570 Fix: NDOF assert on Unix when using NDOF as the window looses focus
Allow for the last checked time to be equal to the current time.
2025-03-25 13:31:29 +11:00
Campbell Barton
486bd6dd60 Cleanup: simplify wmEvent::modifier checks
Check on the modifier flag were explicitly masking all modifiers
which isn't needed as this flag is ensured to only have the four
expected modifier flags set.

Simplify logic by removing masking for "all" modifiers.
2025-03-25 13:03:24 +11:00
Campbell Barton
2126758bd4 Fix: modifiers set to "Any" were shown as pressed in the key-map string
It's possible only some modifiers are set to "Any", these shouldn't
be considered pressed as the "Any" option is handled per modifier.
2025-03-25 12:36:09 +11:00
Campbell Barton
ec511316d2 Cleanup: minor changes to wmKeyMapItem modifier comparisons
Some of the existing logic checked that modifiers were KM_MOD_HELD,
other logic checked the value wasn't KM_NOTHING or KM_ANY.

Simplify checks by comparing against KM_MOD_HELD in all cases
as this won't be set to other values.
2025-03-25 12:14:27 +11:00
Campbell Barton
93bf29a851 Cleanup: correct values for wmKeyMapItem modifiers, use smaller types
- Document values to use for modifiers in code-comments.
- Only compare modifier values with KM_ANY/NOTHING/MOD_HELD.
- Use smaller integer sizes where possible.
2025-03-25 11:40:53 +11:00
Charles Flèche
ce70f99b5d Fix crash from a missing check for an environment variable on macOS
Ref: !136472
2025-03-25 11:07:47 +11:00
il4n
442150b5be Fix: VSE timeline and outliner out of sync
This fixes some certain cases, where the outliner wasn't notified of
changes in strip selection.

Pull Request: https://projects.blender.org/blender/blender/pulls/136457
2025-03-24 20:49:22 +01:00
Harley Acheson
3e29f3eaa2 UI: Scroll Bars on the Left Side of Left-Aligned Regions
Toolbars and some other regions are aligned to the left sides of their
areas and have an (often hidden) right edge that can be dragged to
resize or hide it. If there isn't enough vertical space to show all of
its contents then you also get a scroll bar along that same edge. These
two things conflict badly and is almost impossible to use with a tablet
pen. The mouse cursor changes to indicate dragging over the scrollbar
but doesn't work. Dragging the scoll bar requires doing so to the right
of it. This PR moves the scroll bars to the left side of these left-
aligned areas. They are correctly changed to the right side if you flip
the region.

Pull Request: https://projects.blender.org/blender/blender/pulls/136218
2025-03-24 20:45:13 +01:00
Harley Acheson
daa417d304 UI: Increase Hit Size of the Close Region Action Zone
When regions are closed, like sidebars and toolbars, we show a little
arrow at the edge. This PR does not change that arrow, nor make any
noticable visual change, but almost doubles the hit size area. Much
easier to hit, especially with a tablet pen.  It also changes the mouse
cursor when hovering over it to ones that indicate movement in that one
direction, helping to reinforce that you are over the spot. Otherwise
the mouse cursor looks the same as when over the nearby edge.

Pull Request: https://projects.blender.org/blender/blender/pulls/136334
2025-03-24 20:04:28 +01:00
Jacques Lucke
0f9ef0eefc Fix: Nodes: unavailable sockets are always unused 2025-03-24 19:36:46 +01:00
YimingWu
2dfa57e8ac Fix #136420: Null check description in file_execute_get_description
`sfile->op->type->description` can be null if the user-registered
operator does not have description, so check that before returning a
translated string.

Pull Request: https://projects.blender.org/blender/blender/pulls/136421
2025-03-24 19:34:44 +01:00
Harley Acheson
e095e5889a Cleanup: Make format
Just changes resulting from running Make Format.
2025-03-24 11:31:47 -07:00
Richard Antalik
dfea0628c4 Cleanup: VSE: Use cached meta lookup
Some old code used to iterate over all strips to find metas. Use
`seq::lookup_meta_by_strip` instead, since it is cached.

Pull Request: https://projects.blender.org/blender/blender/pulls/136406
2025-03-24 19:11:44 +01:00
Jacques Lucke
6624cc5634 Nodes: take panel toggles in builtin nodes into account in socket usage inferencing
If a panel has a toggle, then it's a best practice that everything inside it is
grayed out of the toggle is off. It's not something we can enforce for node
groups, but should enforce it for built-in nodes.  Right now, we don't have
built-in nodes with panels, but that may change e.g. with #135990.

This patch makes it so that the socket usage inferencing takes panel toggles
into account when determining if an input socket in a built-in node in a panel
is used.

Pull Request: https://projects.blender.org/blender/blender/pulls/135993
2025-03-24 19:08:03 +01:00
Leon Schittek
f6da9ed9ea Fix: Nodes: Prevent jiggling when snapping multiple nodes
Snap nodes by first aligning their inital location to the grid and then
offsetting them in grid increments to avoid jiggling when multiple
unsnapped nodes are moved at once.

Pull Request: https://projects.blender.org/blender/blender/pulls/136437
2025-03-24 18:30:15 +01:00
Jacques Lucke
16dcc33cb8 Fix: Nodes: update supported node types check for dynamic legacy types
Newer nodes may not have a fixed `legacy_type`. This was not accounted for
correctly when reading nodes. Such newer nodes are exclusively identified by their idname.

Fortunately, Blender 4.4 was released without any new nodes that don't have
a fixed `legacy_type`. So this does not have to be backported.

Pull Request: https://projects.blender.org/blender/blender/pulls/136431
2025-03-24 17:54:08 +01:00
Sean Kim
1158bb33d0 Fix #88592: Avoid creating undo step when adding brush texture
When adding a texture to a brush datablock, currently, the resulting
undo step does not have any effect when undone. This is due to the
texture being added to the linked asset library. As we do not want this
extraneous undo step to be created since it has no effect, this commit
does the following:

* Removes the automatic undo handling with OPTYPE_UNDO
* Manually adds a undo step if the newly created Texture datablock was
  not moved to a library.

Pull Request: https://projects.blender.org/blender/blender/pulls/136336
2025-03-24 17:43:49 +01:00
Hans Goudey
aa1449bbae Cleanup: Use CustomIDVectorSet for operator types
Missing from c2fd4eb9cc.
2025-03-24 12:31:56 -04:00
Pratik Borhade
c40afd4225 Fix #136369: Grease Pencil: Tint brush ctrl key to erase vertex color
With tint brush active, holdinh ctrl key doesn't erase the color
attribute. Similar to vertex brush (`VertexPaintOperation`) reduce alpha
value from the influence

Pull Request: https://projects.blender.org/blender/blender/pulls/136424
2025-03-24 17:07:20 +01:00
Falk David
d32de62a08 Fix #134517: Grease Pencil: Crash hitting assert in armature modifier
The issue was that using `DEG_get_original_id` returned the same
evaluated ID, because the `GreasePencil` in the geometry set doesn't
have the original ID pointer set.

Instead, use the original ID pointer stored in the
`GreasePencilEditHints` (which is better anyway).

Also resolves #136307.

Pull Request: https://projects.blender.org/blender/blender/pulls/136455
2025-03-24 16:59:48 +01:00
Hans Goudey
84d94aaa15 Cleanup: Add missing include to header 2025-03-24 11:57:53 -04:00
Clément Foucault
eaea129e90 Fix #136273: Selection: Missing support for alt+B clipping
This was just left as TODO.
Passing the clipping state avoids `select_bind`
removing it.

Pull Request: https://projects.blender.org/blender/blender/pulls/136311
2025-03-24 16:53:43 +01:00
Clément Foucault
4fb3edd488 Fix #136335: Overlay: Always respect backface culling mode in selection
This reintroduce the same behavior as 4.3 with regard to
selection and depth drawing.

This patch also disables facing overlay during depth
drawing to avoid it conflicting with tge auto-depth
feature.

Also fix #136418

Pull Request: https://projects.blender.org/blender/blender/pulls/136427
2025-03-24 16:38:09 +01:00
Guillermo Venegas
cba18b006a Cleanup: UI: Avoid overallocation while adding button decorators
This will likely reserve a larger vector more than actually needed.
Reserve only the same count of decorators to be added, since they
likely match the number of buttons that needs to be temporally
retrieved.

Decorators buttons are added along animatable property buttons in each
`layout.prop` function call, when a property is a `XYZ` vector property,
drawing this property adds 3 inputs buttons and for each inputs buttons
this need to insert an aligned property decorator, since this decorators
are added just after the buttons are added this likely just takes out
temporally this last 3 elements and inserts them back with each
corresponding decorator.

Pull Request: https://projects.blender.org/blender/blender/pulls/136191
2025-03-24 16:03:55 +01:00
Sergey Sharybin
60ca0742cb Benchmark: Support running benchmark with HW RT enabled
Similar to the regression tests it is possible to append -RT suffix
to the compute type to enable hardware ray-tracing.

For example HIP_0 will run benchmark on first HIP device without
hardware ray-tracing, HIP-RT_0 will run benchmark on the same device
but will enable hardware ray-tracing.

The downside of this change is that it will make it so METAL device
will no longer use HW-RT on M3 and aboce, and explicit METAL-RT is
to be used. This is because benchmark was relying on the Auto
configuration which has different behavior depending on the device
generation.

Pull Request: https://projects.blender.org/blender/blender/pulls/136308
2025-03-24 15:47:42 +01:00
Sergey Sharybin
b524d0fe39 Cycles: Disable spatial splits for hair BVH
On the user level spatial splits on hair BVH leads to very long build times,
without giving too much advantage in the render times.

There is also some issues and possibly bugs in the builder which lead to all
sort of numerical issues (like divisions by zero). There are also performance
issues that comes from the fact that the alignment space is applied every time
primitive's aligned bounds are requested. It also seems that the splitting
might not be considering aligned space consistently when calculating SAH and
performing splits.

It does sound like issues we'd get fixed ideally, but the importance of the
BVH2 is fading out with the HW-RT becoming more and more popular.

This change contains fix needed for the split algorithm to avoid numerical
issue reported by UBSAN when rendering the `BVH2 particle simple.blend` from
the #126508.

Ref #126508
Ref #136245

Pull Request: https://projects.blender.org/blender/blender/pulls/136430
2025-03-24 15:46:39 +01:00
Brecht Van Lommel
f5c3b8be5c OpenEXR: Improve handling of ACES2065-1 chromaticities
Use aces_interchange role in OpenColorIO to identify the correct colorspace
for each config. Also use acesImageContainerFlag attribute from the ACES
container format to identify the colorspace.

Write ACES2065-1 chromaticities in EXR files when appropriate. This gets us
closer to supporting output of the ACES container format, though we don't
write acesImageContainerFlag. There are various restrictions that must be met
which are not very practical, and even exr2aces doesn't write it.

Pull Request: https://projects.blender.org/blender/blender/pulls/135823
2025-03-24 15:41:22 +01:00
Martin-Vignali
f7054a2d2f OpenEXR: Automatically set colorspace for XYZ E and ACES2065-1 chromaticities
The OpenEXR format has a chromaticities attribute that identifies the scene
referred linear color space. Detect these two cases now, and assign the
corresponding color space from the OpenColorIO configuration.

In general these chromaticities are known to be unreliable and missing support
in most software, with ideas to deprecate them entirely. However the ACES
container format standard requires them, and with this change we'll be able to
read such images with the right color space set by default.

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

Pull Request: https://projects.blender.org/blender/blender/pulls/135823
2025-03-24 15:41:22 +01:00
Lukas Tönne
13f862ec02 Fix #128769: Grease Pencil: Interpolation causes 1-point shift.
Interpolating between curves of the same length was shifting the target
points by 1 index position, starting about half-way along the curve.
The reason is that the `num_free_samples` count compared _points_ of the
destination curve to _segments_ of the source curve, and at equal point
count the segment count is 1 less.

This extra point would be consumed about half-way along the spline, and
then the end point of the source curve was not represented. Fixing
the count makes sure that source and target curve match exactly when
they have the same number of points.

Pull Request: https://projects.blender.org/blender/blender/pulls/136448
2025-03-24 15:34:32 +01:00
Jeroen Bakker
7e68042137 Fix: Vulkan: Advance to next swapchain semaphore
The render frame wasn't increased -> always the same semaphore was
selected. In case rendering is fast (or swapchain needs to be
recreated) it could select a semaphore that still had some pending
operations.
2025-03-24 12:48:16 +01:00
Falk David
03a34204ff Cleanup: Grease Pencil: Tint operation
Cleans up the code and removes some unecessary index range
computations. Also makes some better use of multi-threading
for long strokes.
2025-03-24 12:09:22 +01:00
Clément Foucault
2f3785cf33 Cleanup: Grease Pencil: Remove warning in Instance declaration 2025-03-24 11:59:08 +01:00
Jeroen Bakker
15cb65c9d1 Cleanup: Vulkan: Remove unused code
Command pools and buffers inside GHOST_ContextVK was used to transit
the swapchain images to something known. This isn't anymore as Blender
assumes that the full extent of the swapchain image is updated and can
ignore the actual image format.

Pull Request: https://projects.blender.org/blender/blender/pulls/136305
2025-03-24 11:45:25 +01:00
Jeroen Bakker
56bf4b23be Vulkan: Prefer tripple buffering
Default swapchains to use tripple buffering.
2025-03-24 11:24:46 +01:00
Clément Foucault
a5a61659a3 Cleanup: Grease Pencil: Remove redundant namespace prefixes
Pull Request: https://projects.blender.org/blender/blender/pulls/136426
2025-03-24 11:19:57 +01:00
Clément Foucault
a41aa0cb62 Cleanup: Grease Pencil: Move antialiasing into Instance methods 2025-03-24 11:19:55 +01:00
Clément Foucault
08c1437d6d Cleanup: Grease Pencil: Merge ViewLayerData into Instance
The former as no semantic meaning nowadays. Removes bloat.
2025-03-24 11:19:55 +01:00
Clément Foucault
76f6379e9c Cleanup: Grease Pencil: Remove GPENCIL prefix for engine types
These types are under the `draw::gpencil` namespace already
2025-03-24 11:19:55 +01:00
Clément Foucault
98e13aa1f1 Cleanup: Grease Pencil: Move engine static functions to Instance methods 2025-03-24 11:19:55 +01:00
Bastien Montagne
ec39d5531c I18N: Updated UI translations from git/weblate repository (5ba388414b64160). 2025-03-24 10:56:55 +01:00
Jeroen Bakker
409ce2b976 Vulkan: Swapchain synchronization
This PR adds swapchain synchronization. When the swapchain swaps the
buffers it can add a wait semaphore/signal semaphore to support GPU
based synchronization

10 times playback of `rain_restaurant.blend` on AMD RX 7700
Before: 10 × Animation playback: 72347.5540 ms, average: 7234.75539684 ms
After: 10 × Animation playback: 41523.2441 ms, average: 4152.32441425 ms

Getting around the OpenGL performance target.

Pull Request: https://projects.blender.org/blender/blender/pulls/136259
2025-03-24 10:28:52 +01:00