Commit Graph

3276 Commits

Author SHA1 Message Date
Julien Duroure
e04ac909b2 glTF: Set min Blender version 4.3
Because Draco lib is avaiable for bpy as a module only since 4.3
2024-10-31 13:18:08 +01:00
Julien Duroure
47ca37f961 Merge branch 'blender-v4.3-release' 2024-10-31 13:14:40 +01:00
Julien Duroure
b25da97fef glTF: Fix #113469: enable Draco compression for bpy as a py module
By looking in correct directory for bpy module
This was of course already available for Blender itself since few years
2024-10-31 13:13:19 +01:00
Laurynas Duburas
229e0a8cae Curves: Convert handle types when transforming
Converts Bezier handle types when transforming starts.
If single BEZIER_HANDLE_AUTO handle is transformed it becomes
BEZIER_HANDLE_ALIGN. If single BEZIER_HANDLE_VECTOR handle is
transformed it becomes BEZIER_HANDLE_FREE.

https://docs.blender.org/manual/en/latest/modeling/curves/structure.html

Rel #105038

Pull Request: https://projects.blender.org/blender/blender/pulls/128638
2024-10-31 10:42:24 +01:00
Campbell Barton
c9e5c456d0 Merge branch 'blender-v4.3-release' 2024-10-31 18:52:21 +11:00
Campbell Barton
7cbc94d835 Fix some exceptions in Python operators when poll fails 2024-10-31 18:50:03 +11:00
Hans Goudey
08a9c8b786 Merge branch 'blender-v4.3-release' 2024-10-30 17:41:08 +01:00
Bastien Montagne
1dbe94c8ac RNA: Make the PointerRNA struct non-trivial.
For now, PointerRNA is made non-trivial by giving explicit default
values to its members.

Besides of BPY python binding code, the change is relatively trivial.
The main change (besides the creation/deletion part) is the replacement
of `memset` by zero-initialized assignment (using `{}`).

makesrna required changes are quite small too.

The big piece of this PR is the refactor of the BPY RNA code.

It essentially brings back allocation and deletion of the BPy_StructRNA,
BPy_Pointer etc. python objects into 'cannonical process', using `__new__`,
and `__init__` callbacks (and there matching CAPI functions).

Existing code was doing very low-level manipulations to create these
data, which is not really easy to understand, and AFAICT incompatible
with handling C++ data that needs to be constructed and destructed.

Unfortunately, similar change in destruction code (using `__del__` and
matching `tp_finalize` CAPI callback) is not possible, because of technical
low-level implementation details in CPython (see [1] for details).

`std::optional` pointer management is used to encapsulate PointerRNA
data. This allows to keep control on _when_ actual RNA creation is done,
and to have a safe destruction in `tp_dealloc` callbacks.

Note that a critical change in Blender's Python API will be that classes
inherinting from `bpy_struct` etc. will now have to properly call the
base class `__new__` and/or `__init__`if they define them.

Implements #122431.

[1] https://discuss.python.org/t/cpython-usage-of-tp-finalize-in-c-defined-static-types-with-no-custom-tp-dealloc/64100
2024-10-30 15:08:37 +01:00
Casey Bianco-Davis
e163cc1fe0 Fix: GPv3: Do not open menu with Ctrl J
This makes it so that the `Ctrl J` keybind will run the join operator.

As there are only 2 modes and the other one already has a keybind it does not make sense to open the menu.

This matches Blender 4.2.

