Commit Graph

450 Commits

Author SHA1 Message Date
Iliya Katueshenock
76eed5c65a Fix clang-format & autopep8 do extra work when nothing to operate on
When passing `.py` paths to the format command, clang-format paths
would be empty and operate on all paths.

Resolve by detecting cases when there is nothing to format.

Ref: !126055
2024-08-23 09:55:30 +10:00
Campbell Barton
7971e6a9c2 Cleanup: return error code instead of sys.exit() for formatting utils 2024-08-23 09:55:30 +10:00
Campbell Barton
8a7ff41a85 Cleanup: wrap long lines in Python scripts 2024-08-19 10:48:07 +10:00
Jacques Lucke
50a6be7169 Tools: add frame filter for task isolation 2024-08-16 23:36:20 +02:00
Jacques Lucke
42ad0a754a Fix: Tools: add missing display hint 2024-08-16 17:20:19 +02:00
Campbell Barton
d777267982 Cleanup: use str.format instead of f-strings 2024-08-16 09:33:20 +10:00
Jacques Lucke
bda4c8a220 Tools: improve error handling in GDB pretty printers 2024-08-15 13:40:05 +02:00
Thomas Dinges
d56196ad96 Tools: Update issues script after label rename from priority to severity 2024-08-14 14:42:04 +02:00
Campbell Barton
2a7c5d692b Cleanup: exclude /lib/ from cmake checks 2024-08-10 11:32:45 +10:00
Campbell Barton
fe3c6ef448 Cleanup: spelling in comments 2024-08-10 11:32:37 +10:00
Falk David
c5f95c8e2c Cleanup: Formatting 2024-08-08 13:05:14 +02:00
Jacques Lucke
2e412e683b Tools: improve gdb frame filter for lazy functions 2024-08-08 12:02:00 +02:00
Jacques Lucke
51f94d6234 Tools: add GDB debug extension
This adds a Python file that can be loaded into GDB to improve the debugging
experience. This is similar to cfb60c98be which
contains a subset of the features provided here. While not being compatible with
other debuggers, specializing on just GDB allows us to use the GDB Python API
which is quite feature rich. Besides adding quite a few pretty-printers, this
also adds some frame filters which simplify backtraces. I've been using the
pretty-printers for quite some time myself already.

I added a basic guide on how to set it up in `blender_gdb_extension.py` but that
only covers the case when using `gdb` directly. If this is accepted, I can add
some more detailed guides on how to configure e.g. vscode to the developer docs.

The patch also contains some type hints for GDB which I wrote, which simplify
working with the GDB API.

