Commit Graph

2171 Commits

Author SHA1 Message Date
Bastien Montagne
6d68f82398 Merge branch 'blender-v4.2-release' 2024-07-02 16:52:15 +02:00
Bastien Montagne
570eee1717 Debug: Add new userpref option to enforce recompute of ID usercount on filesave.
This is a workaround to allow user to keep working without loss of data
when an issue like #124049 happens.

This commit also expose again the `use_all_linked_data_direct` debug
option, no idea why that one was removed.
2024-07-02 16:46:19 +02:00
Campbell Barton
9103f9682d Merge branch 'blender-v4.2-release' 2024-07-02 17:06:40 +10:00
Campbell Barton
df6ba6d324 Fix unhandled exception refreshing outdated extensions
Changes the the extension repositories in the preferences while
update notifications were running could raise an exception.

Resolve by only calculating outdated extensions for
repositories that still exist.
2024-07-02 17:04:53 +10:00
Campbell Barton
e3d0997065 Merge branch 'blender-v4.2-release' 2024-07-02 16:19:45 +10:00
Andrej730
1f0592b3b1 Docs: corrections to bpy.utils.register_tool
- Replaced `tool` argument with `tool_cls`.
- Removed `space_type` argument that's not present in the method.

Ref: !118900
2024-07-02 16:18:08 +10:00
Campbell Barton
83ce50f2b8 Merge branch 'blender-v4.2-release' 2024-07-02 16:09:45 +10:00
Thomas Barlow
d1cff7974a Fix #108254: Infinite loop in rna_info.BuildRNAInfo(..)
When a registered class has a non-registered superclass,
rna_info.BuildRNAInfo entered an eternal loop.

The while loop in `rna_info.get_py_class_from_rna` was not mutating the
variables within the loop nor the variable in its condition, meaning it
would loop infinitely if the loop didn't exit in its first iteration.

When yielding registered classes in `subclasses_recurse`, the function
was erroneously checking if the class' superclass was registered rather
than checking the class itself, causing registered classes to be skipped
if their superclass was not also registered. If the class to be found
was skipped, the while loop would not exit in its first iteration and
would thus loop infinitely.

The while loop has been modified to iterate through each base rna type
until there is no further base type.

The `subclasses_recurse` function now correctly checks whether the
subclass is registered, not its superclass, when determining if the
subclass should be yielded.

Besides the fix, no functional changes are expected, the generated
Python API docs remain unchanged.

Ref: !108256
2024-07-02 16:03:26 +10:00
Campbell Barton
d97b7f4cd6 Merge branch 'blender-v4.2-release' 2024-07-02 15:23:11 +10:00
Campbell Barton
1322daa480 Extensions: clear search and tags when showing updates
Search and tags could prevent extensions from being displayed.
2024-07-02 15:20:25 +10:00
Campbell Barton
11b32ed48b Merge branch 'blender-v4.2-release' 2024-07-02 15:07:17 +10:00
Campbell Barton
c29d8326e0 UI: sort add-ons by name
Previously add-ons were sorted by category & name, remove the category
only sorting by name since the category is no longer displayed and
isn't part of extension meta-data. Now the add-ons are sorted by name
(case insensitive).

Details:

- Store add-ons modules sorted to avoid having to sort on every redraw.
- addon_utils.modules() now returns an iterator.
2024-07-02 15:06:14 +10:00
Campbell Barton
3b420a5a79 Merge branch 'blender-v4.2-release' 2024-07-02 12:56:02 +10:00
Campbell Barton
33fb83ae74 Fix using network shares for extensions on WIN32
- Support UNC paths.
- Normalize URL's to account for differences between browsers.
2024-07-02 12:53:00 +10:00
Campbell Barton
cabfe94014 Merge branch 'blender-v4.2-release' 2024-07-02 09:30:28 +10:00
Campbell Barton
603b833fe3 Fix error accessing remote extension repositories via file:// on WIN32
Converting the URL back to a path left a slash before the drive letter.
2024-07-02 09:27:59 +10:00
Richard Antalik
f205079f1e Fix #122251: Using industry compatible keymap with VSE emits warnings
Tweak tool keymap was empty. `_template_items_tool_select` was added to
tweak tool.

