2295 Commits

Author SHA1 Message Date
8907069c24 Extensions: lock the repositories before overwriting their manifests
It was possible for multiple Blender's to write to the repositories
JSON at once when checking for updates on startup.
This is now prevented with locking.
2024-05-15 21:51:34 +10:00
9117d3cafc Extensions: cleanup, no need for callback to be optional
Most types check, only one didn't, use a NOP callback instead.
2024-05-15 20:49:37 +10:00
2eafa5601f Extensions: add a strict option used for build/validation commands
This allows us to apply constraints that doesn't break reading
from existing repository lists.
2024-05-15 20:40:49 +10:00
22be9e89d0 Extensions: fix error in recent cleanup 2024-05-15 20:34:43 +10:00
a2561c4f0b Extensions: use Internet icon instead of URL 2024-05-15 19:51:42 +10:00
1be1021f9f Extensions: check for updates now shows the text & icon as a button 2024-05-15 19:49:12 +10:00
de117e820e Extensions: more consistent naming for remote URL arguments 2024-05-15 16:37:58 +10:00
42694baa60 Extensions: cleanup, renaming repo_url to remote_url
Both names were used, settle on one.
2024-05-15 16:23:53 +10:00
004d6e443b Extensions: allow closing brackets at end of tagline 2024-05-15 15:27:37 +10:00
01b8484a0e Extensions: fix installing relative paths from the commandline 2024-05-15 11:39:01 +10:00
9a0d338af0 Extensions: improve validation for tagline and other fields
- Ensure control characters aren't used in name, tagline, maintain &
  website fields.
- Check a tagline is no more than 64 characters long and doesn't
  end with punctuation.
2024-05-15 10:44:41 +10:00
8dfc1e183d Extensions: correct last commit (tsk!) 2024-05-15 00:57:08 +10:00
435effdf6d Extensions: RNA changes missing from last commit 2024-05-15 00:55:49 +10:00
42ec2dd042 Extensions: update based on changes to RNA 2024-05-15 00:52:51 +10:00
c45118f95b Extensions: one time "Online Extensions" panel in the preferences
Implement the preferences part of #120665.
2024-05-15 00:16:47 +10:00
a71e7948c2 Extensions: cleanup, assign a variable for preferences 2024-05-14 21:54:40 +10:00
835c82a7cc Extensions: enable the "show updates" option from the splash status
Clicking on the icon from the splash status now sets the preferences
to show only extensions to update.
2024-05-14 21:48:34 +10:00
075d00c610 Extensions: add "Updates Available" filter for the UI
Ref #120609.
2024-05-14 21:42:13 +10:00
63a14aca2c Extensions: rename remote_path -> remote_url
This was already done in places.
2024-05-14 20:49:42 +10:00
ec18c7ea55 Extensions: refactor CommandBatch.exec_non_blocking return value
Use a named tuple for readability.

- Messages (as before).
- Boolean (completed status).
- Boolean (true when the status-data changed).
  Used to detect when a redraw is needed.
2024-05-13 22:27:58 +10:00
204099e1ef Extensions: fix the splash status being momentarily incorrect
CommandBatch.exec_non_blocking was meant to return None when all
commands were complete, this didn't account for commands being
completed in the body of exec_non_blocking(..) which caused
incorrect status to be shown for a short time.
2024-05-13 22:05:39 +10:00
26367cbe27 Extensions: remove commented code 2024-05-13 21:37:15 +10:00
516fd69d76 Extensions: support showing available updates on the splash
Implements #120612, except for displaying a number over an icon
which requires extending Blender.
2024-05-13 12:51:26 +10:00
54dcdc2803 Extensions: change the constant for the complete status
Allow the status to be converted to a flag
2024-05-10 14:31:47 +10:00
e2129ce670 Extensions: add missing status assignment (was never set to running) 2024-05-10 14:31:20 +10:00
def2997f8b Extensions: resolve reading JSON output blocking Blender
Resolve reading JSON chunks blocking Blender's process by yielding an
empty message when there is no new data read from the process.
2024-05-10 14:25:56 +10:00
7b8748f12a Extensions: workaround for macos wheel matching 2024-05-09 10:12:32 +10:00
e6e44506a6 Cleanup: trailing newline 2024-05-09 10:02:43 +10:00
ff78091b00 Extensions: match manylinux*{arch} *.whl files on Linux
Match manylinux on Linux systems since it's a common prefix for wheels,
so it's important they're installed on Linux.
Currently the GLIBC component of the platform is ignored.
2024-05-08 15:02:55 +10:00
6cd5230f7d Extensions: don't compress archive files when building packages
Don't compress `*.whl` and other archive files as it's overly
time-consuming.
2024-05-08 14:42:07 +10:00
6c9cfb75b5 Extensions: don't include the extensions own temporary file
Exclude the extensions own temporary file when building an extension.
Even though this file should be removed, it's possible the build
process was killed for the system was turned off, so best explicitly
exclude the file.
2024-05-08 14:35:45 +10:00
2407157d18 Extensions: initial wheel support
- Support for "wheels" in the `blender_manifest.toml` as a list
  of manifest relative file-paths.

