Commit Graph

1867 Commits

Author SHA1 Message Date
Campbell Barton
cf73897690 Extensions: add HTML generation to the "server-generate" command
- Optionally generate a simple HTML page (using --html).
- Links include repository, blender_versnon_* & platform information,
  so the information can be used by blender when links are dropped
  into Blender.
- Support using a template as the default HTML is primitive.
2024-06-22 23:48:00 +10:00
Campbell Barton
fc3e0507cc Extensions: development functionality to mark all & clear marks
- Disable enabling on install when installing marked.
  This simplifies installing many packages from a repository which can
  be useful for testing.
- Fix an error installing marked when a local-only package was marked.
2024-06-22 23:03:52 +10:00
Campbell Barton
1ba06956e7 Extensions: support platform & version from URL parameters
Improve errors when dropping incompatible extensions, where previously
the extension would report as being unknown.
2024-06-22 19:13:45 +10:00
Campbell Barton
91d5a639dc Extensions: prevent install/upgrade while sync is in progress
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.
2024-06-21 16:51:57 +10:00
Campbell Barton
72af4d0977 Cleanup: use a set to store enabled add-on module names
Was using a dictionary when the value was never used.
2024-06-21 16:03:11 +10:00
Campbell Barton
78a5ade1be Extensions: remove disabled UI logic 2024-06-21 15:42:11 +10:00
Campbell Barton
c312f20627 Extensions: add an extension menu for each extension
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>
2024-06-21 15:41:45 +10:00
Campbell Barton
91ba2e10ba Extensions: avoid duplicate "." for legacy add-on descriptions 2024-06-21 12:48:33 +10:00
Campbell Barton
38e25d7838 UI: tweaks to extension & addon items
- 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>
2024-06-21 11:34:10 +10:00
Campbell Barton
72ef03d5a1 Extensions: split add-ons & extensions into separate preferences
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.
2024-06-21 10:42:53 +10:00
Brecht Van Lommel
5a2053a8b6 Fix: Missing description for Copy Global Transform add-on 2024-06-20 14:25:04 +02:00
Campbell Barton
1eda5bca68 Fix error with all local extensions showing as orphan
Also correct wording in install-file help text.
2024-06-20 21:56:31 +10:00
Campbell Barton
801e47f42a Extensions: support "Install from Disk" for remote repositories
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.
2024-06-20 17:10:01 +10:00
Campbell Barton
e2522e5f03 Extensions: support displaying "Orphan" 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.
2024-06-20 15:16:05 +10:00
Campbell Barton
da3461f8eb Fix #123241: Wrong dialog shown when dropping an unsupported package
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.
2024-06-19 20:47:55 +10:00
Campbell Barton
6eb2b5f47b Fix local extension errors being shown as remote errors
Also fix error with non extension add-on display by removing
an exception for extensions which is no longer needed.
2024-06-19 15:58:45 +10:00
Nathan Vegdahl
295df94478 Anim: add "legacy behavior" option to Limit Rotation constraint
This adds a "Legacy Behavior" option to the Limit Rotation constraint that makes
it behave how Limit Rotation constraints did prior to
ed2408400d. Newly created constraints have this
option disabled, but versioning code enables the option on constraints from
older files to ensure that the behavior of e.g. existing rigs is not altered.

This is one part of a two-part fix for #123105. The other part is in PR
extensions/rigify#4.

Pull Request: https://projects.blender.org/blender/blender/pulls/123361
2024-06-18 18:29:25 +02:00
Campbell Barton
1ed6449c82 Extensions: better error message when already installed
Change the main error messages that happens when we drag and drop an
extension URL.

Ref !123242

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-06-18 19:49:36 +10:00
Campbell Barton
09be28794a Fix references to undefined modules/variables, remove unused import 2024-06-18 19:21:15 +10:00
Campbell Barton
f98e422e63 Extensions: support build --split-platforms, generated manifest data
- 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.
2024-06-18 16:29:57 +10:00
Bastien Montagne
b143cc1885 I18N: Remove 'edit translation' features from the Blender UI.
This feature was not maintained for a long time already, and would have
required a lot of work to make it sensible and usable after 'recent'
changes (like the move to weblate translation platform).

For details see also
https://devtalk.blender.org/t/ui-translation-tools-remove-edit-translation-feature-from-blender-ui-in-4-2lts-release/34947
2024-06-17 12:17:55 +02:00
Jeroen Bakker
52d72d9fbb Fix #122847: Show Transparent Render Pass
EEVEE has a transparent render pass that renders materials where
the render mode is set to blended. This was introduced when EEVEE-Next
was still in development, but was never fully backported.

This PR adds the missing pieces.

Pull Request: https://projects.blender.org/blender/blender/pulls/123298
2024-06-17 09:35:03 +02:00
Miguel Pozo
a11d3c6c01 EEVEE: Add Ray Visibility > Camera support
FIx #122980.

Pull Request: https://projects.blender.org/blender/blender/pulls/123248
2024-06-15 08:54:20 +02:00
Damien Picard
4719ce5d56 I18n: Allow translation of extension tags and permissions
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
2024-06-14 16:35:54 +02:00
Campbell Barton
5b30ded989 Extensions: support enabling a repository with drag & drop
When dropping an extension onto a repository which is disabled,
show a popup that optionally enables the disabled repository.

