Commit Graph

368 Commits

Author SHA1 Message Date
Brecht Van Lommel
3bbd4294d9 Merge branch 'blender-v4.0-release' into main 2023-10-04 21:32:58 +02:00
Brecht Van Lommel
61f982f0d1 Cleanup: make format 2023-10-04 21:30:41 +02:00
Campbell Barton
9c018def3e Cleanup: spelling in comments 2023-10-03 11:24:48 +11:00
Campbell Barton
8d58b86228 addr2line_backtrace: fix error printing absolute paths are relative 2023-09-27 16:50:49 +10:00
Campbell Barton
5126677c6f Tests: add batch blend file loading utility
Useful for finding regression in file reading as well as issues reported
by ASAN, including memory leaks.
2023-09-27 16:50:09 +10:00
Campbell Barton
46263a85ab Cleanup: spelling in comments 2023-09-27 13:03:29 +10:00
Campbell Barton
6c91e1c205 Cleanup: spelling in comments 2023-09-25 15:25:43 +10:00
Campbell Barton
6a8fc659ba Cleanup: spelling in comments 2023-09-22 10:02:05 +10:00
Campbell Barton
b7f3e0d84e Cleanup: spelling & punctuation in comments
Also remove some unhelpful/redundant comments.
2023-09-14 13:25:24 +10:00
Campbell Barton
9e41eccc6e Cleanup: spelling in comments 2023-09-08 17:12:29 +10:00
Campbell Barton
73057cfd22 check_spelling: include *.metal files 2023-09-07 20:44:33 +10:00
Campbell Barton
ddf881ad9b Tools: add addr2line_backtrace to extract back-trace info on Unix/Linux
Since hiding symbols on Linux, in many cases only addresses are printed.
This utility can run run on the back-trace to replace addresses
with line & function information.

See: ./tools/utils/addr2line_backtrace.py --help for usage information.

Note that some examples online run addr2line directly and use the output
in the stack-trace, while convenient and acceptable in some cases, in my
tests addr2line can take over 20 seconds to complete for a single
address. Implement this as a post-process instead. Multi-processing to
prevent this taking too long (around ~23 seconds on my system).

Ref !111416.
2023-09-06 22:07:07 +10:00
Sergey Sharybin
7365f0b094 Cleanup: Cover .metal files with make format
Pull Request: https://projects.blender.org/blender/blender/pulls/111930
2023-09-05 09:59:47 +02:00
Campbell Barton
0c26c84704 Cleanup: spelling in comments 2023-09-05 11:04:27 +10:00
Campbell Barton
0cfa9dcec1 check_spelling: correct line numbers for Python extraction 2023-09-05 10:49:17 +10:00
Campbell Barton
0c11542708 Cleanup: rename check_spelling_c_config to check_spelling_config
This is used for GLSL/Python sources too.
2023-09-03 21:36:04 +10:00
Campbell Barton
e8c812a307 Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
Campbell Barton
9af2291541 check_spelling: rename check_spelling_osl -> check_spelling_shaders
- 'make check_spelling_shaders' now checks MSL & GLSL spelling.
- Add '--match' argument to 'check_spelling.py' for more configurable
  checks without relying on picking directories that only contain the
  desired file-type.
- Ignore spelling for scripts/addons & scripts/addons_contrib.
2023-09-03 21:35:07 +10:00
Clément Foucault
05816e6f7a Fix GPU: MSL sources not considered by make format 2023-09-01 10:40:21 +02:00
Campbell Barton
3d607be572 Cleanup: spelling in comments 2023-08-30 10:57:12 +10:00
Campbell Barton
02955495cb AUTHORS: update 2023-08-29 15:09:05 +10:00
Germano Cavalcante
5f3b271421 Triage Tools: Remove workarround when searching for issues
When the `'state'` is not informed, it means that only open issues will
be fetched.

Because of this, a workarround was used to enclose the closed ones as
well.

However, we can use `'all'` to fetch both open and closed.
2023-08-28 14:33:48 -03:00
Campbell Barton
3de8900ed6 Cleanup: spelling in comments 2023-08-25 09:40:42 +10:00
Campbell Barton
0148293520 License headers: add SPDX licenses for '*.glsl' files
When GLSL sources were first included in Blender they were treated as
data (like blend files) and had no license header.
Since then GLSL has been used for more sophisticated features
(EEVEE & real-time compositing)
where it makes sense to include licensing information.

