Commit Graph

406 Commits

Author SHA1 Message Date
Campbell Barton
c4a0bbb1f4 Extensions: Support online extensions and move add-ons outside Blender
The extensions system allows to extend Blender with connectivity to the internet. Right now it means Blender can
discover and install add-ons and themes directly from the internet, and notify users about their updates.

By default this is disabled (opt-in), and users can enable it the first time they try to install an extension or visit
the Prefences > Extensions tab. If this is enabled, Blender will automatically check for updates for
extensions.blender.org upon startup.

When will Blender access the remote repositories:

* Every time you open the Preferences → Extensions: ALL the enabled repositories get checked for the latest info (json)
* Every time you try to install by dragging: ALL the enabled repositories get checked for the latest info (json).
* Every time you start Blender: selected repositories get checked for the latest info (json).

------------------

From the Blender code point of view, this means that most of the add-ons and themes originally bundled with Blender
will now be available from the online platform, instead of bundled with Blender. The exception are add-ons which are
deemed core functionality which just happened to be written as Python add-ons.

Links:
* Original Extenesions Platform Announcement: https://code.blender.org/2022/10/blender-extensions-platform/
* Extensions website: https://extensions.blender.org/
* User Manual: https://docs.blender.org/manual/en/4.2/extensions/index.html#extensions-index
* Technical specifications: https://developer.blender.org/docs/features/extensions/
* Changes on add-ons bundling: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593

------------------

This PR does the following:

* Move extensions out of experimental.
* No longer install `scripts/addons` & `scripts/addons_contrib`.
* Add `scripts/addons_core` to blender's repository.

These add-ons will still be bundled with Blender and will be always enabled in the future, with their preferences
moved to be more closely integrated with the rest of Blender. This will happen during the remaining bcon2 period.
For more details, see #121830

From scripts/addons:

* copy_global_transform.py
* hydra_storm
* io_anim_bvh
* io_curve_svg
* io_mesh_uv_layout
* io_scene_fbx
* io_scene_gltf2
* pose_library
* ui_translate
* viewport_vr_preview

Extra: bl_pkg (scripts/addons_contrib)

Note: The STL (legacy) add-on is going to be moved to the extensions platform. There is already a C++ version on core
which is enabled by default.

All the other add-ons are already available at extensions.blender.org. To use them you need to:

* Go to User Preferences > Extensions
* You will be greated with an "Online Extensions" message, click on "Enable Repository".
* Search the add-on you are looking for (e.g, Import Images as Planes).
* Click on Install

Over time their maintaince will be transferred over to the community so their development can carry on. If you used to
help maintain a bundled add-on please read: https://devtalk.blender.org/t/changes-to-add-on-bundling-4-2-onwards/34593

Ref: !121825
2024-05-15 19:26:29 +02:00
Campbell Barton
343b18d8ce Tools: make weekly report executable 2024-05-06 11:06:13 +10:00
Campbell Barton
f01eb79ab9 Tools: support piping the output of the weekly report generator
- Suppress progress and waiting for input() when the output
  isn't a TTY.
- Use a print_progress utility function that adds trailing space
  instead of including is as part of the string.
2024-04-30 13:23:46 +10:00
Bastien Montagne
3ff90cb2d5 Analysis tool: LSAN suppression list: Add *libOpenColorIO*.
LSAN on builds with clang reports a lot of leaks in that library now...
2024-04-29 15:23:59 +02:00
Campbell Barton
29c7be1516 Tools: fixes and updates to duplicate header checker
Since moving to "tools/" the suggested command would modify
headers *outside* Blender's source directory (now prevented).

Since "#pragma once" was used - the duplicate header check
needed to be moved from the end to the start of the header.

Other changes:

- Add type hints.
- Exclude headers intended to be included multiple times.
- Use `argparse` for argument parsing.
- Use str.format.
2024-04-29 09:39:43 +10:00
Campbell Barton
4ec93f73a5 Cleanup: spelling in comments 2024-04-29 09:09:44 +10:00
Jacques Lucke
3e814bc702 Tools: gitea utils does not load all pages
The issue is that the default `limit` seems to be 30, and not 50. Due to the
special case for `page == 1` and the `len(result_page) < limit` check, the
`url_json_get_all_pages` function may return before all pages have been loaded.