Pull Request: https://projects.blender.org/blender/blender/pulls/129352
2024-10-30 09:00:59 +01:00
Campbell Barton
bc02853c29 Merge branch 'blender-v4.3-release' 2024-10-30 15:41:00 +11:00
Campbell Barton
c5362d76ff Merge branch 'blender-v4.3-release' 2024-10-30 15:40:57 +11:00
Campbell Barton
a46a557e6a UI: replace "Extension" with "Add-on" for enable/disable operators
This operator deals specifically with add-ons, using the term extensions
is misleading as it works for legacy (non-extension) add-ons and
extensions can also be themes.
2024-10-30 15:20:16 +11:00
Campbell Barton
6ab0efad41 Cleanup: defer import until needed 2024-10-30 15:16:25 +11:00
Campbell Barton
15d6ce9d45 Merge branch 'blender-v4.3-release' 2024-10-30 13:23:27 +11:00
Campbell Barton
03fd1a97c1 Merge branch 'blender-v4.3-release' 2024-10-30 13:23:24 +11:00
Campbell Barton
11dd239b9c Merge branch 'blender-v4.3-release' 2024-10-30 13:23:21 +11:00
Campbell Barton
299a124405 Merge branch 'blender-v4.3-release' 2024-10-30 13:23:18 +11:00
Campbell Barton
d9b7359609 Cleanup: remove unused engines Game & Clay 2024-10-30 13:20:45 +11:00
Campbell Barton
8960285921 Cleanup: remove BLENDER_EEVEE from Blender's panels 2024-10-30 13:20:01 +11:00
Campbell Barton
f81dcbb67e Cleanup: remove BLENDER_EEVEE checks
Since the engine has been removed there is no need to check for it.
2024-10-30 13:20:00 +11:00
Campbell Barton
e10b0b3449 Cleanup: remove unused EEVEE panels
Besides being unused, some contained errors and would not have worked
if used.
2024-10-30 13:19:59 +11:00
Campbell Barton
14b180f7ee Merge branch 'blender-v4.3-release' 2024-10-30 12:06:20 +11:00
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
721e222b72 Merge branch 'blender-v4.3-release' 2024-10-30 11:43:45 +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
Weizhen Huang
81590dab5e Merge branch 'blender-v4.3-release' 2024-10-29 18:01:41 +01:00
Julian Eisel
f49d0390a1 UI: Add asset browser option to sort by catalogs, new default
So far asset browsers always sorted assets by name, which resulted in
barely related assets being placed together, and related assets being
scattered. This can make navigating assets tedious, and introduces a lot
of visual noise because of scattered preview image styles.

Related assets are typically put into common asset catalogs, and related
catalogs are typically organized close to each other in the catalog
hierarchy. This makes catalogs a better characteristic to sort by,
solving the mentioned issues.

For asset shelves sorting by catalogs was introduced in 471378c666. This
PR exposes this feature to the asset browser, by introducing a new
option to sort either by name or by catalog. The new default is sorting
by catalog. Within a single catalog, assets are still sorted alphabetically.

Pull Request: https://projects.blender.org/blender/blender/pulls/129480
2024-10-29 16:58:49 +01: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
Christoph Lendenfeld
2fb0847dd1 Fix #129385: Bake Action operator not working with slots
This fixes the issue by traversing the new data structure for actions.
* When a slot is assigned, the action is baked into the slot.
* if no slot is assigned, it creates a new slot and bakes into that. However since no slot was assigned, the animation will be static.

Pull Request: https://projects.blender.org/blender/blender/pulls/129525
2024-10-29 16:39:10 +01:00
Hans Goudey
f5d25da4a4 Merge branch 'blender-v4.3-release' 2024-10-29 14:22:36 +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
e0f51d4e49 Merge branch 'blender-v4.3-release' 2024-10-29 12:28:49 +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
88cac9b3ea Merge branch 'blender-v4.3-release' 2024-10-29 18:10:38 +11: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
Sean Kim
e27530e4a2 Merge branch 'blender-v4.3-release' 2024-10-28 14:59:17 -07: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
88b76bfd1c Merge branch 'blender-v4.3-release' 2024-10-27 22:49:20 +11: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
1cf7781596 Cleanup: quiet Python warnings from ruff 2024-10-27 22:35:58 +11:00
Campbell Barton
f3ae90ec96 Cleanup: remove unused function, unused import 2024-10-27 22:35:55 +11:00
Campbell Barton
4548c1455f Merge branch 'blender-v4.3-release' 2024-10-25 08:03:30 +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
b874e5d2ab Merge branch 'blender-v4.3-release' 2024-10-23 15:55:01 +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
Campbell Barton
a0453ab87a Cleanup: update use of typing in for Python scripts 2024-10-23 12:48:09 +11:00
Falk David
3075bd3f2c Merge branch 'blender-v4.3-release' 2024-10-21 14:12:40 +02: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
dd3e338c79 Formatting 2024-10-21 12:50:09 +02:00