Commit Graph

150077 Commits

Author SHA1 Message Date
Philipp Oeser
d18fe0c575 Fix #135523: Calculate Motion Paths ignores Selected Keys option
Since the switch to slotted actions, we cannot solely rely on the
Listbase of `curves` (this is for legacy actions only), but need to
consider Channelbag for new slotted actions. There is
`assigned_action_has_keyframes` that handles both of these
and would also early out if we have no keyframes to process,
so use it.

Pull Request: https://projects.blender.org/blender/blender/pulls/135566
2025-03-07 08:35:17 +01:00
Philipp Oeser
cf95ff1a6e Fix #129782: ActionSlot channels in Action Editor mode lack background
This was introduced in 1d2cea1e3e

It was not using any `draw_backdrop` callback though, which is now
added.

Main point of discussion is probably if we want to use `Dope Sheet
Channel` theming (which is only used for `Object` and `Scene` channels
atm., also referred to as "root" in code) or the `Dope Sheet Sub-
channel` theming (which is now used for all kinds things - object data,
but also actions..., also referred to as "dataexpand" in code)

Given the similarity to actions, one might lean towards "Sub", but otoh
that channel occupies a "root" channel in the action editor mode. If I
understand correctly, an `ActionSlot` is also mostly used to "separate"
different objects in the same action, so that then makes an ActionSlot
actually more similar to how the "root" channel is used for `Object` and
`Scene` in dopesheet mode.

This is why this PR makes an `ActionSlot` use the "root" theming.

NOTE: we also might want to revisit the naming in code (suggestion would
be TH_DOPESHEET_CHANNELOB > TH_DOPESHEET_CHANNELROOT,
TH_DOPESHEET_CHANNELSUBOB >TH_DOPESHEET_CHANNELSUBOB), but that is for
another time...

Pull Request: https://projects.blender.org/blender/blender/pulls/135506
2025-03-07 08:35:02 +01:00
Campbell Barton
bfa568b4ff Cleanup: replace filename with filepath for full paths 2025-03-07 15:56:24 +11:00
Campbell Barton
7d13c1d426 Merge branch 'blender-v4.4-release' 2025-03-07 15:50:15 +11:00
Campbell Barton
f6d730d6e6 Fix "Image from View" ignored filepath property
Assign the filepath from the operator to the generated image.
2025-03-07 15:49:39 +11:00
Campbell Barton
e9b4f13304 Merge branch 'blender-v4.4-release' 2025-03-07 15:18:14 +11:00
Campbell Barton
f7ba05991f Fix uninitialized return value from constraint operators
The utility function edit_constraint_invoke_properties could return
false without setting the return value, causing the operators invoke
function to return an uninitialized flag.
2025-03-07 15:16:51 +11:00
Alaska
c33b423509 Tests: Add render test for rolling shutter
This commit adds a test for the rolling shutter feature found
in Cycles.

The test contain a few different objects to test different areas:
- A rotating camera, with a changing focal length
- A moving object
- A rotating object
- And a rotating object with motion blur disabled

Ref: blender/blender-test-data!67

Pull Request: https://projects.blender.org/blender/blender/pulls/135562
2025-03-07 05:15:34 +01:00
Campbell Barton
f9c1475020 Fix crash adding a view layer without an active window
Resolve regression in [0].

This is most likely to occur when called from Python.

[0]: d1972e50cb
2025-03-07 15:15:15 +11:00
Brecht Van Lommel
48398b223b Cleanup: Fix various divisions by zero reported by ASAN
Pull Request: https://projects.blender.org/blender/blender/pulls/135326
2025-03-06 22:34:23 +01:00
Brecht Van Lommel
f6eb81e62a Cleanup: Fix (harmless) null pointer increment in particle code 2025-03-06 22:34:22 +01:00
Brecht Van Lommel
b75b2e883d Cleanup: Always use fullsize ShaderData on the CPU
This avoids compiler and ASAN warnings. This optimization exist for
GPU rendering.
2025-03-06 22:34:22 +01:00
Brecht Van Lommel
5a9d4fd613 Cleanup: Use default member initializers 2025-03-06 22:34:22 +01:00
Brecht Van Lommel
ab394c8e8d Refactor: Use std::bitset to avoid overflow in device queue logging 2025-03-06 22:34:22 +01:00
Brecht Van Lommel
dd20f31302 Cleanup: Fix clang-tidy warnings from recent OSL changes 2025-03-06 22:34:22 +01:00
Xavier Hallade
91f332e7c6 Cycles: oneAPI: Force normal GRF for integrator_intersect_* kernels
With auto mode, integrator_intersect_subsurface still ended up being
compiled in large GRF mode on Intel Arc B580, while normal GRF provides
the best performance for this kernel.
2025-03-06 22:24:45 +01:00
Falk David
e39c83c881 Merge branch 'blender-v4.4-release' 2025-03-06 21:19:31 +01:00
Jörg Müller
4c1c2f0280 Audaspace: update to version 1.6 for blender 4.4.
Pull Request: https://projects.blender.org/blender/blender/pulls/135475
2025-03-06 21:14:45 +01:00
Jörg Müller
41cbebe6d9 Audaspace: port CoreAudio closing fix from main. 2025-03-06 21:14:44 +01:00
John Kiril Swenson
993f9b2d30 VSE: Report one-time property changes
This patch adds warnings when view transform or FPS values are changed
by dragging in an initial strip with "Set Scene Frame Rate" or "Set View
Transform" enabled.

