Commit Graph

57 Commits

Author SHA1 Message Date
Campbell Barton 357acd1d50 Cleanup: pass arguments as const 2021-10-04 13:15:15 +11:00
Campbell Barton 3c3669894f Cleanup: use system includes 2021-10-04 13:14:58 +11:00
Campbell Barton 806bf3f452 datadoc: add newlines to generated source files 2021-08-12 16:23:08 +10:00
Campbell Barton 1ef275963d Cleanup: use C++ style comments for disabled code 2021-08-12 14:34:41 +10:00
Campbell Barton 93eb460dd0 Cleanup: clang-format (re-run after v12 version bump) 2021-07-30 16:19:19 +10:00
Campbell Barton 4b9ff3cd42 Cleanup: comment blocks, trailing space in comments 2021-06-24 15:59:34 +10:00
Campbell Barton 5181bc46b3 Cleanup: allocation size mismatch warning
While harmless, use fixed size int type for pixel data.
2021-06-13 14:54:54 +10:00
Campbell Barton 452590571c Cleanup: rename 'unsigned int' -> 'uint' 2021-06-13 14:54:54 +10:00
Campbell Barton bb6765f28f Cleanup: spelling 2021-03-18 09:36:44 +11:00
Sergey Sharybin e81034f75d Harden checks in datatoc_icon binary
The goal of the change is to perform check for attempts of icons
being overwritten on canvas. The check is based on checking original
coordinate of icons against all read icons. If there are two icon
files which have same original an error will be reported. The report
includes both file names to make it easier to troubleshoot.

This change will allow to early-on catch issues which we currently
have with the release environment: official Linux builds might have
different icon from Blender compiled locally. This is because the
order in which directory listing is traversed is not defined, so
it's like a race condition between two files to win the place in
the final canvas.

There is still possible improvement in the code to move more fields
into the context structure. This is beyond of goal of this change.

Note that before committing this change icons must be brought back
to their consistent state. Otherwise the build will fail.

Differential Revision: https://developer.blender.org/D9715
2021-03-01 12:00:32 +01:00
luzpaz a4a9d14ba7 UI: Fix Typos in Comments and Docs
Approximately 91 spelling corrections, almost all in comments.

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

Reviewed by Harley Acheson
2021-02-05 19:08:14 -08:00
Ankit Meel f56c5245d2 Cleanup: CMake: Remove arguments from endif(..)
No functional change. Added in {rB1f6b7387ad01}
2020-10-12 18:51:48 +05:30
Ankit Meel 1f6b7387ad CMake/macOS: Remove _LIBPATH, avoid link_directories.
After tests were bundled in a single executable and cycles and libmv
created their own tests, the warnings on macOS have gone over 800.
The reason is setting `*_LIBRARIES` to names of the libraries
and later using `link_directories` to link them properly.

https://cmake.org/cmake/help/latest/command/link_directories.html

> Note This command is rarely necessary and should be avoided where
> there are other choices. Prefer to pass full absolute paths to
> libraries where possible, since this ensures the correct library
> will always be linked. The find_library() command provides the
> full path, which can generally be used directly in calls to
> target_link_libraries().

Warnings like the following popup for every target/executable,
for every library it links to.
```
ld: warning: directory not found for option
'-L/Users/me/blender-build/blender/../lib/darwin/jpeg/lib/Debug'
```

The patch completes a step towards removing `link_directories` as
mentioned in TODO at several places.
The patch uses absolute paths to link libraries and removes
all `*_LIBPATH`s except `PYTHON_LIBPATH` from
`platform_apple.cmake` file. (The corner case where it's used seems
like dead code. Python is no longer shipped with that file structure.)

Also, unused code for LLVM-3.4 has been removed.
Also, guards to avoid searching libraries in system directories have
been added.

`APPLE` platform now no longer needs `setup_libdirs`,
`cycles_link_directories`, and `link_directories`.
The number of warnings now is less than 100, most of them being
deprecation ones in dependencies.

This patch depended on {rBb746179d0add}, {rB2fdbe4d05011},
{rB402a4cadba49} and {rBd7f482f88ecb}.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8855
2020-10-09 19:41:58 +05:30
Campbell Barton 41d2d6da0c Cleanup: pep8 (indentation, spacing, long lines) 2020-10-02 11:59:16 +10:00
Ankit Meel b3c6ab5084 Fix datatoc_icon linker errors with ASan enabled.
Error introduced in {rBf9fcb25d521d}.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D8964
2020-09-21 16:38:31 +05:30
Brecht Van Lommel f9fcb25d52 CMake: clean up setting of platform specific linker flags
Set flags directly on the target, and use common function for all cases.
This refactoring helps with the next commit for test executables.