The fix is to simply remove the `limit` parameter. It wasn't used anyway.
Using it correctly is somewhat tricky if we can't pass in the limit in the
`page == 1` case. This may result in a couple more API requests but it's
probably not a problem in practice. If it becomes a problem, we should
figure out in which cases the `page == 1` special case is actually
required (it was not in the cases that I tested).

Note that the first link returns fewer results than the second link:
* https://projects.blender.org/api/v1/users/jacqueslucke/activities/feeds?only-performed-by=true&date=2024-04-22
* https://projects.blender.org/api/v1/users/jacqueslucke/activities/feeds?only-performed-by=true&date=2024-04-22&limit=50

Pull Request: https://projects.blender.org/blender/blender/pulls/120948
2024-04-28 01:06:51 +02:00
Campbell Barton
e5fb4ad03b Cleanup: replace %-formatting with str.format in tools/ & release/ 2024-04-27 16:06:53 +10:00
Campbell Barton
c0def6c93d Cleanup: spelling in comments 2024-04-27 11:58:02 +10:00
Campbell Barton
019d3ef939 Cleanup: spelling in comments 2024-04-24 10:48:45 +10:00
Campbell Barton
06adfcaf38 Cleanup: unused imports 2024-04-19 16:09:30 +10:00
Campbell Barton
d5f837a8ee Cleanup: remove redundant string formatting 2024-04-12 10:04:07 +10:00
Campbell Barton
74a65d77cc Cleanup: spelling in comments 2024-04-10 12:28:33 +10:00
Campbell Barton
d4c7e6f020 Cleanup: suppress type warnings
Also make the script executable & clarify some variable names.
2024-04-03 10:41:03 +11:00
Falk David
03bcd7390a Formatting 2024-04-02 16:46:27 +02:00
Thomas Dinges
04293e2494 Tools: Add script to report (high) priority issues per module
The python script checks on reports based on the provided severity (default High) and sorts them per module.

Thanks to Sybren for suggestions on how to improve it!

Pull Request: https://projects.blender.org/blender/blender/pulls/120022
2024-04-02 15:54:14 +02:00
Campbell Barton
cf1849aedb Fix string formatting in git_log_review_commits_advanced dev tool 2024-04-02 10:17:54 +11:00
Campbell Barton
ae950451ea Cleanup: remove redundant f-string use 2024-04-01 16:51:32 +11:00
Campbell Barton
6a937d646b Cleanup: remove unused variables 2024-03-21 10:11:54 +11:00
Campbell Barton
573146518d check_licenses: exclude ./lib/ from source code checks 2024-03-19 14:10:27 +11:00
Campbell Barton
f347706ecd Cleanup: add "unreachable" message to "assert False" statements
Clarify that these blocks are unreachable so the intention is clear
if they're ever encountered.
2024-03-15 13:20:11 +11:00
Campbell Barton
6dffc162c7 Fix error in c_struct_clean.py
All words were counted for each token in the file.
2024-03-08 11:32:14 +11:00
Campbell Barton
1dc79f982d Merge branch 'blender-v4.1-release' 2024-03-07 14:05:18 +11:00
Campbell Barton
8e0d0b37e2 AUTHORS: add 15 new developers
Also correct incorrect user de-duplication in canonical author data.
2024-03-07 14:00:33 +11:00
Campbell Barton
e011c1ab9b Cleanup: spelling in comments 2024-03-05 11:25:35 +11:00
Campbell Barton
2e6739967e Cleanup: reduce right-shift in Python scripts
Also place the return type on it's own line as it's easier to identify
when it's in a predictable location instead of the line ending.
2024-02-28 11:02:54 +11:00
Campbell Barton
44e64b8f29 Cleanup: correct type hints for Python scripts 2024-02-28 11:02:53 +11:00
Campbell Barton
79cf4e58e4 Cleanup: type check scripts in tools/triage 2024-02-28 11:02:51 +11:00
Campbell Barton
4f8db2ee67 Cleanup: use static sets for contains checks, remove f-string use 2024-02-28 11:02:49 +11:00
Ray Molenkamp
cfb60c98be CMake: MSVC: Add natvis file for blender's native types
This currently contains some types I personally needed
more types can be added if people desire them.

Due to the .natvis being added to creator, Visual Studio
will automatically pick up on these types and show the
improved visualizers while debugging.