In the case that both occur at the same time, reports are not
interweaved but both still show up in the info viewer -- this is a
limitation of `BKE_report` itself. Future work could modify the report
system to support queuing, but this is still an improvement over
previous behavior.

Pull Request: https://projects.blender.org/blender/blender/pulls/135494
2025-03-06 21:13:12 +01:00
Jesse Yurkovich
0a16ba9911 Fix #135502: Handle Alembic attribute size mismatch when reading points
The Alembic file in the issue had 0 points, and 4 widths, defined for
frame 33 which is certainly incorrect from whichever software produced
said file. However, our import code should have proper guards in place
to more gracefully handle the situation.

Pull Request: https://projects.blender.org/blender/blender/pulls/135548
2025-03-06 20:54:53 +01:00
Jesse Yurkovich
4c38380cc6 Fix #134043: Account for frame_offset in Alembic procedurals
There's two places which perform the frame start and end time
calculation and only one of them was respecting the frame_offset.

Pull Request: https://projects.blender.org/blender/blender/pulls/134149
2025-03-06 20:54:22 +01:00
Jesse Yurkovich
3a0e4fe316 Fix #134039: Alembic procedural proxy mesh should be owned by GeometrySet
When using Alembic procedurals, the Mesh Sequence Cache attempts to
replace the original geometry with a plain old cube. However, it never
frees this new cube geometry. Transfer ownership to the underlying
GeometrySet instead.

Investigating the scenario also showed that the `~AlembicProcedural`
dtor was removing an item from the `nodes` vector while iterating over
it, which triggers debug asserts on at least MSVC. I believe the removal
is unnecessary since this is the dtor and ASAN appears clean now.

Pull Request: https://projects.blender.org/blender/blender/pulls/134085
2025-03-06 20:53:52 +01:00
Clément Foucault
2131ef0a20 DRW: Use depsgraph update count to replace view_update
This avoid having to flush explicitely and the need for syncing.
It also removes a lot of complexity in the process.

These updates are not granular and do not need to so much
boiler plate code.

The depsgraph update counter now becomes atomic to avoid
undefined behavior when a depsgraph is being destroyed and
its memory reused (same thinking as the non-copy-on-eval IDs).

I tested some use cases (object update, sculpt update,
shading update) and they are all working.

Pull Request: https://projects.blender.org/blender/blender/pulls/135580
2025-03-06 19:15:29 +01:00
Julian Eisel
b9907cb60b Fix #134418: Double clicking a file crashes Blender if load UI is off
Screen initialization is more context dependent than it used to be
because of region polling, so the context needs to be set up correctly.
Here was a case where the initialized window/screen passed to polling
didn't match what's in context (UI context was unset in fact).

Some asserts could be added to ensure data passed to screen
initialization matches context, but can do that separately.

Pull Request: https://projects.blender.org/blender/blender/pulls/135568
2025-03-06 19:01:10 +01:00
Clément Foucault
b4a1a140d7 Fix #134509: GPU: Node editor links are invisible on Intel GPU
This bug also affects integrated GPU as well.
Remove the GPU familly check.
2025-03-06 18:48:56 +01:00
Hans Goudey
9287bb759b Geometry Nodes: Import Text node
As a small addition to the import node features for 4.5,
this simple node imports a text file as a string. Potential
use cases include retrieving text for motion graphics.