Ref D8714
2020-09-17 12:29:19 +02:00
Campbell Barton 272c53f8f0 datatoc_icon: remove Python 2.x support
This was originally included in case the system Python was v2.x,
remove support since Python 2.x is no longer being maintained.
2020-09-07 22:55:55 +10:00
Campbell Barton 48e089375e Cleanup: pass arrays const where possible 2020-08-07 22:56:13 +10:00
Brecht Van Lommel a1322d7c95 Cleanup: fix typos in comments
Contributed by luzpaz.

Differential Revision: https://developer.blender.org/D7133
2020-03-19 21:55:17 +01:00
Dalai Felinto 2d1cce8331 Cleanup: `make format` after SortedIncludes change 2020-03-19 09:33:58 +01:00
Lazydodo 418fdee5dc Cleanup: Mark large arrays of of constant data as const.
For background information see D5345

Reviewers: brecht, sergey

Differential Revision: https://developer.blender.org/D5345
2019-08-04 14:24:29 -06:00
Brecht Van Lommel 604fdb6e85 Spelling fixes in comments and descriptions, patch by luzpaz
Differential Revision: https://developer.blender.org/D3744
2019-07-31 14:27:35 +02:00
Campbell Barton 7d6a9b5517 Cleanup: style, use braces
Add braces for modules already using braces almost everywhere.
2019-04-22 19:48:17 +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 c11a317ee1 Cleanup: style, use braces for makesdna, datatoc 2019-03-28 10:11:54 +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 ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +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 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
Brecht Van Lommel 2ac65f6153 UI: new icon set by Andrzej Ambroz.
This is a monochrome icon set, with a more modern look and icons for
various features that did not have a proper icon before.
2018-10-08 19:46:00 +02:00
Brecht Van Lommel 99fa874c85 Fix blender_icons_update.py not working after mono icon changes. 2018-09-27 18:39:50 +02:00
Campbell Barton 0a968510bf Cleanup: style, use raw strings 2018-09-21 08:15:46 +10:00
Campbell Barton 4b373ed086 Cleanup: pep8 2018-07-07 08:48:35 +02:00
Campbell Barton 8c15d612a5 Cleanup: pep8 2018-07-03 06:55:02 +02:00
Campbell Barton a25c11fd8d Cleanup: trailing space
Remove from blender/nodes, collada, blenfont & render.
2018-06-08 08:07:48 +02:00
Ray Molenkamp 7c75c2db4f Add Asan support for clang on windows.
This will currently only work for the RelWithDebInfo configuration since asan
does not support the debug crt. for source line information in the reports,
you need a copy of llvm-symbolizer in the blender folder or set the
ASAN_SYMBOLIZER_PATH environment variable to point to it. Currently (as of
6.0.0) llvm-symbolizer does not ship with the binary clang/llvm distribution.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D3446
2018-05-31 11:50:30 -06:00
Campbell Barton a372638a76 Cleanup: use static vars where appropriate 2017-08-01 09:06:34 +10:00
Sergey Sharybin 95b224dab2 Fix compilation error on recent Debian desktop
Something funny happened here, there were missing symbols from png
library to math functions.
2016-12-05 11:35:26 +01:00
Sergey Sharybin f1088bd9e1 CMake: Ignore paranoid MSVC linker warnings 2016-02-20 14:06:09 +05:00
Campbell Barton 7095f47665 cleanup: pep8
also remove empty class parenthesis
2015-01-29 15:35:06 +11:00
Campbell Barton aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
Sergey Sharybin 30e3aa1561 SCons: Don't regenerate icons if not changes
This is rather a handbook example how NOT to do things in SCons, ideally
it should be official SCons target so all the dependencies and source file
modification stops being our worry. Especially since for CMake we already
do have an app to do generate all the data.

I don't have time to clean this up now but this constant icons regeneration
just pisses me off atm.
2014-12-25 19:17:30 +05:00
Campbell Barton 2e840e56cf CMake: correct include dirs 2014-07-01 09:36:28 +10:00
Campbell Barton 24090ead01 Quiet warning 2014-06-18 15:48:22 +10:00
Campbell Barton a15be34389 Code cleanup: unused python vars & imports
Use frosted rather then pyflakes
2014-04-25 05:36:16 +10:00
Campbell Barton aea00c7a81 Code cleanup: style 2014-02-13 08:52:12 +11:00
Antony Riakiotakis 53f93ef66d Fix build issues with mingw's 2014-01-15 00:33:55 +02:00
Campbell Barton a9f761708c Fix for icon generation with MSVC
Big thanks to Gaia for getting this working!
2014-01-15 08:40:56 +11:00
Antony Riakiotakis 02386bd1e3 fix compilation for mingw-w64 2014-01-13 15:46:46 +02:00