342 Commits

Author SHA1 Message Date
Campbell Barton
6c1375513f Docs: correct comment 2025-10-17 15:09:07 +11:00
Campbell Barton
688c389e1a Fix #148051: Duplicate wheels when extension build using "paths"
Extension manifests defining both wheels and a literal paths included
wheels in the ZIP file twice.

Ref !148247
2025-10-17 13:59:52 +11:00
Damien Picard
ddbc6ed858 I18n: Allow translation of some messages using string formatting
- Add `iface_` translation functions and `translate=False` to a few UI
  elements.
- Add `rpt_` translation functions to a few reports.
2025-09-12 18:30:56 +02:00
luz paz
072f956ce0 Cleanup: Fix typos in scripts subdirectory
Fix spellings from comment and string
Found via codespell

Pull Request: https://projects.blender.org/blender/blender/pulls/145834
2025-09-11 11:29:06 +02:00
Campbell Barton
729b76f454 Cleanup: use str.format to format strings in Python
Also replace redundant `{!s}` with `{:s}`.
2025-08-12 10:21:38 +10:00
Campbell Barton
2c27d2be54 Cleanup: grammar corrections, minor improvements to wording 2025-08-01 21:41:24 +10:00
Aaron Carlisle
60bd15ca40 Core: Add-ons: Display Maintainer as "Blender Foundation"
The author field is displayed in the UI as "Maintainer",
most of the original authors are no longer active or are part of the foundation.
Since the core add-ons are maintained the same as the rest of Blender they should be shown accordingly.

The exceptions here are the GLTF and Hydra add-ons; these Khronos Group and AMD are included as maintainers.

The orginal author field is preserved in the chance the add-on looses it's "core" status.

Pull Request: https://projects.blender.org/blender/blender/pulls/140690
2025-07-26 03:42:15 +02:00
Campbell Barton
0442a9fe0a Extensions: clarify the identifiers must "Python" id's in the error
Without this, it's not clear what a "valid identifier" means,
ref: #136517.
2025-07-24 18:29:36 +10:00
Campbell Barton
eee549f882 Docs: add readme for extensions
This intends to give an overview of the extensions implementation.

Co-authored-by: Sybren A. Stüvel <sybren@blender.org>

Ref !134785
2025-07-17 03:20:16 +00:00
Campbell Barton
989af38c93 Docs: add some code-comments regarding the default exclusions 2025-07-17 13:11:43 +10:00
Nika Kutsniashvili
169dbdd60f Extensions: exclude backup blend files when building an extension
Ref !142091
2025-07-17 13:11:29 +10:00
Campbell Barton
d15e7b17aa Fix #142009: Extensions/Addon Tags not showing (property not found)
Changes to the Python API [0] broke the extension tags popover
which relied on RNA properties also having ID property access.

Replace the ID property based tags with a collection.

[0]: 7276b2009a
2025-07-16 13:29:42 +00:00
Campbell Barton
bf7dd85818 Cleanup: remove redundant imports 2025-07-16 23:19:30 +10:00
Campbell Barton
19ee3932c3 Fix #141948: No error on arbitrary assignments to PropertyGroup
Declare `__slots__` to prevent arbitrary assignment.
2025-07-16 17:44:06 +10:00
Campbell Barton
4127f5c47c Extensions: suppress errors printed because of missing directories
When dropping an extension onto Blender, the URL lookup would print
errors to the STDOUT if a repository directory was missing.

While this didn't break installation, these kinds of errors should
only be shown when the directory is expected to exist.

The issue was raised in #141212.
2025-07-03 18:21:16 +10:00
Campbell Barton
e0d2a0bc1a Fix URL's in extension errors accessing remote data
The base URL was used when reporting errors accessing a URL,
use the full URL being accessed instead since anything else
is misleading, the full URL is needed to troubleshoot issues.
2025-07-03 18:21:16 +10:00
Damien Picard
33f31f1842 I18n: Translate a few messages
I18n: Translate a few messages

- Translate add-on types in the user preferences.
- Translate a report which uses formatting.
- Do not translate scene names in `sequencer.scene_strip_add` operator
  UI.
- Do translate the type of new scene in
  `sequencer.scene_strip_add_new` operator.
- Translate Half and Float image format color depth enum items.
- Translate Mix node header with non-color data types.
- Translate sequencer modifiers' names if data translation is enabled.

