Commit Graph

488 Commits

Author SHA1 Message Date
Dalai Felinto
8cff5ecb4d Cleanup: make_license: use Path more deliberately
Changes suggested by Sybren Stüvel.

The original suggestion was even to use resolve() instead of abspath,
but we don't even need that here.
2024-10-21 11:55:27 +02:00
Campbell Barton
81025eabd2 Refactor: various changes to "make license"
- Avoid manipulating a dictionary arguments, use return values &
  iterators to return results.
- Move logic out of the file reading context once the file was read
  (reducing right-shift).
- Move intermediate license data from a dictionary to a named-tuple
  for better clarity & type safety.
- Remove use of `dataclass` as a container for constants,
  as it quite clear to define the constants directly in the
  global namespace.
- Group imports at the beginning of the file (no need to quiet pylint).
- Add headings for code sections.
- Use double quotes.
- Use the term "dir" instead of both dir/folder.
- Note the limitations parsing CMake files directly,
  with a possible alternative.
2024-10-19 17:53:17 +11:00
Campbell Barton
9f0043b8d6 Fix "make license" hiding duplicate versions of the same library
There are two "SPIRV TOOLS" IGC_SPIRV_TOOLS & SHADERC_SPIRV_TOOLS, in:
build_files/build_environment/cmake/versions.cmake

Show both in the license.md file.

Also remove use of defaultdict to make it clear where dictionary
values are created.
2024-10-19 17:53:16 +11:00
Campbell Barton
675aa86ca6 make license: clear trailing white space & ensure newline at eof
Clear trailing space as this has as space at the line end
has a special meaning in markdown.

Write a new line at the end of the file
since some development tools add this or note when it's missing,
it's simplest just to add it.
2024-10-19 17:52:01 +11:00
Falk David
d61c08453d Merge branch 'blender-v4.3-release' 2024-10-18 18:11:20 +02:00
Falk David
f1a92ea4dd Formatting 2024-10-18 18:10:31 +02:00
Thomas Dinges
6a1fa73b18 Merge branch 'blender-v4.3-release' 2024-10-18 17:20:04 +02:00
Dalai Felinto
0a4dbc57b8 make license: command to update the license file
This generates a `license.md` file with all the relevant information about
the different libraries and their respecive licenses.

This should replace: THIRD-PARTY-LICENSES.txt

