Commit Graph

3492 Commits

Author SHA1 Message Date
Campbell Barton
5a561c6aeb Cleanup: spelling in comments 2024-10-16 21:10:49 +11:00
Campbell Barton
b3c9c7c496 Merge branch 'blender-v4.3-release' 2024-10-16 21:08:17 +11:00
Christoph Lendenfeld
88f298f66f Fix: Error when baking custom properties of unavailable addon
When baking an Action on an object which has custom properties that come
from an addon or python script that isn't loaded, the baking would fail with:
```
TypeError: Cannot assign a 'dict' value to the existing 'hops' Group IDProperty
```

This comes from an addon that isn't present or loaded on a users machine.
The fix is to check for `IDProperty` and skip those.

Pull Request: https://projects.blender.org/blender/blender/pulls/129057
2024-10-16 10:42:32 +02:00
Campbell Barton
4bc9dc0c44 Merge branch 'blender-v4.3-release' 2024-10-16 15:07:35 +11:00
Campbell Barton
9bd2e3554a Merge branch 'blender-v4.3-release' 2024-10-16 15:07:33 +11:00
Campbell Barton
346bea93cc Cleanup: wrap long lines 2024-10-16 15:00:11 +11:00
Campbell Barton
c3b067dc80 Cleanup: single/double quote use in scripts 2024-10-16 14:45:08 +11:00
Sean Kim
3b87673eb8 Merge branch 'blender-v4.3-release' 2024-10-15 16:19:40 -07:00
Sean Kim
f5e660f5f0 Fix #129076: Missing headers in Weight Paint
Introduced in 79ae0f86da

Pull Request: https://projects.blender.org/blender/blender/pulls/129082
2024-10-16 01:10:33 +02:00
Sybren A. Stüvel
43d7558e5b Anim: Remove 'Slotted Actions' experimental flag
This commit takes the 'Slotted Actions' out of the experimental phase.
As a result:

- All newly created Actions will be slotted Actions.
- Legacy Actions loaded from disk will be versioned to slotted Actions.
- The new Python API for slots, layers, strips, and channel bags is
  available.
- The legacy Python API for accessing F-Curves and Action Groups is
  still available, and will operate on the F-Curves/Groups for the first
  slot only.
- Creating an Action by keying (via the UI, operators, or the
  `rna_struct.keyframe_insert` function) will try and share Actions
  between related data-blocks. See !126655 for more info about this.
- Assigning an Action to a data-block will auto-assign a suitable Action
  Slot. The logic for this is described below. However, There are cases
  where this does _not_ automatically assign a slot, and thus the Action
  will effectively _not_ animate the data-block. Effort has been spent
  to make Action selection work both reliably for Blender users as well
  as keep the behaviour the same for Python scripts. Where these two
  goals did not converge, reliability and understandability for users
  was prioritised.

Auto-selection of the Action Slot upon assigning the Action works as
follows. The first rule to find a slot wins.

1. The data-block remembers the slot name that was last assigned. If the
    newly assigned Action has a slot with that name, it is chosen.
2. If the Action has a slot with the same name as the data-block, it is
    chosen.
3. If the Action has only one slot, and it has never been assigned to
    anything, it is chosen.
4. If the Action is assigned to an NLA strip or an Action constraint,
    and the Action has a single slot, and that slot has a suitable ID
    type, it is chosen.