Most issues reported by Ye Gui in #43295.

Pull Request: https://projects.blender.org/blender/blender/pulls/141145
2025-06-30 11:12:48 +02:00
Damien Picard
0bd797a433 I18n: Allow translation of a few reports using formatting
Reports whose message uses string formatting needs to be first
translated, then formatted. Also in one instance, use rpt_() instead
of iface_().
2025-06-16 12:39:02 +02:00
Hans Goudey
91803e130f Cleanup: Grammar: Fix uses of "for e.g."
e.g. stands for "exempli gratia" in Latin which means "for example".
The best way to make sure it makes sense when writing is to just expand
it to "for example". In these cases where the text was "for e.g.", that
leaves us with "for for example" which makes no sense. This commit fixes
all 110 cases, mostly just just replacing the words with "for example",
but also restructuring the text a bit more in a few cases, mostly by
moving "e.g." to the beginning of a list in parentheses.

Pull Request: https://projects.blender.org/blender/blender/pulls/139596
2025-05-29 21:21:18 +02:00
Hans Goudey
5747f839e8 Cleanup: Grammar: Fix uses of "it's own" 2025-05-29 14:41:20 -04:00
Campbell Barton
5e61fbe1c1 Cleanup: correct subtype for extensions operators
Use DIR_PATH for directories.
2025-04-25 10:25:42 +10:00
Campbell Barton
ab5875b2d5 Fix #135979: Extensions refresh does nothing for local repositories
Support refreshing the active repository for "local" repositories.

Co-authored-by: Nika Kutsniashvili <nickberckley@gmail.com>
2025-04-10 15:44:38 +10:00
YimingWu
68a0e68bcd Fix #135999: Extensions: Remove emails in bl_info['author']
Previously when an addon is expanded on the UI, the "Maintainer" string
would be cut short until a `<` character, to prevent showing e-mail on the
UI, however there could be more than one person/email entries in there
so to prevent cutting short the string, now we use regex to take out the
email part only, so full maintainer string is displayed.

Pull Request: https://projects.blender.org/blender/blender/pulls/136031
2025-03-24 07:35:44 +01:00
Campbell Barton
bf3297aefd Correct error accessing current tags in last commit 2025-03-21 16:30:30 +11:00
Campbell Barton
9789dc8426 Fix #132636: Showing updates doesn't show available theme updates
When updates are available, clicking on the button in the status bar
was only showing "Add-on" updates.

Restore the ability to show "All" extension types which is
set when showing updates.
2025-03-21 16:00:33 +11:00
Campbell Barton
302532921f Docs: add docs & code comments for extensions 2025-03-04 15:58:21 +11:00
Campbell Barton
57abd173bb Extensions: remove unused operators
Remove:
- EXTENSIONS_OT_dummy_progress it was mainly useful for development.
- EXTENSIONS_OT_package_enable_not_installed as it's no longer used.
2025-02-26 16:16:54 +11:00
Campbell Barton
900eed683f Extensions: add progress test to "test_cli"
Add a low level test that progress reporting works as expected in
preparation for removing the Blender operator outputting dummy progress.
2025-02-26 16:10:04 +11:00
Campbell Barton
9a11291eea Extensions: add "help" target for the makefile 2025-02-26 15:24:44 +11:00
Campbell Barton
89251ca11e Cleanup: remove "pep8" target from extensions makefile
Also remove file exclusions that no longer exist.
2025-02-26 15:14:05 +11:00
Campbell Barton
fdb8bc837f Cleanup: remove redundant assignment in extensions file dropping logic
The EXTENSIONS_OT_package_install_files instance had its _drop_variables
was temporarily set to True before being storing the extension values.