Pull Request: https://projects.blender.org/blender/blender/pulls/126062
2024-08-08 10:28:17 +02:00
Campbell Barton
99af19932e Cleanup: spelling in comments 2024-07-30 12:38:16 +10:00
Campbell Barton
8418ec4952 CMake: include headers in source lists 2024-07-25 11:24:11 +10:00
Campbell Barton
2edc2393d2 Cleanup: spelling in comments 2024-07-25 10:17:42 +10:00
Campbell Barton
f1e5263423 Cleanup: spelling in comments 2024-07-22 10:16:55 +10:00
Campbell Barton
9fb0d3c3ef Cleanup: spelling in comments 2024-07-13 16:56:57 +10:00
Campbell Barton
a69ff0e3da Merge branch 'blender-v4.2-release' 2024-07-10 17:42:39 +10:00
Campbell Barton
1fc2530179 mypy: remove non-existing file from config 2024-07-10 17:03:20 +10:00
Campbell Barton
cdb61375fe Merge branch 'blender-v4.2-release' 2024-07-08 18:27:52 +10:00
Campbell Barton
386d6f098a AUTHORS: correct invalid de-duplication 2024-07-08 18:20:53 +10:00
Campbell Barton
c3c69c8956 Merge branch 'blender-v4.2-release' 2024-07-06 15:00:38 +10:00
Campbell Barton
bdf06e6d82 Cleanup: spelling in comments 2024-07-06 14:21:24 +10:00
Campbell Barton
a2482ab450 Merge branch 'blender-v4.2-release' 2024-07-05 21:05:28 +10:00
Campbell Barton
46743e8e3f AUTHORS: add 2 new authors, 3 updated names 2024-07-05 21:04:39 +10:00
Campbell Barton
7447f6415e Merge branch 'blender-v4.2-release' 2024-07-01 15:16:39 +10:00
Campbell Barton
350b8047c6 Extensions: move the wheel_manager out of the extensions add-on
Move wheel management to a generic private module, prepare addon_utils
to handle changes to repositories on load (needed to resolve #123645).
2024-07-01 10:07:16 +10:00
Brecht Van Lommel
6320066a88 Merge branch 'blender-v4.2-release' 2024-06-27 11:50:34 +02:00
Brecht Van Lommel
b802f146e6 Tools: Move warning about wrong clang-format version to the bottom
So it doesn't scroll off screen and is easy to miss.
2024-06-27 11:49:00 +02:00
Brecht Van Lommel
3072e6f518 Merge branch 'blender-v4.2-release' 2024-06-26 21:30:39 +02:00
Brecht Van Lommel
4e4d8476c4 Tools: Remove cycles commit syncs script, moved to the standalone repo
Pull Request: https://projects.blender.org/blender/blender/pulls/123788
2024-06-26 21:30:00 +02:00
Campbell Barton
4cf4f6d06e Merge branch 'blender-v4.2-release' 2024-06-26 10:27:52 +10:00
Campbell Barton
7dfedf4e84 Tools: various fixes/corrections to the autopep8 formatter
When autopep8 is accessed as a Python module (using `--no-subprocess`),
which is now default on MS-Windows.

- Perform version checks on the module version instead of the command.
- Remove checks for the command existing in the PATH.
- Adjust errors to make sense for a Python module.
2024-06-26 10:08:03 +10:00
Campbell Barton
428c525a41 Merge branch 'blender-v4.2-release' 2024-06-23 13:02:13 +10:00
Campbell Barton
f646956149 Cleanup: spelling in comments 2024-06-23 12:25:22 +10:00
Thomas Dinges
c7a5e08162 Tools: Print second list with title and creation date for issues
Also sort by number / creation date.
2024-06-20 12:49:31 +02:00
noodlebox
de986e68d4 Cleanup: spelling and duplicates in local dictionary
Correct some misspellings in the custom spellcheck dictionary as well
as any instances of the previous spellings in code comments.

Ref !123459
2024-06-20 17:30:08 +10:00
Campbell Barton
dc4c440f9f AUTHORS: add 32 new authors 2024-06-18 12:09:43 +10:00
Campbell Barton
0554ec7ec7 Cleanup: spelling in comments 2024-06-18 12:09:40 +10:00
Campbell Barton
98bb157ad9 License headers: add SPDX header
Also include "addons_core" in license check.
2024-06-07 12:09:58 +10:00
Ray Molenkamp
9f1f869e16 make.bat: Enable .py formatting with make format
autopep8_format_paths.py was never wired up in the windows tooling,
this PR wires it up, to get around a 8191 limitation for command
lines on windows an alternative "--no-subprocess" option has been
introduced to call the pep8 module directly from python.

TODO: A subprocess is still used for getting the version information

Contributors:

- @campbellbarton fixes to autopep8_format_paths.py to support
  the -no-subprocess option.

Pull Request: https://projects.blender.org/blender/blender/pulls/120794
2024-06-06 09:10:19 -06:00
Campbell Barton
7f7648c6ed Cleanup: spelling in code comments & minor edits
- Use uppercase NOTE: tags.
- Correct bNote -> bNode.
- Use colon after parameters.
- Use doxy-style doc-strings.
2024-06-06 09:55:13 +10:00
Campbell Barton
53d076612a Tools: add a hash-length argument for the weekly reports generator
Allows generating reports without abbreviated hashes.
2024-05-30 23:34:24 +10:00
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