This last step is what I was referring to with "Where these two goals
did not converge, reliability and understandability for users was
prioritised." For regular Action assignments (like via the Action
selectors in the Properties editor) this rule doesn't apply, even though
with legacy Actions the final state ("it is animated by this Action")
differs from the final state with slotted Actions ("it has no slot so is
not animated"). This is done to support the following workflow:

- Create an Action by animating Cube.
- In order to animate Suzanne with that same Action, assign the Action
  to Suzanne.
- Start keying Suzanne. This auto-creates and auto-assigns a new slot
  for Suzanne.

If rule 4. above would apply in this case, the 2nd step would
automatically select the Cube slot for Suzanne as well, which would
immediately overwrite Suzanne's properties with the Cube animation.

Technically, this commit:
- removes the `WITH_ANIM_BAKLAVA` build flag,
- removes the `use_animation_baklava` experimental flag in preferences,
- updates the code to properly deal with the fact that empty Actions are
  now always considered slotted/layered Actions (instead of that relying
  on the user preference).

Note that 'slotted Actions' and 'layered Actions' are the exact same
thing, just focusing on different aspects (slot & layers) of the new
data model.

The "Baklava phase 1" assumptions are still asserted. This means that:
- an Action can have zero or one layer,
- that layer can have zero or one strip,
- that strip must be of type 'keyframe' and be infinite with zero
  offset.

The code to handle legacy Actions is NOT removed in this commit. It will
be removed later. For now it's likely better to keep it around as
reference to the old behaviour in order to aid in some inevitable
bugfixing.

Ref: #120406
2024-10-15 16:29:53 +02:00
Falk David
016008e097 Formatting 2024-10-15 13:04:50 +02:00
Damien Picard
5715693a97 UI: Use title case for Grease Pencil, Freestyle, Line Art
This was already the case for the vast majority of occurrences, and is
recommended by the human interface guideline's writing style.

Pull Request: https://projects.blender.org/blender/blender/pulls/129000
2024-10-15 13:00:47 +02:00
Falk David
fd80635fe1 Formatting 2024-10-15 12:30:19 +02:00
Falk David
5fbf747b55 Merge branch 'blender-v4.3-release' 2024-10-15 12:27:48 +02:00
Falk David
251250a3fb Fix #128991: GPv3: Python: Writing to invalid properties doesn't raise exception
When writing to a property that doesn't exist e.g. `frame.drawing.strokes.test = 42`
no exception would be raised and it would silently fail.

The fix defines the `__slots__` on the classes explicitly which then raises an exception
if the user tries to write something that wasn't previously defined.

Pull Request: https://projects.blender.org/blender/blender/pulls/129047
2024-10-15 12:23:02 +02:00
Falk David
39675bb0fb Fix: GPv3: Python: Setting attribute value always creates new attribute
When e.g. executing `drawing.strokes[0].softness = 3`, the API would
always create a new attribute `softness` even if that attribute existed
already.

The issue was that the code was using the `.get(value, fallback)` syntax
but the `fallback` expression is always evaluated by python.

The fix removes the use of the `fallback` and uses a simple `if/else` to
check if the attribute doesn't exist yet and only then create it.

Pull Request: https://projects.blender.org/blender/blender/pulls/129044
2024-10-15 12:22:32 +02:00
Sergey Sharybin
91eb980891 Merge branch 'blender-v4.3-release' 2024-10-15 11:42:48 +02:00
Nika Kutsniashvili
f909bf2b13 Fix: GPv3: Add missing keymaps
Adds missing keymaps in Grease Pencil modes. Two menus are also added which are needed to be called by keymaps to match GPv2.

**Paint Mode**
| Keymap | Operator |
| -------- | -------- |
| Shift I     | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Delete | Delete Active Keyframes (all layers) |
| Shift Ctrl M | Merge Layers |

**Edit Mode**
| Keymap | Operator |
| -------- | -------- |
| Shift I | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Ctrl M | Merge Layers |
| Shift Q | Edit Lines (overlay toggle) |
| Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) |
| Shift G | Vertex Groups |

**Sculpt Mode**
| Keymap | Operator |
| -------- | -------- |
| I | Animation (menu) |
| Shift I | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Delete | Delete Active Keyframes (all layers) |
| Shift Ctrl M | Merge Layers |
| Shift Q | Edit Lines (overlay toggle) |
| Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) |
| Y | Active Layer |
| U | Active Material |
| Ctrl C | Copy Strokes |
| Ctrl V | Paste Strokes |
| Shift Ctrl V | Paste Strokes (back) |
| Shift Alt A | Automasking (menu) |

**Weight Paint and Vertex Paint Modes**
| Keymap | Operator |
| -------- | -------- |
| I | Animation (menu) |
| Shift I | Insert Blank Keyframe |
| Alt I | Delete Animation (menu) |
| Shift Delete | Delete Active Keyframes (all layers) |
| Shift Ctrl M | Merge Layers |
| Shift Q | Edit Lines (overlay toggle) |
| Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) |
| Y | Active Layer |

