Commit Graph

2656 Commits

Author SHA1 Message Date
Campbell Barton
49242a6b68 Cleanup: remove unused "COMPAT_ENGINES" in panels
Their existence was misleading making it seem as if would hidden unless
they were listed here.
2024-10-30 12:05:25 +11:00
Campbell Barton
790fdd35b4 Fix hydra storm add-on not showing material preview
Check panels COMPAT_ENGINES contains BLENDER_EEVEE_NEXT.
2024-10-30 11:35:52 +11:00
Blastframe
7a9aab4574 Fix: Wrong Grease Pencil icons in context menu
Fix context menu using the wrong icon for Active Layer and
Grease Pencil Layer icons.

Pull Request: https://projects.blender.org/blender/blender/pulls/129450
2024-10-29 16:56:11 +01:00
Hans Goudey
ef0e53d12b Fix: Exception with "Move to Nodes" and no geometry output
Caused by a stupid mistake with the wrong return type and an
undefined value in a Python function.
2024-10-29 14:20:32 +01:00
Bastien Montagne
678e6adc52 Fix (bcon24 reported) FBX export: objects export order being unreliable.
Now always order exported objects by their names, regardless of their
source (collection, viewlayer, selection...).
2024-10-29 12:28:08 +01:00
Campbell Barton
ccaf144e6d Cleanup: compare full platform name for "darwin"
Avoid checking a shortened prefix when it's not necessary.
2024-10-29 18:09:47 +11:00
Julian Eisel
58a0b565cd Fix: Curves: Missing brush assets selector in curves sculpt mode
All sculpt and paint modes should have the brush selector asset shelf
popup in the tool settings header. For curves sculpt mode this was
missing. There's no good reason for this, probably just an oversight.
2024-10-28 18:23:43 +01:00
Julian Eisel
8b0206fa26 Fix: Grease Pencil: Brush selector shortcut missing in vertex paint mode
All sculpt and paint modes should bring up the brush selector asset
shelf popup on Shift+Spacebar. For grease pencil vertex paint mode the
shortcut was missing. I think it was added earlier, but only for the
grease pencil v2 keymap, the v3 one got merged later only.
2024-10-28 18:19:10 +01:00
Campbell Barton
005d439264 Fix industry compatible keymap keys for spreadsheet region toggle
Ctrl bracket keys weren't used for toolbar/UI region toggling.
2024-10-27 22:45:43 +11:00
Campbell Barton
e3e6dd8fdb Fix #125958: Disable/uninstall an add-on can keep its dependencies
Python wheels from extensions were not being removed after
install/uninstall in some cases - although installing an extension
afterwards that used wheels would recalculate deps & remove them.

- Installing an extension didn't include the extension in the
  compatibility-cache, causing uninstalling not to remove deps.
- Uninstalling an extension wasn't re-calculating the deps,
  leaving them as-is.

Always write the compatibility-cache after installing and uninstalling
so changes are detected & handled.
2024-10-24 20:53:07 +11:00
Campbell Barton
21457db162 Cleanup: remove deprecated typing use for extensions utility
Also replace some uses of Generator with Iterator.
2024-10-23 15:44:06 +11:00
Falk David
b05e9f7bd6 Fix #127523: Missing update when updating positions with Python
The issue was that the strokes were not using the `POLY` type and
needed to be tagged.

This adds a function `tag_positions_changed` on the `GreasePencilDrawing`
so that the high-level python API can tag the positions if
the `point.position` attibute is written to.

Pull Request: https://projects.blender.org/blender/blender/pulls/129292
2024-10-21 14:10:32 +02:00
Falk David
30fb2a9b52 Formatting 2024-10-21 12:48:18 +02:00
Falk David
071c144bcd Fix #129173: Vertex Color panel missing vertex_mode
The draw tool needs to show the `vertex_mode` in the
vertex color panel.

