Commit Graph

62 Commits

Author SHA1 Message Date
Campbell Barton
7dc5b7c134 Fix error upgrading/installing extensions for the active repository
Removing the check for an empty repository list isn't correct when
only polling the active repository. Restore the check with a more
detailed error message.
2024-05-29 09:48:14 +10:00
Campbell Barton
6360edc867 Cleanup: quiet unused argument warning, line wrapping 2024-05-29 09:48:14 +10:00
Dalai Felinto
8d79a24075 UI: Only show offline mode if launched with --offline-mode
Blender is offline by default. There is no need to mention that unless the user
went out of their way to make it offline (with the --offline-mode argument).

This is still waiting for the offline icon #122225. Using the internet
icon meanwhile.

Co-authored by Pablo Vazquez.

---

Pull Request: https://projects.blender.org/blender/blender/pulls/122392
2024-05-28 23:29:24 +02:00
Hans Goudey
33a5b47735 Cleanup: Make format 2024-05-28 13:35:44 -04:00
Dalai Felinto
4b57951604 Extensions: New status message when checking for update
```
- Sync repo: {remote_url}
+ Checking repository "{remote_name}" for updates...

- Sync downloading remote data
+ Refreshing extensions list for "{remote_name}"...

- sync: invalid manifest ({error_msg}) reading {remote_url}!"
+ Repository error: invalid manifest ({error_msg}) for repository "{remote_name}"!

- Sync complete: {:s}".format(remote_url)
+ Extensions list for "{remote_name}" updated
```

---

Note, this is working as expected (from Blender anyways), however I can't test test_cli.py at the moment here.

---

Old messages:

<img src="https://projects.blender.org/attachments/9d4db8f5-ef9a-48c8-9e56-cb534aa9aed5" width=650>

New messages:

<img src="https://projects.blender.org/attachments/0245bcb7-6c4e-47e4-a616-0cf831761b47" width=450>

---

Co-authored by Pablo Vazquez

Pull Request: https://projects.blender.org/blender/blender/pulls/122378
2024-05-28 18:39:42 +02:00
Dalai Felinto
18cf4e9d09 Correct tooltip for bl_pkg.extensions_show_for_update 2024-05-28 18:12:00 +02:00
Dalai Felinto
7ac762241e Extensions: Fixup for Install/Update operator
The same tooltip is used for Update. Which didn't make much sense as it
was (since it was suggesting that it was enabling the extension).

Simplifying the message now.

Fixup for: 31f7016ba9

Co-authored by Pablo Vazquez.
2024-05-28 18:12:00 +02:00
Campbell Barton
be4788a9bd Extensions: pass platform to the remote URL
Add the platform to the URL when connecting to the remote server.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>

----

This follows documented platform ID's from: https://docs.blender.org/manual/nb/dev/advanced/extensions/getting_started.html

Co-authored-by: Dalai Felinto <dalai@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/122371
2024-05-28 16:35:41 +02:00
Campbell Barton
b15bc1b5bb Extensions: add the blender version to the remote URL
Add query arguments to the URL when connecting to the remote server.

This information is stripped to create relative paths and for error
messages to prevent overly verbose URS's.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:41:43 +10:00
Campbell Barton
171319d9ef Extensions: send access token for HTTP requests
- The access token is used when connecting to the server.
- Mention an invalid access token as a possible cause for 403 errors.

Based on !122234.

Co-authored-by: Dalai Felinto <dalai@blender.org>
2024-05-28 21:36:23 +10:00
Campbell Barton
c33b03fe68 Fix extension tests running after operator poll() changes
Enable "--online-mode" when running tests which require it.
2024-05-28 21:31:25 +10:00
Dalai Felinto
31f7016ba9 Extensions: Tooltip and poll for Install and Update operator(s)
Co-authored by: Pablo Vazquez.
2024-05-28 13:01:07 +02:00
Dalai Felinto
651621da0d Extensions: Tooltips and disable poll message for Check for Updates
This includes checks for offline-mode.

Co-authored by Pablo Vazquez.
2024-05-28 13:01:07 +02:00
Campbell Barton
8366ea8798 Extensions: makefile tweaks
- Add a top-level "test" target that runs all other tests.
- Order "watch_*" convenience targets directly after the tests
  they watch.
2024-05-28 16:18:35 +10:00
Julien Duroure
1e802d971a glTF exporter: Draco: fix normalized draco accessors
Fix exporting normalized accessor with Draco enabled.
json was ok, but accessor data itself was not flagged as normalized

