Commit Graph

2697 Commits

Author SHA1 Message Date
casey bianco-davis
a114534295 Fix #121233: GPv3: Primitives: Add missing confirm action and ability to pan viewport.
This adds `MMB+shift`/`MMB+Alt` for panning, while keeping `MMB` to confirm.

Pull Request: https://projects.blender.org/blender/blender/pulls/122813
2024-11-07 12:00:29 +01:00
Campbell Barton
a3a3dda563 Extensions: support for filtering based on Python versions
Support multiple extensions with different Python versions in a similar
way to how "platforms" are handled now.

This will be needed when Blender upgrades to a newer version of Python
so extensions which have a binary dependency on Python 3.11 don't
attempt to install in a Blender built with a newer Python version.

Details:

- Extensions from incompatible Python versions are not listed.
- Python versions are extracted from wheel names.
- An extension may include wheels for multiple Python versions,
  only the compatible wheels will be installed.
- Links may include a "python_versions" field which is checked
  when dropping into Blender.
- JSON generated by the "server-generate" command include the:
  "python_versions" field for extensions that include wheels.
- The "python_versions" field is optional, when omitted no version
  checks are performed.

Also correct watch_test make target.

Ref #128750.
2024-11-07 18:16:11 +11:00
Campbell Barton
3d76e43e4a Extensions: exclude "wheels" from the static JSON package listing
While relatively harmless, it's unnecessary bloat.
2024-11-06 11:47:51 +11:00
Campbell Barton
6ccbafc5dc Cleanup: spelling in comments 2024-11-06 10:49:51 +11:00
Campbell Barton
4210a4f1cf Fix error keymap conflict operator
Detecting conflicts was failing because of an undefined function call &
an unknown "Timeline" keymap in the keymap hierarchy.
2024-11-06 10:49:41 +11:00
Julian Eisel
5afee98ad9 Fix: Unsaved changes label not showing up for essentials brushes
The label was hidden explicitly when saving changes wouldn't be
possible. But this was done for an earlier design iteration where there
would be a button to save changes, not just a label as indicator. The
indicator should always be shown when applicable.
2024-11-05 18:35:09 +01:00
YimingWu
334e9be8f4 Fix #129819: GPv3: Context menu for all paint tools
Previously the `W` menu was only available for brush tools (brush and
eraser), it should be available to all tools, thus putting the key map
registering function into `km_grease_pencil_paint_mode`.

Pull Request: https://projects.blender.org/blender/blender/pulls/129837
2024-11-05 10:36:21 +01:00
Christoph Lendenfeld
be54e36333 Fix #125816: Clear constraint while action baking not doing visual keying
When doing action baking, the option "Clear Constraints" mentions
it's doing visual keying while not actually using that option.
Just fixing the description, even though a better solution
would be to revisit the design of the options to see if they
even make sense in some configurations.

Pull Request: https://projects.blender.org/blender/blender/pulls/129052
2024-11-05 09:41:29 +01:00
Jeroen Bakker
ca1c06e8c4 Vulkan: Hide behind developer extras
Vulkan backend selection will be hidden behind developer extras. There
are some issues which would not be inviting for users to start testing.

- Some basic functionality are not working (object selection, depth
  testing)
- NVIDIA UI artifacts are annoying and unsure where the error is.
- AMD artifacts
- Memory leaks

The backend will still be part of Blender 4.3 only hidden behind an
additional flag.

Ref: #129265, #129262, #127225, #128624, #127768, #127223
Pull Request: https://projects.blender.org/blender/blender/pulls/129799
2024-11-05 08:06:42 +01:00
Philipp Oeser
adac5c97f0 Fix #129784: GPv3: Non-functiona Trim tool in menus
Accidentally added in d70b10dcd4 and moved in dc652aeedb, the
`GREASE_PENCIL_OT_stroke_trim` operator is meant for usage in draw mode
(as the Cutter tool), but not in editmode. It is not the same as the
GPv2 Trim operator, see 4fbef3dc6b

To resolve, remove this from the menu again.

Pull Request: https://projects.blender.org/blender/blender/pulls/129805
2024-11-04 17:00:05 +01:00
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