Campbell Barton
10fc2d6d96
Cleanup: remove basepath argument from BLI_path_normalize{_dir}
...
Keep these operations separate to simplify path handling logic & docs.
Many callers passed NULL and there were times paths were passed in which
didn't make any sense (where the paths had already been made absolute).
2023-04-24 12:23:04 +10: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
Campbell Barton
331f850056
Cleanup: redundant parenthesis
2022-10-07 22:55:03 +11:00
Campbell Barton
8a68f4f808
Cleanup: replace unsigned with uint, use function style casts for C++
2022-09-26 10:09:15 +10:00
Campbell Barton
f68cfd6bb0
Cleanup: replace C-style casts with functional casts for numeric types
2022-09-25 20:17:08 +10:00
Campbell Barton
891949cbb4
Cleanup: use 'u' prefixed integer types for brevity & cast style
...
To use function style cast '(unsigned char)x' can't be replaced by
'unsigned char(x)'.
2022-09-25 18:26:27 +10:00
Brecht Van Lommel
b9998541e1
Fix part of T100626: Cycles not using tiles for baking
...
Leading to excessive memory usage compared to Blender 2.93. There's still
some avoidable memory usage remaining, due to the full float buffer in the
new image editor drawing and not loading the cached EXR from disk in tiles.
Main difficulty was handling multi-image baking and disk caches, which is
solved by associating a unique layer name with each image so it can be
matched when reading back the image from the disk.
Also some minor header changes to be able to use RE_MAXNAME in RE_bake.h.
2022-08-31 20:04:14 +02:00
Yuki Hashimoto
31bfa17a1f
Cleanup: delete unused ViewMapIO files in Freestyle
...
ViewMapIO.h is only included in Controller.cpp init_options().
However, g_models_path and g_flags set here are never used elsewhere.
Therefore, ViewMapIO files can be deleted without affecting anything.
Differential Revision: https://developer.blender.org/D14423
2022-03-23 20:06:12 +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
Iyad Ahmed
6f52ebba19
UI: Freestyle UI Upgrade
...
Suggested and funded by [[ https://blendernpr.org/ | BNPR ]], this patch aims to update the long not-updated Freestyle UI
**Why do the UI upgrade:**
- Freestyle UI doesn't match the rest of Blender UI, it was neglected for a long time
- The current UI makes Freestyle workflows tedious and distracting
**Highlights:**
For before/after screenshots see https://developer.blender.org/D10505
Video:
https://youtu.be/qaXhuJW_c9U
Workflow video (older revision): https://youtu.be/IqbjIq_A800
Doc patch (WIP): https://github.com/bnpr/FreestyleUIUpgrade/blob/main/freestyle-ui-upgrade-docs.diff
Reviewed By: #user_interface, Blendify, HooglyBoogly, Severin
Differential Revision: https://developer.blender.org/D10505
2021-09-13 10:37:50 -04:00
Campbell Barton
77e927b58f
Cleanup: reserve C++ comments for disabled code
...
Use C comments for plain text.
2021-07-20 15:01:05 +10:00
Campbell Barton
9b89de2571
Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
...
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
2021-07-04 00:43:40 +10:00
Campbell Barton
1f778dbefc
Cleanup: use Blender's code style for doxygen commetns in freestyle
2021-06-24 15:59:34 +10:00
Campbell Barton
17e1e2bfd8
Cleanup: correct spelling in comments
2021-02-05 16:23:34 +11:00
Jacques Lucke
c93f826661
Cleanup: various clang tidy fixes
2020-12-09 16:29:11 +01:00
Sybren A. Stüvel
958df2ed1b
Cleanup: Clang-Tidy, modernize-deprecated-headers
...
No functional changes.
2020-12-04 11:28:09 +01:00
Ankit Meel
4525049aa0
Cleanup: Clang-tidy, modernize-concat-nested-namespaces
2020-11-07 18:48:13 +05:30
Sybren A. Stüvel
16732def37
Cleanup: Clang-Tidy modernize-use-nullptr
...
Replace `NULL` with `nullptr` in C++ code.
No functional changes.
2020-11-06 18:08:25 +01:00
Sergey Sharybin
8d5073345d
Cleanup: Clang-Tidy, modernize-use-emplace
2020-11-06 14:06:52 +01:00
Sergey Sharybin
190170d4cc
Cleanup: Clang-Tidy, readability-redundant-member-init
2020-11-06 11:54:53 +01:00
Brecht Van Lommel
569b7c2821
Cleanup: remove unused Blender Internal render stats code
2020-10-29 14:23:06 +01:00
Sebastian Parborg
2115232a16
Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix
...
No functional changes
2020-09-04 21:04:16 +02:00
Campbell Barton
171e77c3c2
Cleanup: use array syntax for sizeof with fixed values
...
Also order sizeof(..) first to promote other values to size_t.
2020-08-08 13:38:00 +10:00
Sybren A. Stüvel
326e137a8c
Cleanup: Freestyle, Clang-Tidy else-after-return fixes
...
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/freestyle` module.
No functional changes.
2020-08-07 13:38:06 +02: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
b274d18aec
Cleanup: correct usage of extern-C blocks in various places
...
This removes extern-C blocks around other includes and adds
such blocks for some headers that need them.
2020-07-28 16:33:43 +02:00
Campbell Barton
754c5d6a14
Cleanup: clang-format
2020-07-09 13:29:48 +10:00
Jacques Lucke
88d358902f
Clang-Tidy: Enable readability-redundant-string-cstr
2020-07-03 15:55:09 +02:00
Jacques Lucke
2633683b52
Clang-tidy: enable readability-container-size-empty warning
...
Reviewers: sergey
Differential Revision: https://developer.blender.org/D8197
2020-07-03 14:59:27 +02:00
Brecht Van Lommel
120e9924c1
Cleanup: remove legacy mmap memory allocation for 32 bit
...
This helped to go beyond the 4GB limit, but is no longer relevant for 64 bit.
2020-05-20 00:57:41 +02:00
Brecht Van Lommel
5fed9ac9b5
Fix clang-format differences between version 6 and 9
...
Version 6 does not appear to respect clang-format off for header sorting.
2020-04-21 13:16:59 +02:00
Campbell Barton
d14e768069
Cleanup: BLI_path.h function renaming
...
Use BLI_path_ prefix, more consistent names:
BLI_parent_dir -> BLI_path_parent_dir
BLI_parent_dir_until_exists -> BLI_path_parent_dir_until_exists
BLI_ensure_filename -> BLI_path_filename_ensure
BLI_first_slash -> BLI_path_slash_find
BLI_last_slash -> BLI_path_slash_rfind
BLI_add_slash -> BLI_path_slash_ensure
BLI_del_slash -> BLI_path_slash_rstrip
BLI_path_native_slash -> BLI_path_slash_native
Rename 'cleanup' to 'normalize', similar to Python's `os.path.normpath`.
BLI_cleanup_path -> BLI_path_normalize
BLI_cleanup_dir -> BLI_path_normalize_dir
BLI_cleanup_unc -> BLI_path_normalize_unc
BLI_cleanup_unc16 -> BLI_path_normalize_unc16
Clarify naming for extracting, creating numbered paths:
BLI_stringenc -> BLI_path_sequence_encode
BLI_stringdec -> BLI_path_sequence_decode
Part of T74506 proposal.
2020-04-07 12:10:36 +10:00
Dalai Felinto
85424397b1
Cleanup: tweak Freestyle #includes in preparation for clang-format sorting
2020-03-06 17:26:32 +01:00
Campbell Barton
b839a5d076
Cleanup: remove BLI_cleanup_file
...
In practice, references to files rarely have trailing slashes
(by accident). Remove this function in favor of BLI_cleanup_path.
2020-03-07 00:19:01 +11:00
Campbell Barton
2dfeb25c54
Cleanup: remove unused PYTHONPATH from freestyle
...
This accesses PYTHONPATH directly, ignoring Py_IgnoreEnvironmentFlag.
Remove since it's not used.
2020-01-16 21:04:09 +11:00
Campbell Barton
aba4e6810f
Cleanup: style, use braces in source/ (include disabled blocks)
2019-05-31 23:22:52 +10:00
Campbell Barton
d8dbd49a2f
Cleanup: style, use braces in source/
...
Automated using clang-tidy.
2019-05-31 22:55:15 +10:00
Campbell Barton
1e8697cd80
Cleanup: comments (long lines) in freestyle
2019-05-01 07:58:27 +10:00
Campbell Barton
41d4a19865
ClangFormat: format '#if 0' code in source/
2019-04-17 08:24:14 +02: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
4ef09cf937
Cleanup: remove author/date info from doxy headers
2019-02-02 11:58:24 +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
Brecht Van Lommel
820d1b249d
Fix freestyle renders not including some types of animation.
...
Freestyle Python scripts need to get the evaluated view layer and scene,
not the original one.
2019-01-24 16:46:11 +01:00
Campbell Barton
66738d4aa0
Merge branch 'master' into blender2.8
2018-10-11 09:08:30 +11:00
Campbell Barton
2083a7e274
Cleanup: style (pointers)
2018-10-11 09:03:39 +11:00
Campbell Barton
06a1a66a9b
Merge branch 'master' into blender2.8
2018-06-17 17:10:19 +02:00
Campbell Barton
410880552b
Cleanup: trailing space for freestyle
2018-06-17 17:05:14 +02:00
Campbell Barton
56173e512c
Merge branch 'master' into blender2.8
2018-06-17 16:18:15 +02:00