Important files:
* `make_license.py` (main script called by `make license`.
* `licenses.json` (file to add the definition of new licenses).
* `licenses/*/*.txt` (individual license files.

The `license.md` groups the libraries per license, list their
corresponding copyright information and include the complete license.

Code includes contributions from:
* Campbell Barton (multi-line parser for versions.cmake).
* Thomas Dinges (Windows support for `make license`).

Part of: !129018
2024-10-18 17:09:43 +02:00
Campbell Barton
2cfc1112d8 AUTHORS: add 1 new author & some updated names 2024-10-17 11:53:51 +11:00
Campbell Barton
233d213ee9 Merge branch 'blender-v4.3-release' 2024-10-17 09:51:20 +11:00
Campbell Barton
46864bc2f4 AUTHORS: add 1 new author & some updated names 2024-10-17 09:48:39 +11:00
Campbell Barton
0b656308cf Merge branch 'blender-v4.3-release' 2024-10-16 21:08:19 +11:00
Campbell Barton
931469484e pyproject.toml: correct autopep8 configuration for 2.3.1
The updated autopep8 was ignoring the "exclude" values because
they started with a "./" instead of a "/".

The documentation I found doesn't go into details, even if this is a
regression in autopep8, update the configuration as it causes
"make format" to format files that aren't meant to be modified.
2024-10-16 20:55:03 +11:00
Campbell Barton
9bd2e3554a Merge branch 'blender-v4.3-release' 2024-10-16 15:07:33 +11:00
Campbell Barton
c3b067dc80 Cleanup: single/double quote use in scripts 2024-10-16 14:45:08 +11:00
Campbell Barton
11e41f7276 Merge branch 'blender-v4.3-release' 2024-10-15 16:22:09 +11:00
Campbell Barton
44d0452a78 Cleanup: spelling in comments 2024-10-15 12:51:05 +11:00
Campbell Barton
19aaa0f065 Merge branch 'blender-v4.3-release' 2024-10-10 12:19:51 +11:00
Campbell Barton
dbf6960bf3 Fix error in triage module listing script
The uncategorized reports were not being created due to incorrect
indentation.
2024-10-10 12:10:18 +11:00
Bastien Montagne
c67e4f5c35 LSAN supp list: add pa_xmalloc from PulseAudio library. 2024-10-08 12:15:30 +02:00
Campbell Barton
2e881eacd1 Cleanup: spelling in comments 2024-10-08 09:54:29 +11:00
Falk David
5f5b1b83d0 GPv3: Rename mode enum names and python identifiers
This renames the mode identifiers to be consistent with e.g. the context mode identifiers and other names used for the new Grease Pencil.

For `object.mode`:
* `PAINT_GPENCIL` -> `PAINT_GREASE_PENCIL`
* `SCULPT_GPENCIL` -> `SCULPT_GREASE_PENCIL`
* `VERTEX_GPENCIL` -> `VERTEX_GREASE_PENCIL`
* `WEIGHT_GPENCIL` -> `WEIGHT_GREASE_PENCIL`

For the internal `ob->mode` flag:
* `OB_MODE_PAINT_GPENCIL_LEGACY` -> `OB_MODE_PAINT_GREASE_PENCIL`
* `OB_MODE_SCULPT_GPENCIL_LEGACY` -> `OB_MODE_SCULPT_GREASE_PENCIL`
* `OB_MODE_VERTEX_GPENCIL_LEGACY` -> `OB_MODE_VERTEX_GREASE_PENCIL`
* `OB_MODE_WEIGHT_GPENCIL_LEGACY` -> `OB_MODE_WEIGHT_GREASE_PENCIL`

Resolves #127374.

Pull Request: https://projects.blender.org/blender/blender/pulls/128604
2024-10-04 19:20:00 +02:00
Campbell Barton
5fa0e1fc8d AUTHORS: add 29 new authors 2024-10-03 15:56:48 +10:00
Campbell Barton
a7ab81d927 PyAPI: remove use of BaseException
BaseException was used as a catch-all in situations where it
didn't make sense and where "Exception" is more appropriate
based on Python's documentation & error checking tools,
`pylint` warns `broad-exception-caught` for e.g.

BaseException includes SystemExit, KeyboardInterrupt & GeneratorExit,
so unless the intention is to catch calls to `sys.exit(..)`,
breaking a out of a loop using Ctrl-C or generator-exit,
then it shouldn't be used.

Even then, it's preferable to catch those exceptions explicitly.
2024-10-01 13:18:46 +10:00
Campbell Barton
c6fd26a3f5 Cleanup: spelling in comments 2024-10-01 09:59:33 +10:00
Campbell Barton
0e08e8bf2d Cleanup: add missing CMake headers, update "check_cmake" config 2024-09-25 19:24:21 +10:00
Campbell Barton
840c65f442 Cleanup: spelling in comments 2024-09-25 19:24:20 +10:00
Campbell Barton
a4f99f41a7 Tools: exclude ./lib/ from deprecation checker 2024-09-23 11:43:35 +10:00
Campbell Barton
a74ad65e8e Tools: only prompts for user input when running in a TTY 2024-09-23 10:31:58 +10:00
Campbell Barton
0e51bad197 Tools: correct module name for module listing script 2024-09-23 10:31:58 +10:00
Campbell Barton
ccfdf79bc3 Tools: support excluding directories for "make format"
As of [0] `intern/itasc/` is excluded from formatting,
however the formatting script was still running clang-format
on files in this directory.

Support ignoring directories to avoid the overhead of running
clang-format which does nothing.

Also add comments & skip creating paths to convert to spaces when
converting tabs to spaces isn't enabled.

[0]: 77617fce77
2024-09-21 19:56:21 +10:00
Campbell Barton
f43da6fc4c Cleanup: format all of ./intern, use .clang-format to exclude paths
Directories in intern/ were selectively formatted based on
paths in `tools/utils_maintenance/clang_format_paths.py`.

This had the following problems:

- Editing files inside intern/ would auto-format on save with editors
  setup to auto-format as there was nothing to disable formatting.
- Some directories were missing (by accident it seems).

Resolve by formatting all of `./intern/` exclude except for
`./intern/itasc/` which includes ITASC & KDL versions we might
want to sync with upstream.
2024-09-20 16:26:42 +10:00
Campbell Barton
0d88125da5 Tools: support check_spelling for CMake files 2024-09-20 13:14:56 +10:00
Alaska
8b71df88ba Tools: Check high priority module bugs against their IDs
This resolve issues where high priority bugs wouldn't be sorted if the
name of a module label changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/127361
2024-09-10 16:46:51 +02:00
Jacques Lucke
c9ed8d7ea7 Fix: Tools: improve gdb frame filter when used in non-debug build 2024-09-05 16:51:44 +02:00
Thomas Dinges
ba17f6fb14 Tools: Update issues script after module rename. 2024-09-05 09:54:19 +02:00
Campbell Barton
ff3949426c Cleanup: spelling in comments 2024-09-02 16:55:19 +10:00
Campbell Barton
fc1cf66646 Tools: set issues_needing_info.py as executable 2024-08-29 14:47:57 +10:00
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