Commit Graph

2687 Commits

Author SHA1 Message Date
Campbell Barton
41ec8a6d44 Fix errors calling tool set operators without a space
This check was added [0] but only for WM_OT_tool_set_by_brush_type.

[0]: 7cbc94d835
2024-11-04 11:55:39 +11:00
Campbell Barton
091ee2833b PyDoc: replace references to the deprecated "bgl" with "gpu"
Also correct bullet-points in gpu.state.blend_set.
2024-11-03 21:50:33 +11:00
Campbell Barton
b00550916c PyDoc: correct use of single back-ticks 2024-11-03 21:50:33 +11:00
Campbell Barton
901359abf7 Cleanup: replace doc-strings with comments for internal logic
There is no need to store text in memory for comments on functions
that aren't exposed publicly and are only of used when reading
the code.
2024-11-03 21:50:33 +11:00
Campbell Barton
ca8d00d0bb Cleanup: add doc-strings for bpy_extras.id_map_utils 2024-11-03 21:50:29 +11:00
Campbell Barton
3bcfb151c1 PyDoc: use Python's type annotation syntax for doc-strings
Replace plain-text type information with the type syntax used
for Python's type annotations as it's more concise, especially for
callbacks which often didn't include useful type information.

Note that this change only applies to inline doc-strings,
generated doc-strings from RNA need to be updated separately.

Details:

- Many minor corrections were made when "list" was incorrectly used
  instead of "sequence".
- Some type information wasn't defined in the doc-strings and has been
  added.
- Verbose type info would benefit from support for type aliases.
2024-11-03 15:44:35 +11:00
Campbell Barton
a05345e139 PyDoc: various corrections to function doc-strings
Add missing arguments, corrections & remove unchecked type info.
2024-11-02 17:48:21 +11:00
Campbell Barton
c056d03f93 Cleanup: move binary operator to line end in Python scripts 2024-11-02 15:43:26 +11:00
Sean Kim
8151105e24 Fix #129645: Sculpt color attribute popover never active
With the brush assets project, many paint tools are no longer specified
by tool. To maintain functionality, this commit inspects the brush type
instead of hardcoding against the paint tool to ensure that no matter
which tool is being used, the UI displays correctly based on the brush.

Pull Request: https://projects.blender.org/blender/blender/pulls/129654
2024-11-01 19:23:16 +01:00
Falk David
7e87da72ab Fix #129637: GPv3: Python: add_points raises exception
Introduced by 68c665ffa1.
This fix forgot to change parameters of `GreasePencilStrokePointSlice`
in `add_points`.
The fix also adds a test for `add_points` and `remove_points`.

Pull Request: https://projects.blender.org/blender/blender/pulls/129640
2024-10-31 16:22:44 +01:00
Falk David
ab3186120c Fix #129239: GPv3: Python: Vertex color is initialized as white
The default value for `FLOAT_COLOR` attributes is white. We can't
change this default easily.
This fix will initialize the attributes accessed through the high-level
python API with their expected default value. In the case of
vertex colors, this is fully transparent black.

Pull Request: https://projects.blender.org/blender/blender/pulls/129638
2024-10-31 15:37:02 +01:00
Julien Duroure
1f5d24fe0d glTF exporter: Fix some UDIM export
- Do not export tiles if no vertices in it
- fix check jpg & webp detection for udim textures
2024-10-31 15:11:51 +01:00
Julien Duroure
912c85bb9d glTF exporter: Fix #129407 - fix crash when step is != 1 and actions are not aligned
Example:
Step is 3
Action starts at 1, so the action will try to export frames 1 / 4 / 7 / 10, etc...
But full object backing is enable, and scene starts at 0.
So cached data are on frame 0 / 3 / 6 / 9 / 12, etc...

When we are trying to export the action on armature after the full bake on empty, we are trying to retrieve frame 1, but cache was on 0 / 3 / 6 / 9
2024-10-31 14:52:55 +01:00
Julien Duroure
1d108b0d77 glTF exporter: Fix Regression #128807 - avoid spaming stdout
error log will go to stderr, and others to stdout
A new parameter in operator to set the loglevel from command line bpy.ops.export_scene.gltf(loglevel=logging.INFO)
If not set from the ops, value is -1, and is set, as before, from the bpy.app.debug_value
2024-10-31 14:28:40 +01:00
Julien Duroure
c872ae4959 glTF exporter: Fix regression exporting animated camera
Was introduced bu KHR_animation_pointer
2024-10-31 14:15:24 +01:00
Julien Duroure
d723afe49f glTF exporter: Fix regression exporting emission with texture
Regression was introduced by KHR_animation_pointer
2024-10-31 14:08:22 +01:00
Julien Duroure
2c67b22bbb glTF exporter: Remove some typing
This crashes bpy as a module (not sure why)
Cf #126807
2024-10-31 14:00:15 +01:00
Julien Duroure
0b3010d84c glTF exporter: Fix #128647: Make KHR_materials_variants a not required extension
This extension is enabled, but not required for reading the file
2024-10-31 13:53:51 +01:00
Julien Duroure
fb2edb17d9 glTF exporter: fix typo in hook name
Preventing having 2 hooks with same name at different places
2024-10-31 13:44:37 +01:00
Julien Duroure
16754328f6 glTF exporter: Manage alpha when performing RGB2BW conversion
Based on what is visually done in viewport
2024-10-31 13:39:04 +01:00
Julien Duroure
080877be6b glTF exporter: Fix #129548 - Regression - Export ShapeKeys when only Armature modifier
Set a custom property (ignore at export) that can identify and differenciate:
- evaluated mesh
- geometry node with SK
2024-10-31 13:27:37 +01:00
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
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
Campbell Barton
7cbc94d835 Fix some exceptions in Python operators when poll fails 2024-10-31 18:50:03 +11: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
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
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
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