Commit Graph

120055 Commits

Author SHA1 Message Date
Nathan Vegdahl
e34feb347c Anim: make copy-paste of sequencer strips work with slotted actions
Before this, copy-pasting sequencer strips with animation on them would
fail to copy-paste their animation along with them if they were animated
by a slotted action.  This fixes that.

There are three remaining known issues in the sequencer when used with
slotted actions that this PR does not fix, and will be addressed in a
follow-up PR:

1. Moving strips fails to move the animation of their fcurves with them,
   which it should.
2. Duplicating strips (as distinct from copying followed by pasting)
   fails to duplicate their animation with them.
3. Deleting a strip does not delete its animation channels with it.

Pull Request: https://projects.blender.org/blender/blender/pulls/128363
2024-10-03 15:01:53 +02:00
Omar Emara
98960bc7be Merge branch 'blender-v4.3-release' 2024-10-03 13:23:29 +03:00
Omar Emara
3a070122ea Fix #126998: Fog Glow is corrupt for large images
The Fog Glow Glare node produces corrupt images for large inputs in GPU
mode. That's due to a typo where the number of channels was declared as
a float as opposed to an integer, causing rounding errors in indexing
statements.
2024-10-03 13:20:53 +03:00
Falk David
9c6488ca42 Fix: GPv3: Crash in evelope modifier
Caused by ba28469e45.
The `total_size()` function excludes the start offset now, which meant
that the `dst_curve_num` and `dst_point_num` were off.

The fix makes sure to include the src curves and points totals in the
destination if `keep_original` is true.

Pull Request: https://projects.blender.org/blender/blender/pulls/128523
2024-10-03 11:20:08 +02:00
Lukas Tönne
23ecce595a Merge branch 'blender-v4.3-release' 2024-10-03 11:20:05 +02:00
Lukas Tönne
c986aa03b9 GPv3: Remove unused GPv2 keymap entries
This should free up references to GPv2 types and operators and should
in turn make their removal easier.

- Remove keymaps for GPv2 operators from `blender_default.py` and
  `industry_compatible_data.py`
- Remove keymap poll callback assignment from `gpencil_ops.cc`
- Remove keymap handler registration from `area.cc:ed_default_handlers`

Pull Request: https://projects.blender.org/blender/blender/pulls/128480
2024-10-03 11:18:31 +02:00
Jeroen Bakker
f1ec3b3701 Merge branch 'blender-v4.3-release' 2024-10-03 10:13:47 +02:00
Jeroen Bakker
52dfb4aa8f Fix #124720: Metal: Crash when trying to allocate large 3d textures
The metal backend assumes that textures can always be allocated. When
metal later detects that the texture cannot be 'baked' it leads to
undesired behavior as Blender think it has a texture with memory
allocated.

This PR only changes the GPU_TEXTURE_3D case as that leads to issues
when loading large voluetric data. Arrayed textures will still fail
as that requires different checks to be added. I rather re-view the
current implementation in the future.

> NOTE: The max depth is hardcoded to 2048

Change should be backported to 4.2

Pull Request: https://projects.blender.org/blender/blender/pulls/128365
2024-10-03 10:11:23 +02:00
Jeroen Bakker
06a4198329 Fix #127274: Vulkan: Incorrect limits.
When using AMD pro-drivers the limits reported of the device can be
`UINT_MAX` but are stored in int fields. In this case the limits would
become negative and GPU materials validation failed resulting into errors.

This is fixed by clamping the value to `INT_MAX`.

Pull Request: https://projects.blender.org/blender/blender/pulls/128437
2024-10-03 10:10:32 +02:00
Jason C. Wenger
a9e9c56151 Cleanup: extract delimit data creation into a function for join tris
Part of !128224.
2024-10-03 18:03:38 +10:00
Sybren A. Stüvel
e89f004c56 Anim: allow inserting a key on layered Action while in NLA tweak mode
The key insertion code is assigning the target Action to the keyed ID,
which isn't allowed while in NLA tweak mode. This is now skipped when
the Action is already assigned.

Pull Request: https://projects.blender.org/blender/blender/pulls/128446
2024-10-03 09:54:15 +02:00
Sybren A. Stüvel
b520b49b0e Merge remote-tracking branch 'origin/blender-v4.3-release' 2024-10-03 09:52:18 +02:00
Sybren A. Stüvel
e282b9e5e7 Fix #128490: Crash opening a file with with slotted action enabled
The crash was caused by infinite recursion. When recursing into sub-strips
of an NLA strip, it helps to actually recurse with the pointer to that
sub-strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/128492
2024-10-03 09:40:19 +02:00
Sybren A. Stüvel
e16e43dcde Anim: Make experimental.use_animation_baklava read-only when non-exp
Make the RNA property `prefs.experimental.use_animation_baklava` read-only
when Blender was built without experimental features.

