Commit Graph

57 Commits

Author SHA1 Message Date
Hans Goudey
7c69c8827b Mesh: Rename MLoopTri variable names, and functions
Make the naming consistent with the recent change from "loop" to
"corner". Avoid the need for a special type for these triangles by
conveying the semantics in the naming instead.

- `looptris` -> `corner_tris`
- `lt` -> `tri` (or `corner_tri` when there is less context)
- `looptri_index` -> `tri_index` (or `corner_tri_index`)
- `lt->tri[0]` -> `tri[0]`
- `Span<MLoopTri>` -> `Span<int3>`
- `looptri_faces` -> `tri_faces` (or `corner_tri_faces`)

If we followed the naming pattern of "corner_verts" and "edge_verts"
exactly, we'd probably use "tri_corners" instead. But that sounds much
worse and less intuitive to me.

I've found that by using standard vector types for this sort of data,
the commonalities with other areas become much clearer, and code ends
up being naturally more data oriented. Besides that, the consistency
is nice, and we get to mostly remove use of `DNA_meshdata_types.h`.

Pull Request: https://projects.blender.org/blender/blender/pulls/116238
2023-12-19 14:57:49 +01:00
Campbell Barton
944e0483a6 Cleanup: clarify naming for MLoopTri
The term `looptri` was used ambiguously for both single & arrays.
The term `tri` was also used, causing `tri->tri`.

Use terms:

- `looptris` for an array or when dealing with multiple items.
- `looptri` is used when dealing with a single item.
- `lt` for a single MLoopTri variables & arguments.

This was already a convention but not followed closely.
2023-12-14 12:32:11 +11:00
Campbell Barton
3cd8b531a0 Fix intern/dualcon error in 2721b937fb5a641cc25eda56b704ca2553bd2cfe 2023-09-24 16:07:49 +10:00
Campbell Barton
2721b937fb Cleanup: use braces in headers 2023-09-24 14:52:38 +10:00
Campbell Barton
5b9740c913 Cleanup: use braces for sources in intern/
Omitted intern/itasc as some of these sources are from KDL:
https://www.orocos.org/kdl.html
2023-09-17 09:05:40 +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
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Campbell Barton
49594c37ae License headers: use SPDX-FileCopyrightText for CMake files 2023-06-14 23:36:23 +10:00
Campbell Barton
823685db76 Cleanup: consistent doxygen comment blocks
Also remove doxygen block for comments in a functions body.
2023-05-27 15:10:58 +10:00
Campbell Barton
6859bb6e67 Cleanup: format (with BraceWrapping::AfterControlStatement "MultiLine") 2023-05-02 09:37:49 +10:00
Sergey Sharybin
8ed543c6f2 Fix set but unused variable in dualcon octree 2023-04-19 10:02:09 +02:00
Sergey Sharybin
d32d787f5f Clang-Format: Allow empty functions to be single-line
For example

```
OIIOOutputDriver::~OIIOOutputDriver()
{
}
```

becomes

```
OIIOOutputDriver::~OIIOOutputDriver() {}
```

Saves quite some vertical space, which is especially handy for
constructors.

Pull Request: https://projects.blender.org/blender/blender/pulls/105594
2023-03-29 16:50:54 +02:00
Sergey Sharybin
c3ecfdf40b Cleanup: Compilation warnings
Mainly -Wset-but-unused-variable.
Makes default compilation on macOS way less noisy.

Differential Revision: https://developer.blender.org/D14357
2022-03-18 12:07:08 +01: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
76471dbd5e Cleanup: capitalize NOTE tag 2021-11-30 10:15:17 +11:00
Harley Acheson
d1eefc4215 Spelling: Then Versus Than
Corrects incorrect usages of the words 'then' and 'than'.

Differential Revision: https://developer.blender.org/D9246

Reviewed by Campbell Barton
2020-10-19 08:43:08 -07:00
Campbell Barton
2abfcebb0e Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
2020-10-10 22:04:51 +11:00
Campbell Barton
2a96e8be39 Cleanup: redundant parenthesis, NULL checks 2020-04-20 12:15:49 +10:00
Germano Cavalcante
e1b2ded7b2 Fix build WITH_CXX_GUARDEDALLOC 2020-03-19 14:42:04 -03:00
Dalai Felinto
2d1cce8331 Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
Dan Koschier
4cc98af3a4 Fix T53581: remesh modifier artifacts in sharp mode
Replace relative threshold for pseudo inverse in sharp remeshing modifier with
0.1 as proposed in the original paper.

Also change pseudo-inverse implementation that works with dynamic heap-allocated
matrix to static 3x3 version, for performance

Differential Revision: https://developer.blender.org/D5078
2019-06-17 18:53:49 +02:00
Campbell Barton
5bbf9029ce Cleanup: comments (long lines) in dualcon 2019-05-01 21:00:56 +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
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
Campbell Barton
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +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
Sebastian Parborg
a16e5b8efa Cleanup: remove unused DerivedMesh code.
Differential Revision: https://developer.blender.org/D3736
2018-09-27 20:19:28 +02:00
Campbell Barton
b372766816 Cleanup: trailing newlines 2018-06-29 09:23:51 +02:00
Campbell Barton
e7a68ef843 Cleanup: trailing space in CMake files 2018-06-17 20:15:24 +02:00
Aaron Carlisle
9f044cb422 Remove MinGW support
The Issue
=======

