When syncing in the background the UI could refresh immediately
before clicking making it possible for the user to install the wrong
extension. Since install also enables the extension, it meant it was
too easy to accidentally run untrusted code.
Disable install/upgrade while sync runs.
Also tweak text alignment and use round brackets for "(disabled)"
extensions.
Use a per-extension menu so extra functionality can be accessed from
one place.
- The install/upgrade button remains top-level.
- "Uninstall" and "Visit Website" have been moved into the menu.
- Theme extensions can be set from the menu.
- Installed add-on extensions have a "View Details" menu item
to switch to the add-ons view (useful to access preferences).
Based on design by Pablo & Dalai.
Co-authored-by: Pablo Vazquez <pablo@blender.org>
Co-authored-by: Dalai Felinto <dalai@blender.org>
- Use line separator over box instead of separate boxes.
- Format web-links with a label, then the button instead
of positioning the buttons side-by-side.
Changes by Brecht with minor edits (see !123420).
Co-authored-by: Brecht Van Lommel <brecht@blender.org>
Add back the "Add-ons" preferences, removing add-on logic from
extensions.
- Add support for filtering add-ons by tags
(separate from extension tags).
- Tags now respect the "Only Enabled" option.
- Remove the ability to enable/disable add-ons from extensions.
- Remove add-on preferences from extensions.
- Remove "Legacy" & "Core" prefix from add-on names.
- Remove "Show Legacy Add-ons" filtering option.
Implements design task #122735.
Details:
- Add-on names and descriptions are no longer translated,
since it's impractical to translate text which is mostly
maintained outside of Blender.
- Extensions names have a `[disabled]` suffix when disabled so it's
possible to identify installed but disabled extensions.
- The add-on "type" is shown in the details,
so it's possible to tell the difference between an extension,
a core add-on & a legacy user add-on.
- Icons are also used to differentiate the add-on type.
- User add-on's must be uninstalled from the add-ons section
(matching 4.1 behavior).
- Simplify logic for filtering tags, move into a function.
When installing from disk, include remote repositories in the list.
- Works with drag & drop from file system.
- This is the only way to "downgrade" an extensions.
Extensions in remote repositories that have no remote entries (orphans)
are now listed in the UI and the "list" sub-command.
Required for installing into remote repositories from disk (see #122302)
Details:
- Consistent ordering (local, remote) arguments.
- Use zip(..., strict=True) when sequences are expected to be aligned.
Dropping an extension URL for an incompatible package displayed the
"Unknown Repository" dialog.
Resolve by detecting the case of an unknown package being dropped from
a known repository. Noting the package may not be compatible.
- Add an option to build a separate package for each platform, this is
useful to produce smaller packages when large wheels are included.
- Add a reserved field: "[build.generated]" to the manifest when
splitting by platform which overrides the root-level platform
when it exists.
The new extension system introduces tags, similar to categories from
legacy add-ons, and permissions. A hardcoded list is supported for
each, available in the docs:
- https://docs.blender.org/manual/en/dev/advanced/extensions/tags.html
- https://developer.blender.org/docs/features/extensions/schema/
This change allows extraction of these new metadata to the translation
files.
In order to disambiguate the new messages, tags use the new "Script"
translation context. Permissions are lower case, so there is a low
risk of collision, and they use the default context.
While the tags are defined per-platform, with extensions.blender.org
being the only one available currently, they are extracted as a single
list.
Pull Request: https://projects.blender.org/blender/blender/pulls/123150
This was only being used for a single debugging option,
additional developer reports are now used when enabling
the extensions debugging option (under experimental).
Run each update as a separate job, previously updates for each
repository was split into a separate job however that would only
use parallel connections with multiple online repositories which
isn't used by default. Currently the connection limit is hard-coded but
will be made into a preference.
The internal API call to refresh remote data wasn't returning
the resulting data, making it inconvenient to refresh & access
remote meta-data from a single repository.
- Fix an unhandled exception listing a repository with no remote data.
- Exclude dot-files from being listed when generating a repository.
- Fix missing import (in an unlikely corner case) when accessing
tags before the repository data was initialized.
- Fix refresh refreshing the remote not updating the
internal remote meta-data.
- Suppress warnings in tests caused by default repositories
(now removed before resting).
Extract
- Cycles denoiser enum.
- Extensions user preferences UI.
- Node operator poll message from new node function.
Improve
- Split "(Enabled|Disabled) on startup, overriding the preference."
into two messages.
Disambiguate
- "Add" when describing the action of adding something should use the
Operator context.
- "Dimensions", in noise textures.
- "Transform" as a noun, the matrix transform type of Geometry Nodes,
as opposed to the verb to move things in space.
- "Parent" as a noun or verb (the parent of an object, to parent an
object to another).
Some issues reported by Satoshi Yamasaki, deathblood, and Gabriel Gazzán.
Pull Request: https://projects.blender.org/blender/blender/pulls/122969
Changes to the remote repository JSON format hadn't been properly
accounted for, a quick-fix was left in that converted the JSON
package listing into a dictionary as it was accessed (every redraw).
Update the behavior to perform the conversion when loading the data
from the JSON. This is also needed for multi platform & blender-version
support.
Prevent non-compliant data in remote repositories from causing errors
in Blender's interface.
Move from a dictionary to a named-tuple which uses normalized values.
The bl_info dictionary is deprecated for most extensions, but it is
still used for core add-ons and since Node Wrangler is now built-in,
it should be marked as official.
The reason for this change is actually that it enables translation of
the Node Wrangler UI, because add-ons below official support level
were never considered for translation.
-----
The reason only OFFICIAL add-ons are translated is that they are enabled [here](4f36fb1afe/scripts/modules/bl_i18n_utils/bl_extract_messages.py (L1052)) during message extraction.
Pull Request: https://projects.blender.org/blender/blender/pulls/123043
Previously these were shown as missing add-ons, since they have been
intentionally removed, remove them as part of versioning instead
of showing them as "Missing Add-ons". This is especially important
for X3D & STL which were enabled by default which meant any user
loading 4.1 preferences would have them shown as missing add-ons.
Local repositories no longer convert manifest files into a JSON file
(that matched the format of the remote repositories JSON data).
Instead the data is loaded directly from the manifest files.
This is necessary to support read-only "System" repositories.
Use a class to generalize loading from both data sources to simplify the
implementation which was previously inlined.
This fixes an error where stale data from the manifests was
sometimes used because the generated JSON was considered up to date.
- "Show the result of running commands in the main interface...": add
punctuation.
- "Re-Installed" -> "Reinstalled" seems more common.
- "increase_" and "decrease_subdivision" in the Grease Pencil
modal...: use title case instead of snake case for label.
- "Use a automatic number..." -> "an", typo.
- "... points,{} splines": missing space.
- "End Frame is larger than Start Frame": wrong order in error message.
- "Approximate the object as sphere, which diameter is equal to
thickness the defined...": grammar.
- "Show Seconds" -> "Use Timecode": this option is not necessarily about
seconds. Suggested by Pablo Vasquez.
- Brightness and contrast node input descriptions: add missing spaces.
- "Gamma controls the relative intensity... full white.": remove
trailing ".".
Pull Request: https://projects.blender.org/blender/blender/pulls/122972
The old add-ons UI had a "Refresh" operator that would re-scan
the file-system and show any changes.
Add an equivalent operator that works for both extensions and legacy
add-ons and add it to the extension menu.
This is useful for a few situations:
- Refresh based on changes to "System" repositories which are read-only
from Blender and intended to be manipulated outside of Blender.
- Anyone managing their own "User" repository.
- For developers to create extensions, where re-starting to see changes
to meta-data is inconvenient.
- Troubleshooting problems parsing extension meta-data as problems are
reported to the operator.