Commit Graph

79 Commits

Author SHA1 Message Date
Campbell Barton
29f1c96657 Extensions: detect dropping URL's from disabled repositories
Report an error when dropping a URL into a repository which has been
disabled.
2024-05-30 23:22:12 +10:00
Campbell Barton
b19d4d7df6 Extensions: suppress connection errors in console for automatic checks
Being offline shouldn't be considered an error which checking for
updates on startup, so connectivity issues are suppressed unless
running in debug mode.

Ref !122463
2024-05-30 23:22:09 +10:00
Julien Duroure
6a4210ff90 glTF exporter: Perf: Manage drivers on SK when disable viewport option
When trying to optimize performance, we can disable other object in viewport when baking animation
We are now able to bake also drivers on SK with this option
The solution is to copy drivers to temporary created custom properties on armature,
to be able to evaluate them during baking
2024-05-30 15:17:34 +02:00
Julien Duroure
9ba22d4bc7 glTF exporter: Fix #122379: Fix GN data type check 2024-05-30 15:14:00 +02:00
Julien Duroure
018ece5309 glTF: Update user extension ui registration after Blender changes
After Panel UI refactoring for I/O, there is no more Panel class
2024-05-30 15:11:25 +02:00
Campbell Barton
a8a976e09b Extensions: separate URL drop message when offline mode is forced 2024-05-30 17:35:55 +10:00
Campbell Barton
8f97419561 Extensions: show a dialog when dropping a URL while offline
The dialog notifies the user that online access is required with a
button to go to the system preferences.

See #120665.
2024-05-30 16:07:59 +10:00
Campbell Barton
ed2b8e9c5c Fix file-load causing syncing extension repositories to hang 2024-05-30 10:42:11 +10:00
Campbell Barton
d2049f0aa7 Fix checking for extension updates while modifying repositories
It's possible the user frees or change the repository after a check
for updates starts because synchronizing repositories isn't blocking.

Resolve by using a copy of the repository when checking for updates,
only applying updates if the copy still matches the preferences once
the update is complete.
2024-05-30 10:28:17 +10:00
Campbell Barton
b05958ba02 Extensions: avoid syncing the repos when there the list is empty 2024-05-30 10:20:12 +10:00
Campbell Barton
515d8b9a0d Cleanup: minor tweaks to comments for extensions notifications 2024-05-29 21:33:24 +10:00
Campbell Barton
33622c7546 Fix extensions makefile on systems without a GNU userland 2024-05-29 21:28:40 +10:00
Campbell Barton
e991154ddb Extensions: sync remote extensions when displaying preferences
When online mode is enabled and the preferences are shown,
the users needed to manually check for updates.

Now this runs in the background, sharing logic with checking for
updates on startup.

When updates run status text is currently shown in the preferences
window, eventually this should be displayed in the status bar.

To avoid conflicts when updating a queue is used to avoid problems
caused by check for updates on startup & the preferences window also
checking for updates. Since checking for updates is optional it's
possible some repositories wont be handled by checking on startup
so both updates run for now. De-duplicating update checks can be
supported eventually.
2024-05-29 21:04:55 +10:00
Campbell Barton
051e10d39a Extensions: make "test_blender" less noisy 2024-05-29 15:31:44 +10:00
Campbell Barton
3f5f5eb2c0 Fix invalid URL's causing extension operations to fail to run
URL's without a known prefix now use error reporting that shows up in
the status bar.
2024-05-29 15:26:30 +10:00
Campbell Barton
f0ebc310c8 Extensions: update tests after changing UI text 2024-05-29 15:11:55 +10:00
Brecht Van Lommel
5de8ea74c4 Extensions: Only check for updates on startup every 24 hours
To reduce network bandwith and to only bother users once a day with
add-on updates. All repos are checked together so that there is only
one notification per day.

Also tweaked the wording so that it's more clear this will not actually
install the updates.

Ref !121888
2024-05-29 15:07:04 +10:00
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