Pull Request: https://projects.blender.org/blender/blender/pulls/122224
2024-05-24 16:25:56 +02:00
Julien Duroure
5bf160818f glTF exporter: Cleanup: quiet warning for debug builds on startup 2024-05-24 14:33:16 +02:00
Julien Duroure
4aadff7e97 glTF exporter: Fix retrieving attribute after recent merged 2024-05-24 10:22:40 +02:00
Julien Duroure
0f0a8df8a9 glTF exporter: Option to export VC even if not used in node tree
glTF specification says that VC must be used as a base color multiplier, so you should add it to your node tree to see it.
But seems common usage of VC is to use it for custom data. Custom properties/attribute is the best place for these data,
but in order not to break production workflow/pipeline, we add an option to export active VC
2024-05-24 09:36:14 +02:00
Julien Duroure
d80a1dd5f8 glTF exporter: Fix exporter both VertexColor & colorFactor in the same time 2024-05-24 09:32:42 +02:00
Julien Duroure
f8b8a1a5b6 glTF exporter: cleanup user warnings 2024-05-24 09:30:37 +02:00
Julien Duroure
ac97907841 glTF exporter: Fix UVMap export when is set from an attribute node 2024-05-24 09:28:53 +02:00
Julien Duroure
a71027d37f glTF exporter: UDIM for merged channel textures
Was never implemented
2024-05-24 09:26:27 +02:00
Julien Duroure
c297a9513e glTF exporter: Fix material check on evaluated data 2024-05-24 09:23:36 +02:00
Julien Duroure
be96d5144a glTF exporter: Instanced collection can have regular children 2024-05-24 09:21:43 +02:00
Julien Duroure
f86fe707ce glTF exporter: Fix merge after extra anim feature merge 2024-05-24 09:19:36 +02:00
Julien Duroure
c9daea2d5b glTF exporter: Fix typo in socket name 2024-05-24 09:17:41 +02:00
Julien Duroure
5789031072 glTF exporter: fix invalid escape sequence 2024-05-24 09:15:13 +02:00
Campbell Barton
4f73df2b7b Extensions: enable extensions.blender.org, adjust welcome screen
Splash screen notification text:

- When starting in "Offline mode" with repositories with installed
  packages enabled, the text is clickable unless launched with
  `--offline-mode`, the tooltip notes that the command line setting
  can't be changed at run-time.
- Don's show anything if there are not extensions installed.

Preferences:

- Don't show the welcome message on preferences if:
  - Blender is online.
  - The message was dismissed.
  - There are no enabled remote repositories.

- The option to enable extensions.blender.org has been replaced with
  a button that switches to the "System" tab where Online Access
  can be enabled.

Also expose bpy.app.online_access_override needed for the UI to check
if online access was disabled using command line arguments.
2024-05-24 16:51:36 +10:00
Campbell Barton
91cab8f992 Extensions: remove use of BaseException
This can cause unexpected behavior, even in cases where SystemExit
or KeyboardInterrupt needs to be caught, it's better to list them
explicitly.
2024-05-24 16:16:55 +10:00
Campbell Barton
7f0903fdbf Fix scandir always shown an error
Incorrect use of BaseException meant the generator finishing
would print as an error
2024-05-24 16:16:55 +10:00
Campbell Barton
ad09b175f9 Extensions: only check updates for repos that have packages installed 2024-05-24 14:08:34 +10:00
Christoph Lendenfeld
345cd70404 Fix: Pose Library - Ctrl click not applying flipped
This has been mentioned as a bug in the recent A&R module meeting
https://devtalk.blender.org/t/2024-05-14-animation-rigging-module-meeting/34614#ux-quirks-in-the-pose-library-shelf-5
Pressing `Ctrl` only worked from within the modal operator, but not to start it.
The issue was that the entry for that was missing from the keymap.

This PR adds a keymap entry to apply and to blend a pose flipped,
by holding `Ctrl` first and then clicking the pose asset.

Pull Request: https://projects.blender.org/blender/blender/pulls/121860
2024-05-23 11:35:44 +02:00
Campbell Barton
63599db598 UI: remove "All" option which showed add-ons and themes by default
Showing all kinds of extensions at once isn't all that useful,
only show one type at a time.
2024-05-23 14:14:44 +10:00
Campbell Barton
57c023d580 Preference: add option allow internet access
Add a preference to "Work Offline" system preference as well as command
line options `--offline-mode` & `--online-mode`
(which overrides the preference).
This option is displayed in the initial setup screen too.

This is currently respected by:

- Check for updates on startup
- Disables running an update when enabling extensions.