Pull Request: https://projects.blender.org/blender/blender/pulls/128705
2024-10-15 11:35:57 +02:00
Campbell Barton
11e41f7276 Merge branch 'blender-v4.3-release' 2024-10-15 16:22:09 +11:00
Campbell Barton
44d0452a78 Cleanup: spelling in comments 2024-10-15 12:51:05 +11:00
Sybren A. Stüvel
975b5f4533 Anim: invert Action editor 'Show All Slots' filter flag meaning
In the Action editor header, change the "Show All Slots" filter to
become "Only Show Slot of Active Object". The default state remains
"off".

This means that any new/upgraded Action editor will show all slots in
the Action by default. I think this is a good idea, especially since
cb6ed12ef1 makes related data-blocks share
the same Action, and thus the Action will have a mixture of Object and
non-Object animation. I suspect that it'll help in understanding the new
functionality of slotted Actions when they are most visible, i.e. when
the multiple slots are all shown.

Since slotted Actions are so new, I don't think we need to add
versioning code to accomodate this change.

Pull Request: https://projects.blender.org/blender/blender/pulls/129011
2024-10-14 19:21:36 +02:00
Bastien Montagne
78a3ef1d53 Merge branch 'blender-v4.3-release' 2024-10-14 10:55:42 +02:00
Falk David
89e3ab2a45 Fix: GPv3: Error when calling add_points or remove_points
The `drawing.resize_curves` function had been renamed in
1899ea25d5 but this wasn't
updated in the strokes API.
2024-10-14 10:40:52 +02:00
Sean Kim
6ff33b7e92 Merge branch 'blender-v4.3-release' 2024-10-11 15:25:07 -07:00
Julian Eisel
d177388979 Sculpt/Paint: Tag brushes for unsaved changes for UI indication
Part of the brush assets project followups, see #116337.

Based on feedback, it seems important to indicate to the user when a brush has
unsaved changes.

There's no reliable updating mechanism we can use or hook into here, except for
RNA "update" callbacks. Brush data gets changed in many places in code, the only
way to do this seems manual tagging every time a brush property gets changed.
This PR introduces `BKE_brush_tag_unsaved_changes()` for this. I spent some time
going through all brush properties to ensure changes call the tagging function.

A known limitation with this will be that changes to dependencies won't be
indicated in the brush. E.g. Changing the texture attached to a brush won't make
the brush be indicated as changed.

The UI to indicate the changed brushes is being discussed still, see #128846.

Pull Request: https://projects.blender.org/blender/blender/pulls/128845
2024-10-11 22:08:14 +02:00
Aras Pranckevicius
7f48c931a4 Cleanup: format 2024-10-11 12:07:09 +03:00
Pratik Borhade
0b18eaf43c FIx: GPv3: Segment context menu missing
Use points context menu for segments in edit mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/128743
2024-10-11 10:05:22 +02:00
Campbell Barton
3f7e14295f Cleanup: format 2024-10-11 11:00:24 +11:00
Clément Foucault
5b70445460 Merge branch 'blender-v4.3-release'
# Conflicts:
#	scripts/addons_core/bl_pkg/bl_extension_ops.py
2024-10-10 16:21:51 +02:00
YimingWu
87f227ef7a Fix #128838: Extension: Support _universal2 suffix for Mac
Some python wheels can have `_universal2` suffixes which are built for
both intel and arm architectures. This fix takes care of that.
2024-10-10 21:15:33 +08:00
Sybren A. Stüvel
a564e678f0 Fix #128797: Custom property Data-Block Type only has Object ID Type
In the WindowManager code, use `bpy.types.ID.id_type` enum property to
get all valid ID types, instead of using a property on the `Action`
type.

Pull Request: https://projects.blender.org/blender/blender/pulls/128834
2024-10-10 14:33:31 +02:00
Campbell Barton
c6df05c471 Merge branch 'blender-v4.3-release' 2024-10-10 23:29:13 +11:00
Campbell Barton
b0fb6a1b2c Fix #128840: extension build asserts when "type" is missing
Building an extension when the manifest didn't define a "type"
would assert instead of reporting the missing field.

Return earlier when there are errors to prevent the assertion.
2024-10-10 23:28:11 +11:00
Philipp Oeser
e89cf5ecc0 Merge branch 'blender-v4.3-release' 2024-10-10 13:55:29 +02:00
Philipp Oeser
9baf082dc5 Fix #128760: NLA bake action throws error
Caused by db6113048d