Add SPDX copyright headers to *.glsl files, matching headers used for
C/C++, also include GLSL files in the license checking script.

As leading C-comments are now stripped,
added binary size of comments is no longer a concern.

Ref !111247
2023-08-24 10:57:03 +10:00
Campbell Barton
f66fa32ada Cleanup: spelling in comments 2023-08-23 13:30:55 +10:00
Bastien Montagne
b404df6989 Further tweaks to LSAN suppression rules.
Mainly add more python-related suppressions.

Also suppressed some reports from `pxr` (usd) libraries.

Now most tests are passing again with ASAN/LSAN on on my machine,
besides modifiers and geometry nodes ones, which often fail on a
mysterious `libstdc++.so.6+0xb259a` leak.
2023-08-21 14:07:16 +02:00
Campbell Barton
33a05725be Cleanup: spelling in comments 2023-08-21 10:05:45 +10:00
Campbell Barton
4f72240c1d Cleanup: spelling (correct correction), update dictionary 2023-08-19 20:19:13 +10:00
Campbell Barton
04bf0f3eb6 License headers: add SPDX copyright entries for '*.msl' files 2023-08-19 17:41:14 +10:00
Campbell Barton
b903ce04d8 AUTHORS: add new developers 2023-08-19 14:58:05 +10:00
Campbell Barton
ccdaba69a5 Tools: improve progress output for credits & author generation
Show a percentage output as the numbers weren't especially meaningful.

Also use default arguments for credits generator so no arguments
are required to generate all-time credits.
2023-08-19 14:51:38 +10:00
Campbell Barton
d78189e406 Tools: set the renameLimit for git_log to avoid warnings
Generating credits/authors would print warnings from commits
that renamed many files, increase the diff.renameLimit to account for
this and suppress the warning.
2023-08-19 14:51:38 +10:00
Campbell Barton
bc1ffdce5b Cleanup: spelling in comments 2023-08-18 08:56:12 +10:00
Campbell Barton
ae4cb60ea3 Authors Script: support excluding authors via GLOB expressions
Exclude `* <*@apple.com>` developers,
update canonical authors.

No changes to the generated output.
2023-08-17 12:43:11 +10:00
Pablo Vazquez
952371e63b Fix typo in blender_theme_as_c.py 2023-08-16 17:55:39 +02:00
Campbell Barton
63fa5b92e7 Authors Script: add script to generate individual contributors
Add the script used generate individual contributors for AUTHORS,
add "make authors" utility that updates the AUTHORS file in-place.
2023-08-16 21:00:20 +10:00
Campbell Barton
139dc716f1 Credits Script: improve author de-duplication
- Add git_data_canonical_authors module with maps various
  "Author <email>" combinations to a single author.
- Add git_data_sha1_override_authors module which
  overrides authors for individual commits.
- GitCommit.author now includes the email.
- Move co-author access into GitCommit.co_authors.

Using name & email, then de-duplicating removes 43 duplicates in the
generated credits.

Moving the author & override mapping out of credits_git_gen.py
allows this data to be shared by a utility to update AUTHORS
(not yet committed).
2023-08-16 19:54:37 +10:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Campbell Barton
8c5c5142d5 Cleanup: use type checking for credits_git_gen.py & git_log.py 2023-08-15 15:18:01 +10:00
Campbell Barton
31c025c856 Cleanup: minor changes to credits_git_gen.py
- Don't write 2x blank lines in between each author.
- Don't abbreviate unicodedata as it's only used once.
2023-08-15 15:01:06 +10:00
Campbell Barton
08690709db Credit Script: use multi-processing, add --jobs command line argument
On my system this gives between 30-40x speedup, generating the credits
now takes about 36 seconds.

Move the is_credit_commit_valid check inside the process_commit method
to avoid bottle necking on a single process.
2023-08-15 14:22:53 +10:00
Bastien Montagne
375a7b6bb5 Fix (unreported) LSAN suppression list removing almost all (valid!) errors.
The last supression rule (`leak:libasan*`) would match almost all
detected cases, since the first line is almost always something like
that:
  #0 0x7f71040d85bf in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69