When Blender is launched with `--offline-mode` the option cannot be
enabled in the preferences. This is intended for environments
where internet access is intentionally disallowed.

Background: with Blender supporting access to online-repositories
as well as 3rd party extensions themselves potentially accessing the
internet. This setting provides a way for users to disable online
functionality.

This prevents error messages when online access fails in environments
without internet access as well as the ability for users who prefer
Blender doesn't access the internet to have one place to turn this off.

While it does not enforce limitations on add-ons, 3rd party scripts
are expected to respect this setting using `bpy.app.internet_offline`.

The details for this will be handled along with other policies scripts
are expected to follow.

Ref !121994
2024-05-23 13:50:06 +10:00
Campbell Barton
54cf0f7f4c Extensions: add support for "build" paths in the manifest
Add an optional `[build]` table, only used for the "build" sub-command.

Supported entries.

- `paths = [..]` list of strings.
  Explicitly list all paths to include.
  Python "wheels" and the manifest are automatically included.

- `paths_exclude_pattern = [..]` list of strings.
  A `.gitignore` compatible list of patterns.

By default "paths_exclude_pattern" is set to:
[".*", "__pycache__"] when the `[build]` table entry isn't found.

Only one of these options is supported at once since it makes to sense
to exclude paths when they're manually listed.
2024-05-22 15:02:12 +10:00
Campbell Barton
124f003fcb Cleanup: correct comments for package building
Also remove an unnecessary exclusion.
2024-05-22 12:35:17 +10:00
Christoph Lendenfeld
3a40d2813f Anim: Pose Library - Allow blending flipped from the context menu
This adds the `Blend Pose Flipped` option to the
context menu of the pose library.
The operator already accepted a flipped property,
it was just missing a dedicated menu entry for that.

In order for this to work, the modal operator had to be modified.
Instead of setting the flipped state, pressing `Ctrl` now acts as a toggle.
That means that if the operator has been started in flipped mode,
pressing and holding `Ctrl` will unflip it.

This has been a point of discussion in the A&R module meeting
https://devtalk.blender.org/t/2024-05-14-animation-rigging-module-meeting/34614#ux-quirks-in-the-pose-library-shelf-5

Pull Request: https://projects.blender.org/blender/blender/pulls/121857
2024-05-21 11:08:22 +02:00
Julien Duroure
20d8f48500 glTF exporter: Allow custom attribute UVMap to be on point domain
Fixes the root cause of #121204
2024-05-18 08:54:35 +02:00
Campbell Barton
e0b47f78e8 Extensions: show permissions, validate permission values 2024-05-18 16:52:21 +10:00
Julien Duroure
876bfdcbdf glTF exporter: Fix #121878 crash when exporting without animation 2024-05-18 08:50:21 +02:00
Julien Duroure
733bd00432 glTF exporter: fix typo in Vertex Color Alpha management 2024-05-18 07:00:58 +02:00
Campbell Barton
dc7cfb7905 Extensions: improve colors for the "list" subcommand
The dark-grey tagline on black was difficult to read.
2024-05-17 14:53:17 +10:00
Campbell Barton
c598e8c8a7 Fix #121876: index.json error in console, accumulation of @ files
Fix missing check for the existence of index.json before removal.
Also write errors to the stderr instead of the stdout.
2024-05-17 13:56:52 +10:00
Campbell Barton
2391407116 Cleanup: resolve mypy type warnings 2024-05-17 12:15:03 +10:00
Campbell Barton
676ac9cfb1 Cleanup: de-duplicate error handling when downloading extension data 2024-05-17 12:01:25 +10:00
Campbell Barton
489b6aed18 Extensions: always show errors when checking for updates fails 2024-05-17 12:01:07 +10:00
Campbell Barton
05617ed07d Extensions: clarify defaults in extension command line help text
Also don't use `.` for the output-filepath because it's not a directory.
2024-05-17 10:32:20 +10:00
Campbell Barton
64c4c939a9 Fix "missing scripts" being unavailable in the extensions UI
Add-ons which were enabled but not found warn on startup
and were shown under "Missing scripts", where they can be ignored
(the user can choose to restore the paths) or disabled them to suppress
the warnings in future.

This is now available again, with a minor refactor.
2024-05-16 22:55:20 +10:00
Brecht Van Lommel
430c58bbb2 Fix: Inconsistent use of Add-On in label instead of Add-on 2024-05-16 14:05:29 +02:00
Julien Duroure
b583b6ec39 glTF I/O: Use nodes for alpha clipping
Replace the use of Blend Mode on EEVEE (legacy), not existing on EEVEE-Next
2024-05-16 13:14:41 +02:00