Above commit was accessing action properties which are only available if
experimental baklava is enabled.
Now check for this.

Pull Request: https://projects.blender.org/blender/blender/pulls/128762
2024-10-10 13:54:58 +02:00
Philipp Oeser
58eff16cad Fix #128758: Error Message when using old Shortcut for Crease Brush
In essential brush assets, the "Crease" brush was replaced with two
crease brushes ("Crease Polish" and "Crease Sharp"), but the keymap
wasnt respecting that.

So to resolve now point Shift+C to "Crease Polish" (seems closer to what
the former "Crease" brush was.

Pull Request: https://projects.blender.org/blender/blender/pulls/128765
2024-10-10 13:54:26 +02:00
Campbell Barton
8fb258be0c Cleanup: format 2024-10-10 22:39:02 +11:00
YimingWu
4c57c171b3 Fix #128838: Extension: Support _universal2 suffix for Mac
Some python wheels can have `_universal2` suffixes which are built for
both intel and arm architectures. This fix takes care of that.
2024-10-10 19:15:27 +08:00
Campbell Barton
de0cfcba67 Merge branch 'blender-v4.3-release' 2024-10-10 12:19:47 +11:00
Germano Cavalcante
75ffda39b2 Fix #126665: Reintroduce 'Absolute Grid Snap' (now 'Absolute Increment Snap')
The 'Absolute Grid Snap' feature remains useful even alongside
'Snap to Grid', so this option is being reintroduced, partially
reverting commit f0479e915f.

Pull Request: https://projects.blender.org/blender/blender/pulls/128135
2024-10-09 22:52:28 +02:00
Philipp Oeser
866f7d7ff0 Merge branch 'blender-v4.3-release' 2024-10-09 16:10:37 +02:00
Philipp Oeser
ee3fdf4099 Fix: curves editmode operators available in pointcloud editmode
Poincloud editmode support was added in f89b32382a.
Then fd9d22ba57 added geonode operator support.
But 01ee34ebd1 & 6c25c66194 added operators not meant for
pointclouds.

To resolve, check modes more carefully.

Pull Request: https://projects.blender.org/blender/blender/pulls/128794
2024-10-09 16:10:06 +02:00
Bastien Montagne
2b72cccc85 Merge branch 'blender-v4.3-release' 2024-10-09 15:59:01 +02:00
Bastien Montagne
e2705a432a Fix #128767: Regression: Batch Rename failed to rename bones.
Regression from 8c3a3bb9a3, did not realize all items were not
necessarily actual IDs.
2024-10-09 15:57:19 +02:00
Pratik Borhade
320cf68e4b Merge branch 'blender-v4.3-release' 2024-10-09 16:55:16 +05:30
Pratik Borhade
b5c3bc5caa Fix #128759: Asset-shelf popup missing in Curves sculpt mode
`VIEW3D_AST_brush_sculpt_curves` added in wrong keymap list.

Pull Request: https://projects.blender.org/blender/blender/pulls/128779
2024-10-09 13:23:06 +02:00
Pratik Borhade
337f364f1a UI: scrolling treeview with trackpad
Invoke tree-view scroll operation for trackpad event.

Pull Request: https://projects.blender.org/blender/blender/pulls/128747
2024-10-09 13:22:23 +02:00
Philipp Oeser
927769899b Merge branch 'blender-v4.3-release' 2024-10-09 13:02:49 +02:00
Philipp Oeser
3b9a07d49a Fix #128746: SequenceCache modifier not available in dropdown for Curves
In a Curves (not Curve) object, the MeshSequenceCache modifier is not
available from the "Add Modifier" dropdown.

However, the Alembic importer adds such a modifier onto the Curves
objects it creates. It is also possible to transfer such a modifier from
another object, regardless of its type.
Thus, this seems not to be an issue of compatibility of the modifier
with the Curves object type, but an UI/UX oversight.

`BKE_object_support_modifier_type_check` already has a correct check for
this, so just adding CURVES support to the appropriate menu.

Same is true for the POINTCLOUD type, so adding that as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/128756
2024-10-09 13:02:15 +02:00
Lukas Tönne
ab75dc35ea Merge branch 'blender-v4.3-release' 2024-10-09 10:28:39 +02:00