Not sure if that was already the case when this suppression rule was
added, or if things changed in newer versions of ASAN/LSAN...
2023-08-09 20:18:25 +02:00
Campbell Barton
f940eb7739 Cleanup: quiet compiler warnings, also correct typo & pep8 formatting 2023-08-09 20:24:24 +10:00
Campbell Barton
8b8fe49d34 License headers: add SPDX-FileCopyrightText 2023-08-06 18:59:05 +10:00
Campbell Barton
19c3d7ee7d Tools: add use_listbase_foreach_macro edit to code_clean utility
Replaces loops on list bases with LISTBASE_FOREACH &
LISTBASE_FOREACH_BACKWARD.
2023-08-05 14:42:42 +10:00
Germano Cavalcante
b31ccdcf4a Fix undefined variable usage
Error in b6ed70cd92
2023-08-04 16:28:15 -03:00
Germano Cavalcante
b6ed70cd92 Triage: Add 'weekly_report' and 'issues_needing_info' tools
This commit adds 2 tools for triaging:
- /tools/triage/weekly_report.py
- /tools/triage/issues_needing_info.py

These tools automatically detect the username to list activities related to the user.

Pull Request: https://projects.blender.org/blender/blender/pulls/110652
2023-08-04 19:32:25 +02:00
Campbell Barton
1f612605ab Fix #110732: blender_theme_as_c fails fails with error
Renaming members of a struct that it's self was renamed was not working,
support renamed structs as well as order member renaming - needed for
the lamp members that replace one member with another.
2023-08-04 18:00:08 +10:00
Campbell Barton
1e1f4db8b6 Tools: add 'diff' and 'email' attrs to git_log utility module
Expose email email & diff as they're generally useful when inspecting
commits.
2023-08-04 14:46:24 +10:00
Campbell Barton
ed6e24b176 Fix resource leak in git_log utility module
Resolve a resource leak I encountered in credits_git_gen.py during
development, where it could exit with an OSError: "Too many open files".
2023-08-04 14:37:32 +10:00
Campbell Barton
9ba38d5bb6 License checker: scan paths "*.inl;*.ch;*.osl;*.metal;*.tables" 2023-08-04 13:24:18 +10:00
Campbell Barton
f88f1c4011 Cleanup: quiet mypy warning 2023-08-04 11:27:34 +10:00
Campbell Barton
dddf07c2ce Tools: update 'check_cmake' check to skip PUBLIC/PRIVATE prefixes 2023-08-01 14:24:46 +10:00
Campbell Barton
90e123c746 Tools: fix code_clean cleaning generated files
When a relative build directory was passed in, code-clean wasn't
filtering out generated sources and would clean them too.
2023-07-31 19:57:27 +10:00
Campbell Barton
724755879e Cleanup: spelling in comments, use doxygen doc-strings 2023-07-31 10:18:09 +10:00
Campbell Barton
27cb0e18b7 code_clean: skip "parenthesis_cleanup" in macro definitions
Don't remove parenthesis in macro definitions as it's important to keep
parenthesis around arguments.
2023-07-27 12:10:14 +10:00
Campbell Barton
4fd3ec6337 Tools: code_clean: add a default value for '--edits' & '--match'
Each edit-generate now declares if it's generally considered safe
(isn't likely to make changes that break on other platforms for e.g.)
Default edits are now used when --edits is omitted.

The match argument now defaults to files with c/cc/cpp extensions when
omitted.

It's now possible to run:

  ./tools/utils_maintenance/code_clean.py {BUILD_DIR}

Which gives results that can be used with a very low risk of causing
functional changes or breaking other platforms.
2023-07-25 13:25:19 +10:00
Campbell Barton
ad7150dcca Tools: improve code_clean's 'remove_struct' edit to avoid CPU overhead
Many struct removals were being tested which always failed.
Avoid testing removal of forward declarations & struct declarations.
2023-07-25 13:24:59 +10:00
Campbell Barton
481eaff790 Tools: improve code_clean's 'use_brief_types' edit to skip typedef's
`typedef unsigned int uint;` could be converted into
`typedef uint uint;`.

Resolve by skipping instances of unsigned that follow a typedef.
2023-07-25 13:24:59 +10:00
Dalai Felinto
29b67ad31b Manual Reference: Includes the copyright
This was an oversight on the license headers copyright pass [1].

Also since the manual reference is generated by this script
we can update the copyright year every time.

[1] - 8f109712ee6d
2023-07-21 14:18:46 +02:00
Campbell Barton
22354e8f84 Tools: add --verbose argument for code_clean.py
Support `--verbose compile,edit_actions` (one or both can be selected),
to output the compiler output of each edit and the text (before/after).

This replaces existing hard-coded values.

Other minor changes:

- Print the file-path for each edit for better context.
- Print skipped edits when multiple edits are passed in so other
  edits might be applied separately are listed.
2023-07-21 11:08:24 +10:00
Campbell Barton
c1cb7f0900 Tools: more efficient grouping of edits code_clean.py
Group edits where possible, instead of waiting for each edit to complete
for all files. This avoids bottlenecks on single files as much.
2023-07-21 00:13:13 +10:00
Campbell Barton
b1daf6bfad Tools: add --jobs arguments to clang checker and code-clean tool
Setting jobs to one is useful for debugging, reducing the number
of threads can be useful for code_clean as a background task.
2023-07-21 00:13:13 +10:00
Campbell Barton
08f4f1f41e Cleanup: spelling in comments, capitalize tags 2023-07-20 09:42:00 +10:00
Campbell Barton
1dec7189ed Fix '--help' message error in code_clean when '%' characters were used 2023-07-13 09:54:05 +10:00
Campbell Barton
f9316e4079 Cleanup: spelling in comments 2023-07-12 12:45:35 +10:00
Dalai Felinto
9e3bd8a2d0 Fix gitea inactive script duplicated results
Although we had only 190 developers, the script
was accusing a total of 365 developers (with 188 inactive).

There were two problems here:
* The gitea API was only using the `limit` paramater when an explicit
  page was passed.
* There was a bug with the get_next_page code, that would skip the last
  page.

I now made the page always an explicit argument passed to fetch_single.

With this fix we now get: 190 developers with 98 inactive.
2023-07-10 17:00:58 +02:00
Campbell Barton
23acedd432 Cleanup: code-comments 2023-07-07 15:11:19 +10:00
Campbell Barton
785bd13b9a Cleanup: spelling in comments 2023-07-05 14:09:33 +10:00
Jeroen Bakker
8f00659fb7 Cleanup: make format 2023-07-04 07:51:11 +02:00
Thomas Dinges
3346d433ee Credit Script: Update lookup table to deduplicate authors. 2023-07-03 15:41:07 +02:00
Campbell Barton
feb83e66c6 code_clean: add use_empty_void_arg cleanup operation
Removes the use of (void) in C++ for functions with no arguments
2023-07-02 19:54:27 +10:00
Campbell Barton
ffab21a3ef Cleanup: format 2023-07-02 19:54:26 +10:00
Bastien Montagne
56e9abf133 Update credits_git_gen tool to also parse co-authors in commit messages,
Co-authors listed following the `Co-authored-by:` format in a commit
message will be automatically added to the list of contributors.

Further more, it is now possible to overwrite authors informations from
git commits with embedded data, in case it is necessary to correct some
commit's author information after the commit has been pushed.

Implements #109438.

Pull Request: https://projects.blender.org/blender/blender/pulls/109468
2023-06-30 14:52:53 +02:00
Campbell Barton
d1e6c8f5a6 Cleanup: spelling in comments 2023-06-28 12:27:48 +10:00
Campbell Barton
8cd877641d check_licenses: minor improvements to output
Right align numbers and use thousands separator.
2023-06-22 12:35:51 +10:00
Brecht Van Lommel
f4e6981513 Merge branch 'blender-v3.6-release' into main 2023-06-21 15:15:23 +02:00
Brecht Van Lommel
17fa168a3d Linux: add launcher script to fix issue launching on Steam
The steam environment sets LD_LIBRARY_PATH with a libtbb.so.2 that is
incompatible with our own. This wrapper scripts gives our own library
priority.

There is a more modern "Steam Linux Runtime" that can be used instead of
the "LD_LIBRARY_PATH Steam Runtime" and which launches Blender, but it
fails to detect GPU compute libraries. So that was not an option.

Ref #107385

Pull Request: https://projects.blender.org/blender/blender/pulls/109169
2023-06-21 14:49:27 +02:00
Campbell Barton
d1e63f89bb License checker: quiet false positive for blender_theme_as_c.py 2023-06-15 16:47:51 +10:00
Campbell Barton
1b508de749 License headers: use SPDX-FileCopyrightText in intern/opensubdiv 2023-06-15 16:47:51 +10:00
Campbell Barton
60d90de9a5 Cleanup: remove unused imports, quiet pylint warnings 2023-06-15 13:35:34 +10:00
Campbell Barton
9ddbbbfeae License checker: check for SPDX-FileCopyrightText: in the header 2023-06-15 13:35:34 +10:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton
8f109712ee License headers: use SPDX-FileCopyrightText for build_files/ & tools/ 2023-06-14 23:36:23 +10:00
Hans Goudey
7d935f94f3 Cleanup: Grammar: it's vs its 2023-06-13 14:51:49 -04:00
Campbell Barton
2f1899a7fa Cleanup: spelling in comments 2023-06-09 11:40:50 +10:00
Campbell Barton
e2cb52594a code_clean: add 'remove_struct_qualifier' edit
Removes struct qualifier when it's not needed.
2023-05-31 17:12:19 +10:00
Campbell Barton
d133d622c1 Merge branch 'blender-v3.6-release' 2023-05-27 13:47:02 +10:00
Campbell Barton
b18b7c1de1 make format: include tools/ as it's no longer a sub-module 2023-05-27 13:43:33 +10:00
Campbell Barton
13c815085b Cleanup: spelling in comments 2023-05-24 11:21:18 +10:00
Campbell Barton
bf36a61e62 Cleanup: spelling in comments & some corrections 2023-05-20 21:17:09 +10:00
Campbell Barton
0099f51cdd Cleanup: sort file, uppercase booleans, add missing headers
Also update files to ignore for check_cmake.
2023-05-17 13:13:10 +10:00
Campbell Barton
2f9538a8c7 code_clean: add utility for replacing BLI string copy/printf with macros
These macros have the advantage of being less verbose and disallowing
sizeof(..) referencing the size of a pointer. e.g. #107443.
2023-05-09 13:16:09 +10:00
Campbell Barton
ba3d7499fa Cleanup: spelling, use term polygons in polygon callbacks 2023-05-05 09:46:28 +10:00
Campbell Barton
0c27c6f876 Cleanup: spelling in comments
Also remove redundant comment.
2023-04-28 12:23:29 +10:00
Campbell Barton
db1af0e325 Cleanup: spelling in comments 2023-04-26 16:14:07 +10:00
Damien Picard
3f0d2cf9e1 Add scripts dir to the make format paths for Python
`make format` uses autopep8 to format Python, using a list of paths
specified in `tools/utils_maintenance/autopep8_format_paths.py`. The
scripts folder used to be a submodule inside release, but it is now at
the root of the blender repo.

This commit adds `scripts` to the list of paths to format.

Ref !107143
2023-04-20 05:30:34 +02:00
Campbell Barton
6722f90734 Cleanup: quiet mypy warnings in gitea_inactive_developers
Also add to the list of scripts to check with "make check_mypy".
2023-04-16 17:03:56 +10:00
Campbell Barton
8afb8db66e Cleanup: spelling in comments 2023-04-16 16:24:38 +10:00
Dalai Felinto
23bce32888 Tools: util to get inactive member of teams from gitea
Note, at the moment it is using the last login as a criteria to
whether the person should be listed (comparing it to 2 years past).

However anyone who hasn't logged in in gitea yet shows as last login 1970.

To run this you need to install all the required python packages and
generate a token with scope "read:org" or "admin:org".

See:
https://projects.blender.org/infrastructure/blender-projects-platform/issues/55
2023-04-14 14:54:26 +02:00