Commit Graph

39 Commits

Author SHA1 Message Date
Sergey Sharybin a12a8a71bb Remove "All Rights Reserved" from Blender Foundation copyright code
The goal is to solve confusion of the "All rights reserved" for licensing
code under an open-source license.

The phrase "All rights reserved" comes from a historical convention that
required this phrase for the copyright protection to apply. This convention
is no longer relevant.

However, even though the phrase has no meaning in establishing the copyright
it has not lost meaning in terms of licensing.

This change makes it so code under the Blender Foundation copyright does
not use "all rights reserved". This is also how the GPL license itself
states how to apply it to the source code:

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software ...

This change does not change copyright notice in cases when the copyright
is dual (BF and an author), or just an author of the code. It also does
mot change copyright which is inherited from NaN Holding BV as it needs
some further investigation about what is the proper way to handle it.
2023-03-30 10:51:59 +02: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 3d3bc74884 Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value.
Remove these as newer versions of MSVC no longer show this warning.
2022-01-07 14:16:26 +11:00
Campbell Barton 499fec6f79 Cleanup: spelling in comments 2022-01-06 13:54:52 +11:00
Campbell Barton 9e365069af Cleanup: move public doc-strings into headers for 'blenlib'
- Added space below non doc-string comments to make it clear
  these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.

Ref T92709
2021-12-09 20:01:44 +11:00
Campbell Barton 4b9ff3cd42 Cleanup: comment blocks, trailing space in comments 2021-06-24 15:59:34 +10: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 cf93b65a65 Cleanup: make remaining blenlib headers work in C++
Differential Revision: https://developer.blender.org/D6988

Reviewers: brecht
2020-03-02 15:05:15 +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 5513da65b2 Cleanup: trailing space for BLI 2018-06-17 16:32:54 +02:00
Campbell Barton ccdacf1c9b Cleanup: use '_len' instead of '_size' w/ BLI API
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
  (hint this isn't a simple getter).

See P611 to apply instead of manually resolving conflicts.
2018-02-15 23:39:08 +11:00
Campbell Barton d4aaa4f9b6 cleanup: use const for smallhash & minor edits 2014-12-18 13:12:25 +01:00
Campbell Barton d5abe8419d Smallhash: add support for iterating value pointers
also add reinsert function
2014-12-09 17:18:05 +01:00
Campbell Barton 151800662f Smallhash: BLI_smallhash_calc_quality
Also add inline hashing function to measure different methods.
2014-08-23 21:18:11 +10:00
Campbell Barton c4345a808c Smallhash: add reserve option to avoid resizing when size is known 2014-02-02 17:08:26 +11:00
Campbell Barton 7c9b106589 Smallhash: optimizations
- remove static array used only for copying (use alloca on resize)
- set SMSTACKSIZE to one of the values in 'hashsizes' since the full available size was never used.
- ensure ~1.5x as many buckets as entries, was 3x which caused malloc's quite early on.
2014-02-02 02:24:48 +11:00
Campbell Barton 1f64371ec0 Smallhash: refactor and fixes
- BLI_smallhash_remove didnt decrement total entries.
- rename vars to match closer to ghash.
- smallhash_lookup returns NULL when no entry found.
- using a zero value key wasn't supported.
- no need to memset or calloc bucket arrays
- add asserts for unsupported conditions.
- added BLI_smallhash_lookup_p
2014-01-30 21:10:55 +11:00
Campbell Barton 4ae7ae6f2e Code Cleanup: use bool for return values and correct comments
also remove CDDM_Check, theres no need for it.
2014-01-22 02:53:48 +11:00
Sergey Sharybin 35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
Campbell Barton 1fb980e7df reduce sign conversion comparisons for smallhash and tweak warnings elsewhere. 2013-06-22 20:20:06 +00:00
Campbell Barton 4c042f2145 bmesh: optimize bmesh_vert_separate, redice allocs (best cast it wont do any allocs).
gives approx 16% overall speedup to edgesplit modifier.

also reduce size of smallhash stack, was 521, which got doubled and was quite large on the stack. reduce to 64.
2013-05-09 12:46:35 +00:00
Campbell Barton 62db610220 use unsigned int's for smallhash, avoids using ABS when converting an
int from a key.
2013-05-08 12:54:07 +00:00
Campbell Barton 01f8b229c9 revert own change from 56177, game bounds can be useful to see in editmode,
also use gcc attributes for smallhash header and some style edits to recent commit.
2013-04-20 17:24:40 +00:00
Campbell Barton 9892736206 code cleanup: header cleanup and remove some duplicate defines. 2012-05-12 20:39:39 +00:00
Sergey Sharybin d7f0e29291 Few files had got +x mode which seems to be totally unnecessary. 2012-02-27 12:48:06 +00:00
Campbell Barton 2fcb6d058e style cleanup for bmesh headers
- use consistant header guards
- correct doxy comments
- remove ED_toolmode.h (unused)
2012-02-12 14:40:08 +00:00
Campbell Barton 91390b712a GPL Header Cleanup 2012-02-11 04:16:17 +00:00
Campbell Barton fa59b80189 move smallhash into its own C file, was inlineing fairly large functions. 2011-09-09 02:52:20 +00:00
Howard Trickey 7cf87f7e32 Fix BLI_smallhash for 0 and negative keys. Fixes some problems with edge snapping in knife tool. 2011-09-06 13:48:20 +00:00
Howard Trickey 5f75407e22 change TODO -> BMESH_TODO if only on bmesh branch 2011-08-07 12:45:55 +00:00
Andrea Weikert 25ffeed8bf fixing compile errors with VisualStudio 2008.
* macro ABS has no effect with uintptr_t anyway and was throwing warning (promoted to error) -> commented out and marked with TODO
* removed two unused variables trhowing warning also promoted to error when compiling.
2011-07-03 17:07:07 +00:00
Joseph Eagar 1c56255ca7 =bmesh=
Edge slide now handles facedata (e.g. sliding within uv
space), including multires.
2011-04-13 21:48:16 +00:00
Joseph Eagar 1216fe7f21 =bmesh=
Bevel! Implemented bevel (from scratch).  Man is
this tool way cooler then I thought it was.  Note that
uv/vcol interpolation is working (loop level data) but 
vert/edge data (like vgroups) likely still needs
work.
2011-03-17 22:59:54 +00:00
Joseph Eagar f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00
Joseph Eagar 1e513ec02d knife bugfix. more to come. 2010-10-04 04:35:42 +00:00
Joseph Eagar 421823e34e =BMesh: Super Knife Tool Alpha=
Implemented a new "super knife".  Activate with k.  Holding CTRL
will allow extended cutting ala old lines mode.  Confirm with enter 
and escape. You cannot cancel, btw, you can only confirm (and undo 
later if you want). Hopefully I'll support undo within the tool soon.

* Supports cutting edges, into faces, etc.  You can pretty much do whatever 
  you want.  Will snap to vertices too.
* Note that if you cut into a face, it must be valid topologically when 
  you press enter to confirm.
* It's pretty and graphical :)
* You can only cut visible geometry.
* UVs/vcols are a little buggy still

Now, thou shalt all cease and desist all lack of motivation for
testing!  No longer shall users put off testing until "it's cooler"!

:P
2010-09-25 01:54:58 +00:00