vscode can also use this file, but you'll have to check
its documentation on how to set that up.

Pull Request: https://projects.blender.org/blender/blender/pulls/118576
2024-02-27 01:02:42 +01:00
Julian Eisel
13e93ac7f1 Tools: Don't include commits authored by others in weekly report script
So far this would include commits committed by the given user, but
authored by someone else. Unfotunately we can't use email addresses to
filter these out, since we can't get the email addresses associated with
an account from gitea, or do a user lookup by email. In my testing the
commit author email and the publicly visible account email would
mismatch in most cases.
2024-02-26 14:29:32 +01:00
Julian Eisel
2a08055066 Tools: Don't include merge commits in weekly report script output
These don't add any useful information to reports, they are just noise.
2024-02-26 12:09:30 +01:00
Julian Eisel
7032933094 Tools: Improve PR headings in weekly report script
"Pull" is a weird/confusing term, just use the proper name "Pull
Request".
2024-02-26 11:57:08 +01:00
Julian Eisel
57db30ce75 Tools: Correct formatting of PRs in weekly report script
Match the formatting of commits.
2024-02-26 11:52:48 +01:00
Julian Eisel
df8706a9af Tools: Fix missing PR reviews in weekly reports script
The script would only include PRs that were commented on as "reviewed",
not PRs that were either approved or had changes requested.
2024-02-26 11:13:04 +01:00
Campbell Barton
f3753f9bcd CMake: add option to disable pre-compiled headers
./tools/utils_maintenance/code_clean failed to operate on any sources
that used pre-compiled headers.
2024-02-21 10:35:20 +11:00
Campbell Barton
621787e71c Cleanup: spelling in comments 2024-02-20 19:25:54 +11:00
Brecht Van Lommel
0f2064bc3b Revert changes from main commits that were merged into blender-v4.1-release
The last good commit was 4bf6a2e564ad2.
2024-02-19 15:59:59 +01:00
Hans Goudey
916e28a1fb Cleanup: Make format 2024-02-19 09:55:46 -05:00
Bastien Montagne
6f74bc5c05 Tools: Add a 'raw block' support/mode to blendfile module and blend2json tool.
This much more basic representation of a blendfile is designed to
survive badly corrupted data, e.g. when handling files without DNA
info, etc.

Obviously the amount of data extracted is way less, but it's still
eaiser to analize than dealing with pure binary data.
2024-02-19 15:01:06 +01:00
Campbell Barton
d7dfbce288 code_clean: exclude BLI_strict_flags.h from removal
As this is only added to set strict warnings, cleaning logic would
remove as the compilers output is unchanged.

Support excluding headers from removal, others can be added if needed.
2024-02-14 13:40:33 +11:00
Campbell Barton
2119d271e0 Cleanup: remove "-noaudio" argument in background mode
This is no longer needed as background mode implies -noaudio.
2024-02-14 00:13:38 +11:00
Campbell Barton
4745934306 code_clean: update doc-strings to prevent incorrect include removal 2024-02-13 14:18:19 +11:00
Campbell Barton
3b3eace193 code_clean: fix error running header_clean 2024-02-12 23:26:40 +11:00
Hans Goudey
91e54fdd83 Cleanup: Move BLO_readfile.h to C++
I added a new BLO_userdef_default.h header to contain declarations of
two global variables that are still defined in C files. Use of designated
initializers for large structs make those files harder to change.
Arguably this is a better header for them anyway.

Pull Request: https://projects.blender.org/blender/blender/pulls/118015
2024-02-09 13:41:30 +01:00
Campbell Barton
635409bfe2 Cleanup: correct type info in check_docs_code_layout 2024-02-03 13:13:56 +11:00
Campbell Barton
836167f1c9 mypy: update checker config, report missing paths 2024-02-03 13:09:57 +11:00
Prikshit singh
1159da5f36 Fix #117636: Update check code layout script for new docs
Pull Request: https://projects.blender.org/blender/blender/pulls/117684
2024-02-02 18:59:11 +01:00
Campbell Barton
be7f89a9f5 Cleanup: spelling in comments 2024-01-29 11:47:42 +11:00
Campbell Barton
e7b127f363 Cleanup: remove unused variables 2024-01-29 11:47:40 +11:00