Pull Request: https://projects.blender.org/blender/blender/pulls/123200
2024-07-01 22:54:23 +02:00
Campbell Barton
fa3bfcf229 Merge branch 'blender-v4.2-release' 2024-07-01 23:34:25 +10:00
Campbell Barton
0255be9b22 Fix invalid repository paths from generated HTML
The "repository" in links from the generated HTML was only valid when
the URL did not contain a path component.
Resolve by supporting relative "repository".

This simplifies referencing the JSON from a generated HTML since
a relative link doesn't need to know the repositories absolute URL
to the destination.
2024-07-01 23:33:09 +10:00
Campbell Barton
c5dcc4f6c4 Merge branch 'blender-v4.2-release' 2024-07-01 23:00:36 +10:00
Campbell Barton
c2326a1639 Fix #123677: Incompatible extensions can be installed from disk 2024-07-01 22:57:38 +10:00
Campbell Barton
483647e1a3 Merge branch 'blender-v4.2-release' 2024-07-01 22:10:47 +10:00
Campbell Barton
7bd846ce0a Fix error including platforms in extensions HTML output 2024-07-01 22:08:34 +10:00
Campbell Barton
38582dc86a Merge branch 'blender-v4.2-release' 2024-07-01 17:26:37 +10:00
Campbell Barton
78330522d2 Fix #123877: exception showing an add-on with an invalid manifest
Extensions with a manifest that can't be parsed caused can exception
in the add-ons UI.

Account for errors loading the manifest, falling back to dummy values
& show a warning that the exceptions manifest could not be parsed.
2024-07-01 17:20:38 +10:00
Campbell Barton
4f61fb38f5 Merge branch 'blender-v4.2-release' 2024-07-01 16:39:37 +10:00
Campbell Barton
75f500ad02 Fix #123923: regression un-installing an extension
Regression in [0] which used an argument only available in Python 3.12.

[0]: 37ae9d5fc47e2842ee77a07482039d24a06784f9
2024-07-01 16:37:54 +10:00
Campbell Barton
a8402c57d2 Merge branch 'blender-v4.2-release' 2024-07-01 16:10:07 +10:00
Campbell Barton
789b7bba91 Fix #123938: error dragging extension URLs to install an extension
Regression in [0].

[0]: 989de85cf6311d8d6433d1fcda42bfeda1c1b320
2024-07-01 16:06:32 +10:00
Campbell Barton
29ad1145ac Merge branch 'blender-v4.2-release' 2024-07-01 15:59:31 +10:00
Campbell Barton
29cf0e4f8c Merge branch 'blender-v4.2-release' 2024-07-01 15:59:29 +10:00
Campbell Barton
5ca9997dfd Merge branch 'blender-v4.2-release' 2024-07-01 15:59:26 +10:00
Campbell Barton
0c54c347d8 Extensions: correct missing return
Harmless but mypy warns about this.
2024-07-01 15:57:42 +10:00
Campbell Barton
2d7b41c8c2 Extensions: Enforce copyright format "YYYY Name" or "YYYY-YYYY Name"
Based on !123846 with additional checks.

Co-authored-by: Mahid Sheikh <standingpad-animations@noreply.localhost>
2024-07-01 15:54:20 +10:00
Campbell Barton
5629b09ccf Extensions: update makefile for linters 2024-07-01 15:30:34 +10:00
Campbell Barton
14a2e933f4 Merge branch 'blender-v4.2-release' 2024-07-01 15:16:48 +10:00
Campbell Barton
99d072e518 Merge branch 'blender-v4.2-release' 2024-07-01 15:16:45 +10:00
Campbell Barton
7447f6415e Merge branch 'blender-v4.2-release' 2024-07-01 15:16:39 +10:00
Campbell Barton
67ddb0e1a5 Extensions: detect external changes on startup & loading preferences
Changes to an extensions manifest weren't accounted for.
This was particularly a problem for "System" extensions which aren't
intended to be managed inside Blender however the problem existed for
any changes made outside of Blender.

