Commit Graph

334 Commits

Author SHA1 Message Date
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] - 8f109712ee
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
Campbell Barton 440cccecdc Cleanup: spelling in comments 2023-04-05 14:39:51 +10:00
Campbell Barton bb2dc141f2 Cleanup: spelling in comments 2023-03-27 12:08:14 +11:00
Hans Goudey cef82a1d39 Cleanup: Grammar: "it's" vs "its" 2023-03-24 08:34:21 -04:00
Campbell Barton 31147c90c4 code_clean: restrict 'use_function_style_cast' edits to C++
Allows running multiple edits at once on C & C++ files without
C++ edits being attempted on C source.
2023-03-21 19:50:46 +11:00
Campbell Barton d64dfc4333 Cleanup: spelling in comments 2023-03-10 12:58:10 +11:00
Campbell Barton 05324e2e3c Cleanup: spelling in comments 2023-03-03 10:09:20 +11:00
Bastien Montagne 4d58f01424 Add LSAN suppression rules config file.
This file has been tested on linux, other platforms may need some
tweaks, and/or dedicated files.

This is used to suppress errors with builds integrating ASAN sanitazing
tools, regarding memleaks detected in some third party libraries.

To use it, define the envvar option like that:

`LSAN_OPTIONS=print_suppressions=false:suppressions=/path/to/blender/source/tools/config/analysis/lsan.supp`

This is especially usefull when running ctest.

NOTE: Will also update https://wiki.blender.org/wiki/Tools/Tests/Setup
and https://wiki.blender.org/wiki/Tools/Debugging/ASAN_Address_Sanitizer
accordingly.
2023-03-01 16:24:59 +01:00
Campbell Barton 01e711749b pyproject: remove tools/pyproject.toml
Rely on ./pyproject.toml. This file was only separated because it was in
an external repository.
2023-03-01 22:18:28 +11:00
Campbell Barton e1ab9e352c Cleanup: autopep8 2023-03-01 22:12:18 +11:00
Campbell Barton bd0aa88909 Fix invalid path references after moving tools & scripts 2023-03-01 22:00:46 +11:00
Campbell Barton cca5f18303 Fix path for check_mypy_config 2023-02-28 15:11:27 +11:00
Campbell Barton 347cbbff2d Fix path in check_licenses utility 2023-02-27 21:34:53 +11:00
Sergey Sharybin 9b70039014 Fix paths in the auto-formatting tools
Those got missed in the submodule change commit.

Pull Request #105178
2023-02-24 15:52:34 +01:00
Sergey Sharybin e28a9a87c9 Fix references to the /release/scripts directories
Those were moved to the /scripts
2023-02-21 18:40:47 +01:00
Sergey Sharybin 03806d0b67 Re-design of submodules used in blender.git
This commit implements described in the #104573.

The goal is to fix the confusion of the submodule hashes change, which are not
ideal for any of the supported git-module configuration (they are either always
visible causing confusion, or silently staged and committed, also causing
confusion).

This commit replaces submodules with a checkout of addons and addons_contrib,
covered by the .gitignore, and locale and developer tools are moved to the
main repository.

This also changes the paths:
- /release/scripts are moved to the /scripts
- /source/tools are moved to the /tools
- /release/datafiles/locale is moved to /locale

This is done to avoid conflicts when using bisect, and also allow buildbot to
automatically "recover" wgen building older or newer branches/patches.

Running `make update` will initialize the local checkout to the changed
repository configuration.

Another aspect of the change is that the make update will support Github style
of remote organization (origin remote pointing to thy fork, upstream remote
pointing to the upstream blender/blender.git).

Pull Request #104755
2023-02-21 16:39:58 +01:00
Campbell Barton d80d6e2812 re-arrange build files so scons "config" dir isnt confused with ~/.blender/2.52/config 2010-07-12 18:26:35 +00:00
Nathan Letwory f38511cbed === Windows Installer ===
* add info about bitness: 32bit, 64bit or mingw-build
2010-07-06 09:19:52 +00:00
Nathan Letwory f655911c91 === Windows Installer ===
* Proper deletion of install dir - everything under it will be gone
* Ask if config/userdata can be removed and act accordingly. If selected, everything under user/config dir (BLENDERHOME) will be gone.
* The installer now will automatically update vc runtime

To be able to properly create an installer, you need:
- NSIS, and the MoreInfo plugin for NSIS. Make sure NSIS is in your path
- Set in your user-config.py BF_VCREDIST full path to the redist you have.

Note: this works only with SCons.
2010-07-06 09:13:10 +00:00
Nathan Letwory 78adaa6bc7 * use blender_decimal_version() in places where '.blender/' was still being used
* simplify the NSIS file creation (and add those files back).