Pull Request: https://projects.blender.org/blender/blender/pulls/129219
2024-10-21 10:26:44 +02:00
Bastien Montagne
2e6c24c58e I18N: Enable Romanian UI translation. 2024-10-20 18:20:01 +02:00
Bastien Montagne
387502ec53 I18N: Add Lithuanian UI translation. 2024-10-20 18:05:18 +02:00
Sean Kim
c2073095c9 Fix #129116: Texture Paint Line stroke preview does not show up
Custom paint overlays (smooth stroke & line stroke) do not show up if
a specific cursor is set for the tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/129132
2024-10-18 20:20:50 +02:00
John Kiril Swenson
d5d81c5078 VSE: Switch to box select default for timeline
PR #128051 made some improvements to code by cleaning up properties and
simplifying logic.

However, the default tool in most spaces is box select. By switching to
box select default, there should be more front-facing consistency across
spaces while still retaining near-identical behavior.

This patch would fix the small bug listed in #128671 while keeping the
simplified code benefits from #128051.

Also:
- Move selection keymap items up in the Sequencer (Global) keymap so it
  is more visible (similar to Node Editor ordering).
- Split `side_of_frame` property for ctrl press keymap item into a
  separate keymap item on ctrl click for both LCS and RCS to avoid
  clashing with ctrl+drag for box selects in RCS.

Pull Request: https://projects.blender.org/blender/blender/pulls/129028
2024-10-18 05:50:09 +02:00
Campbell Barton
528df90336 Cleanup: remove use of deprecated types for extensions (#2)
Missed these in a66601ee95.
2024-10-18 10:21:03 +11:00
Campbell Barton
f4f50fa2c5 Cleanup: replace typing.Union/Option with logical OR for extensions
Also remove use of deprecated typing.Sequence.
2024-10-18 10:08:12 +11:00
Julian Eisel
41b8ee1c48 Sculpt/Paint: Change label of asset update operator in menu for clarity
From feedback: "Update Asset" sounds more like receiving a new version
of the brush, while this actually saves the changed brush to the asset
library. "Save Changes to Asset" is more clear and fits well with the
labels of other menu items in the menu.
2024-10-17 14:36:05 +02:00
Lukas Tönne
d2210df6af Fix: GPv3: Interpolate tool uses selection in paint mode
Follow-up fix for #128769.

Selection is now taken into account for interpolation tool, but should
be ignored in paint mode.

Pull Request: https://projects.blender.org/blender/blender/pulls/129150
2024-10-17 14:09:48 +02:00
Campbell Barton
a66601ee95 Cleanup: remove deprecated typing built-ins for extension logic
Deprecated since Python 3.9 but still used in many docs/examples.
2024-10-17 19:11:40 +11:00
Campbell Barton
e2862ed7ca Cleanup: rename variables handling modules loaded at startup
The term "global" isn't meaningful in this context,
use "registered" instead.
2024-10-17 15:46:42 +11:00
Campbell Barton
d9fe0bcfaf Cleanup: avoid 2x redundant lookups in BrushAssetShelf.poll 2024-10-17 13:43:47 +11:00
Campbell Barton
6d24201045 Fix error on script reload if the modules aren't found in sys.modules
While unlikely, account for modules loaded on startup not being in
`sys.modules` when reloading scripts.
2024-10-17 12:59:07 +11:00
Campbell Barton
3290e33d34 Cleanup: spelling in comments 2024-10-17 11:53:47 +11:00
notrudyyy
450aad7489 Cleanup: Fix Erase Displacement typos
Fixes multiple typos in the Erase Displacement option of the Mesh Filter tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/128745
2024-10-16 19:01:24 +02:00
Julien Duroure
665d7378c0 glTF: cleanup formating 2024-10-16 17:25:26 +02: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
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
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
Falk David
016008e097 Formatting 2024-10-15 13:04:50 +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
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
44d0452a78 Cleanup: spelling in comments 2024-10-15 12:51:05 +11: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
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
Campbell Barton
3f7e14295f Cleanup: format 2024-10-11 11:00:24 +11: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
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
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
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
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
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
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