For a long time now MinGW has been unsupported and unmaintained and at this point,
it looks like something that we should just leave behind and move on.


Why Remove
==========

One of the big motivations for MinGW back in the day is that it was free compared to MSVC which was licensed based.
However, now that this is no longer true we have basically stopped updating the need CMake files.
Along with the CMake files, there are several patches to the extern libs needed to make this work.  For example, see:
https://developer.blender.org/diffusion/B/browse/master/extern/carve/patches/mingw_w64.patch

If we wanted to keep MinGW then we would need to make more custom patches to the external libs and
this is not something our platform maintainers are willing to do.

For example, here is the patches needed to build python: https://github.com/Alexpux/MINGW-packages/tree/master/mingw-w64-python3

Fixes T51301

Differential Revision: https://developer.blender.org/D2648
2017-05-27 15:34:55 -04:00
Sergey Sharybin
5d99cde822 Remove SCons building system
While SCons building system was serving us really good for ages it's no longer
having much attention by the developers and started to become quite a difficult
task to maintain.

What's even worse -- there started to be quite serious divergence between SCons
and CMake which was only accumulating over the releases now. The fact that none
of the active developers are really using SCons and that our main studio is also
using CMake spotting bugs in the SCons builds became quite a difficult task and
we aren't always spotting them in time.

Meanwhile CMake became really mature building system which is available on every
platform we support and arguably it's also easier and more robust to use.

This commit includes:

- Removal of actual SCons building system
- Removal of SCons git submodule
- Removal of documentation which is stored in the sources and covers SCons
- Tweaks to the buildbot master to stop using SCons submodule
  (this change requires deploying to the server)
- Tweaks to the install dependencies script to skip installing or mentioning
  SCons building system
- Tweaks to various helper scripts to avoid mention of SCons folders/files
  as well

Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit

Reviewed By: campbellbarton, juicyfruit

Differential Revision: https://developer.blender.org/D1680
2016-01-04 14:20:48 +05:00
Martijn Berger
939dd2e168 Skip some more workarounds when using MSVC 2015 2015-12-30 11:23:10 +01:00
Campbell Barton
e5e9fbfaf0 Replace MFace use by MLoopTri w/ remash modifier
D1419 by @lichtwerk
2015-07-20 14:42:35 +10:00
Sergey Sharybin
232c2d382e Dualcon: Code cleanup, prepare for strict C++ flags 2015-03-27 18:23:31 +05:00
Campbell Barton
4b88541d59 CMake: unbundle eigen3
Optionally use systems eigen3 library.

T41989 by @hasufell with edits
2015-03-19 15:41:41 +11:00
Campbell Barton
81acaf5f15 quiet double-promotion warnings, change octree.cpp to use a float (vector accumulated into a float anyway) 2013-08-06 06:38:52 +00:00
Campbell Barton
41721e11fb fix for 2 memory leaks in dualcon library, quite bad since they leaked on every evaluation. 2013-08-04 18:05:29 +00:00
Campbell Barton
35db9c5e70 Support WITH_CXX_GUARDEDALLOC for dualcon library 2013-08-04 17:58:17 +00:00
Campbell Barton
1777a69818 misc minor edits.
- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.
2013-03-29 06:25:22 +00:00
Nicholas Bishop
3447f2ade1 Add missing virtual destructor for VirtualMemoryAllocator
Fixes a warning from GCC 4.7.2.
2013-01-20 15:36:32 +00:00
Bastien Montagne
ab2c273b12 Added GPL header to sconscripts!
Also changed shebang to '#!/usr/bin/env python', this is more portable across unixes...
2012-12-17 08:01:43 +00:00
Campbell Barton
3a947cf537 code cleanup: remove redundant casts 2012-10-14 08:49:01 +00:00
Nicholas Bishop
e8bc62e162 Avoid unecessary minimizer calculations in dualcon
* The minimize() function, which solves a least-squares problem, is
  only needed for sharp remesh mode, but was being calculated for
  smooth and blocks modes as well. Disabling this calculation when
  it's not needed gives a big performance boost.
2012-10-06 18:28:38 +00:00
Nicholas Bishop
8b4baa347f Code cleanups for dualcon octree
* Move InternalNode operators from Octree class into InternalNode
  struct

* Constify various member functions
2012-10-06 18:28:34 +00:00
Campbell Barton
d724d0adfe code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations 2012-09-16 00:26:36 +00:00
Campbell Barton
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
Nicholas Bishop
10d1cde0ad Potential fix for bug #31111, Remesh modifier generates artifacts on simple surfaces
Changed one of the intersection tests to use < rather than <=

The sharp and smooth modes look fine now for the special case that was
reported broken; blocks mode looks correct but "jumps" slightly from
one octree resolution to another, so may need additional corrections.
2012-05-10 05:13:10 +00:00
Nicholas Bishop
3d65c502e1 More code cleanup in intern/dualcon.
Removed a lot of unused code, added comments and some clearer
naming. Minor code shuffles and style cleanup too.
2012-05-10 05:12:58 +00:00
Nicholas Bishop
d93a935965 Fix division by zero case in dualcon. 2012-05-08 22:11:16 +00:00
Nicholas Bishop
56342f222f Code style cleanup in intern/dualcon. 2012-05-08 22:11:05 +00:00