Currently this just allows .txt files. More extensions could
be allowed in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/135459
2025-03-06 18:47:30 +01:00
Hans Goudey
4fd96e61d5 Fix: Missing cache invalidation in grease pencil transform operator 2025-03-06 12:40:46 -05:00
Richard Antalik
951adb19ab Fix lite build error
Missed renaming LoadData in ifdef'd parts of code.
2025-03-06 18:38:32 +01:00
Miguel Pozo
db053ff8c5 Fix: EEVEE: Avoid double lock in ShaderModule::module_free
Use a separate lock for the module ops.

Pull Request: https://projects.blender.org/blender/blender/pulls/135587
2025-03-06 18:13:18 +01:00
Xavier Hallade
d1120c51db Cycles: oneAPI: Enable automated GRF mode selection
The default was large GRF mode for all kernels and normal GRF for
intersection kernels.
path_array kernels also benefit from normal GRF, being almost 2x faster
in this mode, as measured on my Arc B580. This translates to a much
smaller 1-3% speedup in overall rendering.
Instead of manually adding them to the list of kernels to compile in
normal GRF mode, I've switched to auto that provides the same result.
2025-03-06 17:47:19 +01:00
Jacques Lucke
cc8979650b Screen: support garbage collection of layout panel states
Identifying layout-panels using strings and storing their open-state in their
parent panel is generally very convenient. However, right now there is no
mechanism to free the open-close state of panels that are not in use anymore.
It's generally not possible to know if a panel is not used anymore (e.g. it may
also belong to a temporarily disabled add-on). So every mechanism here will be
based on heuristics. A simple but typically very good heuristic is to just
remove the least-recently-used panel states when there are too many. So that's
what is implemented here.

This introduces a logical clock that increases whenever a panel state is used
and stores the last usage time on the panel state. This allows us to remove the
least-recently-used states later on. Specifically, that is done when the .blend
file is loaded the next time. It's not done at another time, because it quite
difficult to be sure that freeing panel states wouldn't cause dangling pointers
in such cases. I think doing it on-load should be good enough for all practical
use-cases.

Note, I don't know if the lack of such garbage collection has ever caused a
problem anywhere. However, it seems better to have some solution now than trying
to solve it after the problem has occurred and made someone's file unusable.

Pull Request: https://projects.blender.org/blender/blender/pulls/135569
2025-03-06 17:41:49 +01:00
Hans Goudey
a15005dbef Fix: Build error after recent Grease Pencil commit
Caused by e0f5ce46b7.
2025-03-06 11:00:09 -05:00
Hans Goudey
395e8796cf Fix: Missing radius change tag in curves radius transform operator 2025-03-06 10:35:36 -05:00
Falk David
5f464b2de0 Fix #135235: Grease Pencil: Crash when removing layers in python API
When iterating over the layers in a Grease Pencil object,
removing the layers can lead to crashes.

This PR is a better alternative to !135253.

Instead of checking if the layer is valid, simply fetch the latest layer
cache for each iteration and check if the index is valid.

This means that we will skip over layers if they get removed during
iteration, but we no longer can crash. If users want to remove multiple
layers at once, it's better to do this in two passes. E.g. by first
collecting the names of the layers to remove, iterating over
these names and then removing the layers by getting it by its name.

Pull Request: https://projects.blender.org/blender/blender/pulls/135574
2025-03-06 16:30:35 +01:00
Jeroen Bakker
be4f9c0ac8 Merge branch 'blender-v4.4-release' 2025-03-06 16:30:16 +01:00
YimingWu
e0f5ce46b7 Fix #134599: Grease Pencil: Connect edges when converting from mesh
The Mesh to Grease Pencil conversion would convert every edge into a stroke.
This was not the case prior to Blender 4.3. Edges with no branches would be
converted into a single stroke instead of mutliple ones.

This fix uses `geometry::mesh_to_curve_convert` from geometry nodes to
achieve more optimal result with edges connected into one stroke when
possible.

Pull Request: https://projects.blender.org/blender/blender/pulls/135557
2025-03-06 16:29:14 +01:00
Jeroen Bakker
37d781aa2a Fix #135516: Vulkan: Shader output viewport broken on RDNA2
When using the official RDNA2 driver +vulkan we see the same issue we
as #123787. Adding the same workaround to vulkan as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/135565
2025-03-06 16:28:47 +01:00
Clément Foucault
f8c23fc793 Cleanup: EEVEE: Unused variables 2025-03-06 16:24:59 +01:00
Hans Goudey
466d5e2a4c Cleanup: Use StringRef for point cloud attribute names
Also these don't need to be exposed elsewhere. The same name
is used everywhere anyway. And avoid some namespace repetition
in one function.
2025-03-06 09:55:02 -05:00
Christoph Lendenfeld
ba1e51cff9 Merge branch 'blender-v4.4-release' 2025-03-06 15:54:03 +01:00
Christoph Lendenfeld
b834ca4fb1 Fix: Custom Properties named identical to existing properties fails to key
When inserting keys in the viewport by pressing `I`,
certain custom properties would not get keyed if their name
was identical to existing properties (for example `scale`).