- Wheels are extracted into an extension specific `site-packages`
  directory after installation.

- Wheels are removed when they are no longer used by any extensions.

- Wheel's from unsupported platforms are skipped,
  allowing an extension to include compiled extensions for multiple
  platforms.

- When more than one version of a wheel is found,
  only the newest version is installed.

  This is an imperfect solution because an extension could depend on a
  specific version of a wheel.

  We will probably need extensions to declare version ranges they
  are compatible with so extensions can co-exist without disabling
  each other due to distributing different versions of wheels.

- "make test_cli_blender" tests managing extensions vie Blender's
  command line `blender -c extension` operations, which also tests
  extensions that bundle `.whl` files.

Address #119681.
2024-05-08 13:00:13 +10:00
60adf3cfa3 Extensions: fix running tests when "make" isn't run from the add-on dir
Running "make -C path" would fail for some tests as they expected
the CWD to be the add-on directory.
2024-05-08 11:17:51 +10:00
e6df553637 Extensions: fix always reporting 3 packages as being generated
The wrong list was used when reporting packages found for the
"server_generate" command.
2024-05-08 11:01:17 +10:00
9bb8f8ba00 Extensions: fix incorrect reports that __init__.py file is missing
Ref: !31
2024-05-08 08:48:20 +10:00
4bd4f8752a Extensions: quiet commands in the makefile 2024-05-04 16:55:31 +10:00
0f400a8eb6 Extensions: correct commands in script headers 2024-05-03 17:20:28 +10:00
c97c1c847c UI: Move Extensions repositories popover to header
Improve discoverability of the repositories settings by moving them from
the dropdown menu into the header.

Inspired by !27

Pull Request: https://projects.blender.org/blender/blender-addons-contrib/pulls/30
2024-04-16 17:23:29 +02:00
16908cc466 Extensions: User Interface: Fix logic for Filter
1. The Install and Enable were "Show Only", but the label was saying
   only "Show". We now split Show and Only in two sections.

2. The logic for when enable/installed would be active was flipped.

Designed together with Pablo Vazquez.
2024-04-12 17:34:23 +02:00
d5862549d3 Extensions: User Interface
* Make "Repositories" more accessible.
* Unify all the "Install" operators.

This commit addresses some feedback regarding being hard to setup
repositories since they were on the corner of the panel, and get easily
dismissable while travelling there with the mouse.

It then touches on the topic of discoverability of this feature, and
re-organize the extensions Operators dropdown menu.

Repositories
-----------
Repositories was accessible via the "preferences" icon. This icon (a cog)
is used already on the File Browser as a toggle to expand the side panel.
Here it had no label, thus no correlation between the button and what it did
(Repositories).

Instead this commit adds a Repository entry to the extensions operators
dropdown menu.

Install
-------
The "Update All" entry wasn't clear enough. It has been renamed to
Install Available Updates and grouped together with the other Install
operators.

--
Designed together with Pablo Vazquez.
2024-04-12 17:10:23 +02:00
98c9f50dae Extensions: support enable/disable for themes 2024-04-12 14:41:33 +10:00
7cff5f2780 Extensions: refresh/clear theme on update/uninstall
Resolves blender/blender#120289
2024-04-12 13:13:20 +10:00
ebcda465b5 Extensions: use a new structure for the server's JSON listing
Top level keys are now:
- version
- blocklist
- data (a list of packages)

  Each list item now contains the package "id".

Ref !29
2024-04-11 21:23:37 +10:00
a41e3d35a4 Extensions: resolve missing type hints 2024-04-09 22:11:14 +10:00
bb54317424 Extensions: tweak help text, missed from last commit 2024-04-03 22:30:51 +11:00
2a3085b69d Extensions: remove the bool argument for "repo-add --clear-all" 2024-04-03 22:28:16 +11:00
70869e9ddf Extensions: add a --clear-all option to repo-add
This us useful to speed up setting up a test repo.
2024-04-03 19:15:56 +11:00
af47b5292d Extensions: handle errors creating a package archive 2024-04-03 17:34:27 +11:00
57e3fbd918 Extensions: handle exceptions extracting opening the archive 2024-04-03 17:27:29 +11:00
d4f7917587 Extensions: tweak wording when a file is missing 2024-04-02 22:37:56 +11:00