Now enabled extensions are checked on startup to ensure:

- They are compatible with Blender.
- The Python wheels are synchronized.

Resolves #123645.

Details:

- Any extension incompatibilities prevent the add-on being enabled
  with a message printing the reason for it being disabled.

- Incompatible add-ons are kept enabled in the preferences to avoid
  loosing their own preferences and allow for an upgrade to restore
  compatibility.

- To avoid slowing down Blender's startup:

  - Checks are skipped when no extensions are enabled
    (as is the case for `--factory-startup` & running tests).
  - Compatibility data is cached so in common case,
    the cache is loaded and all enabled extensions `stat` their
    manifests to detect changes without having to parse them.
  - The cache is re-generated if any extensions change or the
    Blender/Python version changes.

- Compatibility data is updated:

  - On startup (when needed).
  - On an explicit "Refresh Local"
    (mainly for developers who may edit the manifest).
  - When refreshing extensions after install/uninstall etc.
    since an incompatible extensions may become compatible
    after an update.
  - When reloading preferences.

- Additional info is shown when the `--debug-python` is enabled,
  if there are ever issues with the extension compatibility cache
  generation not working as expected.

- The behavior for Python wheels has changed so they are only setup
  when the extension is enabled. This was done to simplify startup
  checks and has the benefit that an installed but disabled extension
  never runs code - as the ability to install wheels means it could
  have been imported from other scripts. It also means users can disable
  an extension to avoid wheel version conflicts.

  This does add the complication however that enabling add-on which is
  an extension must first ensure it's wheels are setup.
  See `addon_utils.extensions_refresh(..)`.

See code-comments for further details.
2024-07-01 15:08:14 +10:00
Campbell Barton
24d8694fe3 Fix regression installing extensions via the command line
Error in [0] meant installing multiple extensions with `--enabled`
would only enable the last extension.

[0]: 176864ab03a19db035b17849cf859c167ae8f366
2024-07-01 13:55:20 +10:00
Campbell Barton
350b8047c6 Extensions: move the wheel_manager out of the extensions add-on
Move wheel management to a generic private module, prepare addon_utils
to handle changes to repositories on load (needed to resolve #123645).
2024-07-01 10:07:16 +10:00
Campbell Barton
72e5254669 Merge branch 'blender-v4.2-release' 2024-06-29 22:15:34 +10:00
Andrej730
87844ae24d Fix bl_text_utils/external_editor.py broken __all__
Ref: !123910
2024-06-29 22:14:37 +10:00
Julien Duroure
34c325308f Merge branch 'blender-v4.2-release' 2024-06-29 09:23:58 +02:00
Julien Duroure
38237fe414 glTF exporter: Avoid crash with skinned lattices
We don't export lattices, so don't try to get skin data from it
2024-06-29 09:22:26 +02:00
Julien Duroure
75c9064a50 Merge branch 'blender-v4.2-release' 2024-06-29 09:17:17 +02:00
Julien Duroure
77a382ba2f glTF exporter: call hook for each action, including the active one 2024-06-29 09:16:02 +02:00
Richard Antalik
c8b736659b Merge branch 'blender-v4.2-release' 2024-06-28 17:12:57 +02:00
Richard Antalik
1a887c06d9 Fix #123543: Delete retiming keys deletes strip
Delete operator was shared for strips and retiming keys, which was not
ideal. Operator logic relied on invoke function setting proper context
which was also hidden from users.

Split these operators and make dedicated operators for removing retiming
keys - `SEQUENCER_OT_retiming_key_delete`.
This operator returns `OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH` if
executed in non-retiming context, or no key is selected.

Pull Request: https://projects.blender.org/blender/blender/pulls/123767
2024-06-28 17:06:44 +02:00
Campbell Barton
7f2d0f7b14 Merge branch 'blender-v4.2-release' 2024-06-28 23:10:14 +10:00