NOTE: The installer is still pretty much WIP, tomorrow more improvements.
2010-07-05 19:59:27 +00:00
Nathan Letwory 462d889720 another fix for osx scons 2010-07-05 10:32:14 +00:00
Nathan Letwory 49b13c5385 Brainfart cleanup. 2010-07-05 09:33:17 +00:00
Nathan Letwory 1c35121213 == SCons ==
Updated to comply with datafiles filepath patch.

I've tried to do some changes for OSX too, but I'm not sure if they're correct,
so OSX people, please test and report.
2010-07-05 07:06:19 +00:00
Andrea Weikert ca81aa704e Patch [#22339] File/installation paths changes
Patch Tracker: http://projects.blender.org/tracker/?func=detail&aid=22339&group_id=9&atid=127

This patch implements the proposal outlined here:
http://wiki.blender.org/index.php/Dev:2.5/Source/Installation/Proposal

Original patch by Matt Ebb.
Contributions by Nathan Letwory, Damien Plisson and Andrea Weikert

NOTE:
This is a work in progress commit, some work still needs to be done on the SCons and CMake files for this to work properly, but at least should compile and the files should be created in the right directory.

Commit discussed on IRC with Ton and Campbell.
2010-07-04 15:35:23 +00:00
Nathan Letwory 2403214cb4 Moving FFMPEG lib path include to first in the list. This might fix '[#21312] 2.5 Fails to Build Against Latest FFMPEG svn'
PS. note the nice palindromic bug report number.
2010-06-05 12:55:32 +00:00
Campbell Barton ab5367e09f support for building with scons & python 2.4x 2010-06-03 23:37:51 +00:00
Sergey Sharybin 735559f0da Fixes for cross-compilation:
- Set env['CC'] and env['CXX'] as default values for
  CC and CXX variables. This fixes problem with overwriting
  auto-guessed compilators when reading config files
- Added new prefix for mingw tools
2010-05-23 21:20:13 +00:00
Matt Ebb 2be851c966 Blender TIFF support
* Removed dynamic linking libTIFF code and change it to static linking 
(built into the blender executable). Dynamic linking made things a 
fair bit more complicated and wasn't working at all before on OS X - 
the dylib didn't exist and wasn't being copied. Since TIFF is more heavily
depended upon now in Blender, it makes sense to make it less 'optional'
and more in line with other libraries.

I've updated both CMake and scons, and CMake on OS X/64bit works fine.
It's now up to other platform/build system maintainers to enable this for 
their respective platforms (Campbell will check it for linux). For windows,
and non-64bit osx, we need static libtiff libraries in /lib.

I've added options WITH_TIFF for CMake and WITH_BF_TIFF for scons,
so if blender won't build because of this, you should be able to disable 
these options until your build system has been updated.

* Bonus feature: while doing this, I added support for loading 16bit and 32bit 
per channel TIFFs - they get converted to Blender's float buffers. Handy for 
zbrush displacement maps!
2010-05-21 03:25:38 +00:00
Campbell Barton 6c9aa76d21 revert joes commit and apply change from Aligorith.
remove scripts dir only.
2010-02-13 10:55:04 +00:00
Joseph Eagar ea8c807db0 ideasman/brecht: please don't touch this again. this clears the .blender folder along with everything else; oddly enough it left in the .B25.blend, but bookmarks/recent file lists were nuked. anyway, I just made the install folder deletion off by default. if you must do it, do it on the build systems you yourselves use/maintain, don't touch scons. 2010-02-13 10:05:06 +00:00
Campbell Barton 606398fa2f scons option - WITHOUT_BF_OVERWRITE_INSTALL
only use this if your not making packages for others.
2010-02-12 12:29:39 +00:00
Tom Musgrove f2a8bb3498 this restores building on mingw with Collada support, also it restores cross compiling, thanks to Sergey Sharybin for the patch. Note that the icons for linux cross might not be committed here, if not i'll add them in another commit 2010-02-01 18:39:41 +00:00
Nathan Letwory 6a0a5b54ec Little fun feature for SCons users: set BF_LINE_OVERWRITE=True in your user-config.py or on command-line when BF_QUIET=True. This will reuse the same line of the previous compile message (Compiling ==>...). Warnings and other messages will still go on their own lines. Remember to set BF_LINE_OVERWRITE=False when you are redirecting the build output to a file 2010-01-14 13:42:15 +00:00
Brecht Van Lommel 88485f7c03 Fix #20569: scons missing BF_NO_ELBEEM from allowed command line options. 2010-01-05 14:30:55 +00:00
Martin Poirier 76ce02ddc0 removing unwanted svn:executable properties 2009-12-21 16:19:08 +00:00