This reverts parts of b46e2e6300, which
completely removed the flag. That was a bit over-zealous, as there is still
Python code that checks it. Now it always stays `False` on non-experimental
builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/128494
2024-10-03 09:39:10 +02:00
Campbell Barton
414e8984e5 Cleanup: replace goto with return values 2024-10-03 17:12:37 +10:00
Campbell Barton
569683aa90 Cleanup: don't use float return type for boolean checks 2024-10-03 17:10:31 +10:00
Campbell Barton
3e4dba8805 Merge branch 'blender-v4.3-release' 2024-10-03 15:02:32 +10:00
Campbell Barton
589da4acb5 Cleanup: keep end-of-function code comment last (#2) 2024-10-03 15:00:07 +10:00
Campbell Barton
ebb51364d4 Merge branch 'blender-v4.3-release' 2024-10-03 14:48:22 +10:00
Campbell Barton
9bdaa51bb4 Merge branch 'blender-v4.3-release' 2024-10-03 14:48:19 +10:00
Campbell Barton
9cc5ffa58c Merge branch 'blender-v4.3-release' 2024-10-03 14:48:17 +10:00
Campbell Barton
a9b977d256 Cleanup: sort CMake file lists 2024-10-03 14:46:26 +10:00
Campbell Barton
459c7c7f82 Cleanup: sort DNA rename (documented as sorted) 2024-10-03 14:44:12 +10:00
Campbell Barton
f489611ff3 Cleanup: keep end-of-function code comment last 2024-10-03 14:42:36 +10:00
Campbell Barton
21fa9c4e1d Merge branch 'blender-v4.3-release' 2024-10-03 13:34:53 +10:00
Campbell Barton
cb283c3cd9 Cleanup: suppress array-bounds warning with GCC 2024-10-03 13:25:15 +10:00
Campbell Barton
9db8cb5ae4 Merge branch 'blender-v4.3-release' 2024-10-03 12:19:09 +10:00
Campbell Barton
ae9f02c433 Merge branch 'blender-v4.3-release' 2024-10-03 12:19:05 +10:00
Campbell Barton
952e1d46d1 Cleanup: match declaration names, avoid shadowing & clear trailing space 2024-10-03 12:12:08 +10:00
Campbell Barton
4fa3dc0dd4 Cleanup: spelling in comments, use uppercase tags 2024-10-03 12:11:52 +10:00
Sean Kim
20accbe4cf Refactor: Group mode-specific Sculpt undo StepData into structs
Some fields of the `StepData` struct are only valid within certain PBVH
modes. This commit groups them so that they can eventually be further
consolidated.

Pull Request: https://projects.blender.org/blender/blender/pulls/128512
2024-10-03 00:54:47 +02:00
Pablo Vazquez
e55d54f46d Merge branch 'blender-v4.3-release' 2024-10-03 00:38:07 +02:00
John Kiril Swenson
d2a802d3c6 VSE: Remove timeline box select
Remove the box select tool from the timeline to simplify selection
logic, avoid confusion for users, and make maintaining the code
easier in the future. It also brings the selection system  closer
to other industry-standard NLEs.

It also fixes an issue caused by d2091b4b1.

More details in PR.

Pull Request: https://projects.blender.org/blender/blender/pulls/128051
2024-10-03 00:37:00 +02:00
Pablo Vazquez
574d02af4c Merge branch 'blender-v4.3-release' 2024-10-03 00:29:56 +02:00
Pablo Vazquez
177e2ac837 Grease Pencil: Tool settings layout adjustments
Small adjustments to improve consistency in tool settings
between different tools.

Pull Request: https://projects.blender.org/blender/blender/pulls/128491
2024-10-03 00:28:50 +02:00
Sean Kim
afd51876b0 Cleanup: Various non-functional changes for sculpt_undo.cc
* Use const where possible
* Use reinterpret_cast instead of C-style cast for pointers
* Shorten variable names from vertices to verts

Pull Request: https://projects.blender.org/blender/blender/pulls/128466
2024-10-02 23:36:12 +02:00
Sean Kim
8477a273dd Merge branch 'blender-v4.3-release' 2024-10-02 13:52:18 -07:00
Sean Kim
4cefac0da3 Fix: Remove incorrect sculpt assert
Added in 4bc146f00a

Missed the valid case where one of the two spans could be empty.

Pull Request: https://projects.blender.org/blender/blender/pulls/128501
2024-10-02 22:50:35 +02:00
Jesse Yurkovich
65d56e6ae4 Merge branch 'blender-v4.3-release' 2024-10-02 10:54:53 -07:00
Jesse Yurkovich
4a679470b6 Fix: USD: collection creation during import assigned extra fake user
When using the `create_collection` parameter during import, the newly
created Collection would be assigned a fake user which isn't necessary
and caused the user count to be 2 instead of the more natural 1 here.

Remove the fake user and add test coverage for the scenario in general.

Pull Request: https://projects.blender.org/blender/blender/pulls/128348
2024-10-02 19:53:50 +02:00
Falk David
e97ea85e37 Merge branch 'blender-v4.3-release' 2024-10-02 18:58:17 +02:00
Falk David
07ed9b805d Fix: Compile error using clang
Clang doesn't allow to capture structured bindings in lambdas.
Instead, remove the structured bindings and just use a const
reference to the item iterator.
2024-10-02 18:56:01 +02:00
Falk David
bd1346968c Merge branch 'blender-v4.3-release' 2024-10-02 18:39:32 +02:00
Falk David
1829982d3b GPv3: Merge Layers Operator
This adds a function to merge layers in original Grease Pencil geometry.
It also adds an operator to merge layers as well as some tests for the `merge_layers` function.

The operator has 3 modes:
* `Merge Down`: Combine the active layer with the layer just below (if there is one).
* `Merge Group`: Combine all the layers in a group into one single layer and remove
  the group. Can be accessed in the right-click menu of groups.
* `Merge All`: Combine all the layers of the object into one single layer.

All of these can be accessed in the `Extras` menu next to the layer tree.

Pull Request: https://projects.blender.org/blender/blender/pulls/128201
2024-10-02 18:28:30 +02:00
Bastien Montagne
7bc223375c Merge branch 'blender-v4.3-release' 2024-10-02 16:48:19 +02:00
Bastien Montagne
76e7770bc9 Python API: Add link/append pre/post handlers.
The `pre` handler is called after blender internal code is done populating
the link/append context with data to be processed, and before this data
starts being linked from library files.

The `post` handler is called after blender is done linking, and
potentailly appending and/or instantiating, the requested data and all
of their dependencies.

Both handlers are called with a single argument, the link/append
context.

An new RNA sets of wrappers have been added to expose relevant info from
these internal C++ structures.

NOTE: !113658 is very similar (but tied to asset drag & drop), whereas
this PR is more general (these could probably live hand-in-hand / side-
by-side).

Implements #122357

Pull Request: https://projects.blender.org/blender/blender/pulls/128279

-----------------

Some quick py example  code:

```python
import bpy

def my_handler_pre(lapp_context):
    print("About to {}:\n\t".format("link" if "LINK" in lapp_context.options else "append"),
          "\n\t".join("{} '{}', from libs ['{}']".format(item.id_type, item.name,
                                                         "', '".join([l.filepath for l in item.source_libraries]))
                      for item in lapp_context.import_items))

def my_handler_post(lapp_context):
    print("{}:\n\t".format("Linked" if "LINK" in lapp_context.options else "Appended"),
          "\n\t".join("{} '{}', from lib '{}'".format(item.id.id_type, item.id.name, item.source_library.filepath)
                      for item in lapp_context.import_items))

bpy.app.handlers.link_append_pre.append(my_handler_pre)
bpy.app.handlers.link_append_post.append(my_handler_post)
```
2024-10-02 16:44:38 +02:00
Sybren A. Stüvel
bd4f186ffb Merge remote-tracking branch 'origin/blender-v4.3-release' 2024-10-02 16:34:13 +02:00
Sybren A. Stüvel
b46e2e6300 Anim: remove Slotted Actions experimental flag from prefs in non-exp build
Remove the 'Slotted Actions' (`use_animation_baklava`) experimental flag
from the preferences RNA, in non-experimental builds.

The experimental flag is already zeroed out when loading the
preferences. This commit ensures that it stays zeroed out. The rest of
the code assumes that the flag is always `false` in non-experimental
builds.

Pull Request: https://projects.blender.org/blender/blender/pulls/128483
2024-10-02 16:32:17 +02:00
Sybren A. Stüvel
8c37b20dd5 Anim: enable more slotted action handling in non-experimental builds
Remove some `#ifdef WITH_ANIM_BAKLAVA` guards to make a unit test
succeed. The code is handling slots when assigning Actions to IDs.
Non-experimental builds will only deal with legacy Actions, and thus the
slot assignment is a no-op anyway.

The unit test is explicitly creating layered Actions and running tests
on them. Since this also covers some new code introduced for Action
assignments (unified code for both legacy & layered Actions), I'd feel
more comfortable keeping the test enabled.

Note that when loading a blend file with layered Actions in a
non-experimental build will actually load them as legacy Actions.

Pull Request: https://projects.blender.org/blender/blender/pulls/128483
2024-10-02 16:32:15 +02:00
Falk David
65004bede0 Merge branch 'blender-v4.3-release' 2024-10-02 15:20:55 +02:00