Commit Graph

17 Commits

Author SHA1 Message Date
Sergey Sharybin c1bc70b711 Cleanup: Add a copyright notice to files and use SPDX format
A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.

This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.

Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.

Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:

    https://reuse.software/faq/
2023-05-31 16:19:06 +02:00
Germano Cavalcante fb7f12dc40 Cleanup: hide 'UNUSED' macro definition for C++
This may allow the `C4100` warning to be re-enabled in the MSVC for C++.

Differential Revision: https://developer.blender.org/D16828
2022-12-20 19:16:33 -03: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
Jacques Lucke 91694b9b58 Code Style: use "#pragma once" in source directory
This replaces header include guards with `#pragma once`.
A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`),
because they are used in other places.

This patch has been generated by P1561 followed by `make format`.

Differential Revision: https://developer.blender.org/D8466
2020-08-07 09:50:34 +02:00
Jacques Lucke 5de56f9596 Cleanup: make remaining blenkernel headers work in C++ 2020-03-02 15:07:49 +01: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 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 dca3d3ef0e Cleanup: use BLI_compiler_compat.h for BLI_INLINE 2018-11-07 12:17:58 +11:00
Sergey Sharybin 94ec80d21c CCG: Remove number of layers from key
The issue there was that number of layers did not include normals,
while element size counts bytes used by normals. This sounds very
fragile and dangerous to work further. Also, one value can easily
be delivered from another, so it is redundancy going on here.

Possible difference now is that multires subdivision will copy
normals to a higher levels. Shouldn't be big of a problem, since
leaving old normals and updating coordinates is not correct either.
2018-09-05 15:56:50 +02:00
Campbell Barton 8beb565c59 code cleanup: headers - doxy comments. 2013-09-12 03:02:50 +00:00
Campbell Barton 0d0291f6e1 code cleanup: incorrect sized array args, remove some redundant code. 2013-03-17 10:26:23 +00:00
Campbell Barton 9dd981a440 style cleanup: block comments 2012-05-16 23:37:23 +00:00
Campbell Barton 9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
Sergey Sharybin dabc22826d Compilation error fix: abort() wasn't declared in BKE_ccg.h before 2012-05-11 05:27:23 +00:00
Nicholas Bishop 2ca64189b7 Add CCGKey/CCGElem for accessing CCGSubSurf elements.
CCGKey caches information about the CCGSubSurf element layout. This
data, along with the CCG_* inline functions, allows access to
CCGSubSurf elements with an arbitrary number of layers (as opposed to
the hardcoded DMGridData structure which assumes xyz coordinates
followed by three normal components.)

The CCGElem structure is declared but not defined anywhere, just used
as a convenient type.
2012-05-10 20:32:51 +00:00