Commit Graph

28 Commits

Author SHA1 Message Date
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
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton
6859bb6e67 Cleanup: format (with BraceWrapping::AfterControlStatement "MultiLine") 2023-05-02 09:37:49 +10:00
Campbell Barton
c434782e3a File headers: SPDX License migration
Use a shorter/simpler license convention, stops the header taking so
much space.

Follow the SPDX license specification: https://spdx.org/licenses

- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile

While most of the source tree has been included

- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
  use different header conventions.

doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.

See P2788 for the script that automated these edits.

Reviewed By: brecht, mont29, sergey

Ref D14069
2022-02-11 09:14:36 +11:00
Campbell Barton
f6fd3a84c2 Cleanup: reorganize doxygen modules
- Nest compositor pages under the compositor module
- Nest GUI, DNA/RNA & externformats modules under Blender.
- Remove modules from intern which no longer exist.
- Add intern modules (atomic, eigen, glew-mx, libc_compat, locale,
  numaapi, rigidbody, sky, utfconv).
- Use 'intern_' prefix for intern modules since some of the modules
  use generic terms such as locale & atomic.
2021-12-14 20:56:11 +11:00
Sebastian Parborg
aadfa31cf0 Fix "use after free" issue in clog
Keep track of clog_refs so we can null the pointers when calling
CLG_exit. Otherwise we will run into issues where the code will try to
access freed data.
2021-04-30 18:01:47 +02:00
Clément Foucault
e856443c99 CLOG: Add getter to know if output supports coloring 2020-10-24 14:07:05 -04:00
Jacques Lucke
8a9912eaf8 Tests: fail automated tests on memory leaks and other internal errors
This adds a new `--debug-exit-on-error` flag. When it is set, Blender
will abort with a non-zero exit code when there are internal errors.
Currently, "internal errors" includes memory leaks detected by
guardedalloc and error/fatal log entries in clog.

The new flag is passed to Blender in various places where automated
tests are run. Furthermore, the `--debug-memory` flag is used in tests,
because that makes the verbose output more useful, when dealing
with memory leaks.

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D8665
2020-08-26 22:02:02 +02:00
Jacques Lucke
e414afbaf6 Cleanup: typos 2020-08-26 11:24:10 +02:00
Campbell Barton
167f5a61e5 C Logging: add macro to check if logging is enabled 2019-07-10 19:39:53 +10:00
Campbell Barton
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton
6eb59c5778 Cleanup: GCC redundant declarations
Previous waning suppression was only tested with clang.
2019-02-23 22:18:34 +11:00
Campbell Barton
702a2ba0ef Cleanup: quiet undeclared variable warnings 2019-02-23 19:20:20 +11:00
Campbell Barton
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton
68ae1f4958 Fix CLOG_STR_AT_SEVERITY macro
Part of D4277 by @sobakasu
2019-01-29 17:28:44 +11:00
Campbell Barton
c383d74228 Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
2019-01-16 16:33:05 +11:00
Campbell Barton
302970b7a5 MSVC: remove compiler __func__ define
No longer needed and exposes a bug in clang-format see: D4185
2019-01-11 09:22:21 +11:00
Campbell Barton
5681631109 Cleanup: ensure header guards come first
Causes clang-format not to detect header guards,
indenting all preprocessor lines in the header.
2019-01-10 08:46:38 +11:00
Campbell Barton
278e3f7d5f Logging: add --show-log-backtrace
Useful in debug builds to see a functions callers.
2018-05-18 11:00:47 +02:00
Campbell Barton
c7cfee04c4 Logging: setting log level wasn't working 2018-05-04 08:00:22 +02:00
Campbell Barton
b237a1c2ea Use int instead of bool
Causes issues when including in some files.
2018-03-31 15:33:15 +02:00
Campbell Barton
db8e7f9780 Logging: add argument --log-show-basename
Optionally strips leading path from filenames when logging.
2018-03-31 15:29:46 +02:00
Campbell Barton
ac4513a5b8 Logging: add ability to exclude categories. 2018-03-31 12:52:47 +02:00
Campbell Barton
5f59c22bf1 Docs: doxygen docs for clog 2018-03-31 12:27:18 +02:00
Campbell Barton
af11eea3fd Fix logger build w/ MSVC 2018-03-31 09:18:30 +02:00
Campbell Barton
891c1cfc9a C Logging: use instead of printf for messages
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.

See D3120 for details.
2018-03-30 18:57:41 +02:00