That was because we use the name of the property to resolve
an rna path and check if the path resolved. This was of course
true in the described case and the square brackets would never be added.
The solution is to check for `RNA_property_is_runtime` which is false
for properties defined inside Blender.

Pull Request: https://projects.blender.org/blender/blender/pulls/135304
2025-03-06 15:52:29 +01:00
Christoph Lendenfeld
a485bf6556 Fix #134034: Baking a custom property with a name existing in Blender failed
When baking custom properties that were named exactly the same
as a property already in Blender (in this case `scale`), it would fail.
The issue was introduced with eee32726c7 where the goal was
to not key addon defined properties.
The problem with that approach was that `obj.bpy_rna.properties`
not only contains addon defined properties but also all that are native to Blender.
So the rna path would be created to be identical as for e.g. transform properties.

The fix is to test the property for `is_runtime` which is true for addon
defined properties but false for blender internal properties

I tested with the test file of #121349 to confirm that doing so
doesn't bring that original bug back.

Pull Request: https://projects.blender.org/blender/blender/pulls/135297
2025-03-06 15:51:44 +01:00
Clément Foucault
5a32440edf Refactor: DRW: Replace by enabled engine list by static members
Iteration is done through templates.

Removes the need for the enabled engine list/vector.

Reduces API complexity.
2025-03-06 15:20:35 +01:00
Clément Foucault
4f909ba6fd DRW: Make DRWContext thread local
The owner of the context is now always the local context.
The `DRWContext` is now a temporary object that owns
no data.

The draw debug API is being put in a non-working state by
this PR as it conflicts with the new lifetime / ownership of
the `DRWContext` class.
A new design with a global (threadsafe) debug module is needed
to add back support for these debug features. Note that these
are not user facing features.

Some parts of EEVEE are still calling the global context and that
caused crashes in the volume probe baking pipeline where
the context is not yet known. Sort circuiting these function
calls in this case fixes the issue, but a more longer term
solution would be to alway have a `DRWContext` available inside
`eevee::Instance`.

I did some testing and didn't find much of a difference in frame time.
However, we should still strive to remove all global access in the future
to avoid potential overhead of `thread_local`.

Pull Request: https://projects.blender.org/blender/blender/pulls/135521
2025-03-06 15:18:02 +01:00
Clément Foucault
e36cc4dcf7 Cleanup: Grease Pencil: Remove uneeded push-constants
All of these push-constants were either redundant or
not used anymore.

Pull Request: https://projects.blender.org/blender/blender/pulls/135561
2025-03-06 15:14:05 +01:00
Sybren A. Stüvel
15758ab854 Merge remote-tracking branch 'origin/blender-v4.4-release' 2025-03-06 14:13:03 +01:00
Sybren A. Stüvel
16d819caa9 Fix: Reorder versioning of legacy Grease Pencil and Actions
The versioning of legacy-to-modern Grease Pencil is using slotted
Actions (because that's the current animation API), and therefore
assumes that the Action & Slot assignments have been versioned as well.
The latter now actually happens before the former, so that assumption is
now actually valid.

Pull Request: https://projects.blender.org/blender/blender/pulls/135466
2025-03-06 14:12:17 +01:00
Richard Antalik
68abed543b Refactor: Remove module prefix form symbols in sequnecer namespaces
Remove
SEQ_ prefix for blender::seq namespace and
ED_sequencer for blender::ed::vse namespace

Pull Request: https://projects.blender.org/blender/blender/pulls/135560
2025-03-06 13:04:39 +01:00
Sergey Sharybin
7397e6da29 Fix: Cycles HIP-RT crash
The crash has been introduced by the refactor of lights to be
objects in #134846.

We can make such cases easier to catch at compile time in the
future, but for now applying the minimal patch which solves the
problem without going deeper into refactor.

Pull Request: https://projects.blender.org/blender/blender/pulls/135570
2025-03-06 11:58:13 +01:00