Part of #120665.
2024-06-15 00:22:36 +10:00
Campbell Barton
a25c386c4a Extensions: remove add-on local preferences
This was only being used for a single debugging option,
additional developer reports are now used when enabling
the extensions debugging option (under experimental).
2024-06-14 15:32:07 +10:00
Campbell Barton
e93f0ee53a Extensions: add network timeout and connection limit preferences
These settings are used when running extension updates but may be
used for any operations that perform online access.
2024-06-14 15:32:07 +10:00
Campbell Barton
176864ab03 Extensions: install all updates in parallel
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.
2024-06-14 15:12:23 +10:00
Campbell Barton
04f310a19a Extensions: simplify access to manifests when refreshing the remote
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.
2024-06-14 15:12:21 +10:00
Campbell Barton
2dd339bff3 Extensions: quiet warnings from pylint
Some warnings remain which need further investigation.
2024-06-14 15:12:19 +10:00
Campbell Barton
7952f35292 Extensions: filter out extensions by platform and blender version
Exclude extensions which aren't supported by the Blender version or
the platform (for platform dependent extensions).
2024-06-14 15:12:18 +10:00
Campbell Barton
248a5258e0 Extensions: various fixes
- 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).
2024-06-14 15:12:16 +10:00
Christoph Lendenfeld
9dcc63b76c Fix #122372: Keyingsets not keying custom properties of type EnumProperty
The issue was that when applying the keyingsets
`Whole Character` and `LocRotScale & Custom Properties` the
enum property of a rigify rig was not keyed.
The reason it was not keyed was just because
it was not specified in the compatible types in the keying set.
The fix is to just add `bpy.types.EnumProperty` to the list.

Pull Request: https://projects.blender.org/blender/blender/pulls/122377
2024-06-13 13:17:32 +02:00
Damien Picard
f87d4e4e40 I18n: Extract and disambiguate a few messages
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
2024-06-13 12:15:55 +02:00
Dalai Felinto
77a69d04f2 Extensions: Changes to the translatable tags table
* Drop the repository - let's combine tags in a single list (per type)
  to avoid duplications in the future.

* Give a more sensitive name for tthe property, to avoid tags.tags.
2024-06-13 10:17:10 +02:00
Brecht Van Lommel
c3dcad64c7 Fix #122989: Enabling installed legacy add-on fails without scripts folder
Needs to happen after refreshing the paths.
2024-06-12 18:36:55 +02:00
Campbell Barton
c6680ce7ca Extensions: include the version by default when building packages
Use the `{manifest_id}-{version}.zip` for the generated file
unless an explicit name is given.

Exclude all *.zip files located in the package root.
2024-06-12 22:38:32 +10:00
Campbell Barton
bda9a44785 Extensions: use "v1" version for the generated repository meta-data 2024-06-12 22:38:32 +10:00
Sergey Sharybin
2cdd9c1b2c Fix: Syntax error after recent extensions change
Caused by 4d8eea1402.
2024-06-12 12:08:59 +02:00
Campbell Barton
4d8eea1402 Extensions: convert package listings into a dictionary when loaded
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.
2024-06-12 16:50:08 +10:00
Campbell Barton
c99a40b286 Extensions: basic validation of remote repository data
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.
2024-06-12 15:13:04 +10:00
Campbell Barton
820fc124d4 Extensions: store repository data in a named tuple
No functional changes, adding more specific typing information helps
with further improvements.
2024-06-12 12:41:40 +10:00
Campbell Barton
cd741650d0 Fix incorrect check for the extension manifests time-stamp
The time-stamp on the directory was checked, not the manifest file.
2024-06-12 12:36:55 +10:00
Campbell Barton
eaa3f4c034 Cleanup: double-quote plain text strings 2024-06-12 10:56:12 +10:00
Miguel Pozo
6f724b83c6 Fix #122929: Freestyle options not visible in view layer properties (EEVEE) 2024-06-11 21:22:27 +02:00
Dalai Felinto
188b6fd3d0 Extensions: List of tags to be used for translation
Internal module used for translation.

Pull Request: https://projects.blender.org/blender/blender/pulls/123069
2024-06-11 17:42:56 +02:00
Damien Picard
f9c2758c85 Actually extract n_() message
Forgot to commit the actual functional part...

Pull Request: https://projects.blender.org/blender/blender/pulls/122971
2024-06-11 15:09:14 +02:00
Damien Picard
602b26f461 I18n: Disambiguate messages from custom properties
These messages are part of enum items not directly used by their
EnumProperty, because they are returned by a function. They cannot be
accessed in RNA at all times, and need to be extracted manually.
2024-06-11 15:09:09 +02:00
Campbell Barton
43356044eb Extensions: add the ability to create a repository that doesn't exist
When dropping a URL from an unknown repository add a dialog to support
adding a new repository.
2024-06-11 22:37:29 +10:00
Campbell Barton
f7d5d6d88f Fix error canceling an extension operator before it's started 2024-06-11 22:37:29 +10:00