This value was never read so the assignment can be removed.
2025-02-26 14:22:06 +11:00
Campbell Barton
1ed27184c1 Cleanup: correct Python type hint
The `mypy --strict` command I used for checking wasn't reporting this.
Thanks to Sybren for pointing it out.
2025-02-26 10:53:40 +11:00
Campbell Barton
cd9156bb32 Extensions: use dynamically created link to the manual
The literal URL was used before extensions was included in a release.
2025-02-25 15:14:10 +11:00
Campbell Barton
07340e1093 Docs: add code-comments to clarify bad-level include & developer only UI 2025-02-12 10:59:16 +11:00
Campbell Barton
e9dd4853f6 Fix #131947: Error closing prefs while installing extensions on WIN32
Using `signal.SIGINT` to send a signal to a sub-process isn't supported
on WIN32, replace with `signal.CTRL_BREAK_EVENT`.
2025-02-07 23:07:30 +11:00
Campbell Barton
fb3fe458bf Extensions: forward any errors setting up wheels to reports
When actions on extensions failed setup extensions, errors weren't
forwarded to the user and were only visible in the terminal.
2025-02-07 20:30:02 +11:00
Pablo Vazquez
6ea8297477 Extensions: Quick access to add-on folder
When developing and testing add-ons it can be useful to get to the
folder containing such add-on.

When Developer Extras is enabled, show a folder icon next to the
extension's path to quickly open it using the system file browser.

Also display it in the list of duplicate add-ons, if any, so user can
access them more conveniently.

Pull Request: https://projects.blender.org/blender/blender/pulls/128474
2025-01-30 11:18:53 +01:00
Campbell Barton
89d51c7535 Extensions: add an error when building an add-on without an init file
- Add a check that the file list includes an `__init__.*` path.
- Normalize paths so they can can be compared with string literals.
2025-01-23 15:28:02 +11:00
Campbell Barton
104c655fb7 Refactor: adjust the URL/file-system data iterators for extensions
The logic to generalize over downloading a URL or reading data from
the file-system included static values in the iterator along with the
data being read - so the caller could access the total expected size of
the data being read. While this worked, the result didn't read well.

Now these iterators yield the data being read, a new type has been
added for the caller to read the size hint from.

Also correct invalid doc-string.
2025-01-07 17:51:04 +11:00
Campbell Barton
2f309c10c5 Cleanup: replace Generator type with Iterator where appropriate 2025-01-07 10:10:25 +11:00
Campbell Barton
8a9bdeb943 Extensions: suppress resource leak warning on WIN32
Accessing the internal extensions command would warn that the processes
stdout wasn't closed on completion. While it's harmless at the moment,
ensure it's closed using a context manager.
2025-01-04 19:52:18 +11:00
Campbell Barton
d63dc070ef Fix error enabling extensions with an empty wheel list
Regression in [0] caused extensions with an empty wheel list
to raise an unhandled exception when extracting the Python
version from the wheel list.

Besides resolving this error, account for errors using the wheel
list since it isn't type checked in this code-path.

[0]: cfc10b0232565642afbfdc5a867f027640ce8274
2024-12-02 12:34:31 +11:00
Campbell Barton
b295fc9a9c Extensions: use replace exists with lexists to check a path can be used
Without this, a broken symbolic-link wasn't removed, causing renaming
to fail.
2024-11-29 13:01:03 +11:00
Campbell Barton
5fa0be491e Extensions: suppress noisy prints for extension wheel filtering
These messages could flood the output even when extension installation
succeeded. Only show them when Python debugging is enabled.
2024-11-29 10:27:03 +11:00
Campbell Barton
00255b9421 Correct error printing error in f03fba614d 2024-11-29 10:26:57 +11:00
Campbell Barton
f03fba614d Fix #130211: Unhandled error installing extensions when renaming fails
Add error handling for rare but possible failures on installation.

- Account for the destination extension directory being a file.
- Handle the exception if renaming the temporary directory fails.
2024-11-29 09:56:08 +11:00
Campbell Barton
76f9a08963 Fix failure to reinstall an extension uninstalling the extension
When an extension could could be removed but it's directory could be
renamed, the install operation would fail anyway.

Resolve by completing the installation when the directory can be moved.

Report as part of #129884.
2024-11-28 21:28:30 +11:00
Campbell Barton
d9891aa6ad Fix #130561: incorrect Python compatibility checks for wheels
Regression in [0] caused wheels with an older Python version
that used CPython's stable ABI to be considered incompatible.

Resolve using the stable ABI for version checks.

[0]: cfc10b0232565642afbfdc5a867f027640ce8274
2024-11-27 15:44:58 +11:00
Campbell Barton
093cb8bf43 Extensions: fix building packages containing macos universal wheels 2024-11-26 17:32:11 +11:00
Campbell Barton
64b9dbe198 Tests: correct hard coded version string in extensions test 2024-11-26 17:19:52 +11:00