Hans Goudey
0d9f79b163
Cleanup: Reduce variable scope, use LISTBASE_FOREACH macro
2021-01-25 23:47:56 -06:00
Hans Goudey
5711b85147
Cleanup: Remove unused IDProperty function
...
This function from 2017 came with a comment: "TODO Nuke this once its
only user has been correctly converted to use generic IDmanagement"
Since it is unused after rB91462fbb31ba, now is time to remove it.
Differential Revision: https://developer.blender.org/D9368
2020-10-27 20:12:42 -05:00
Hans Goudey
024b65b5e5
Cleanup: Update comment
...
This comment has to be updated since it was moved
from the header file to the source file.
2020-10-27 17:14:40 -05:00
Campbell Barton
4b188bb08c
Cleanup: use over-line for doxy comments
...
Follow our code style for doxygen sections.
2020-10-27 21:45:55 +11:00
Harley Acheson
3a7fd309fc
Spelling: It's Versus Its
...
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
2020-10-19 08:12:33 -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
Bastien Montagne
5ea1049e75
Sanitize type 'size' parameters in our read/write file code
...
This patch tries to sanitize the types of our size parameters across our read
and write code, which is currently fairly inconsistent (using `int`, `uint`,
`size_t`...), by using `size_t` everywhere. Since in Blender file themselves
we can only store chunk of size `MAX_INT`, added some asserts to ensure that
as well.
See {T79561} for details.
Differential Revision: https://developer.blender.org/D8672
2020-09-20 18:41:50 +02:00
Bastien Montagne
8afa42b05a
IDProperties: Add utils to duplicate content of one IDProp into another.
2020-09-20 16:26:39 +02:00
Jacques Lucke
f8aad78830
Cleanup: reduce variable scopes
2020-09-09 16:36:57 +02:00
Sebastian Parborg
2115232a16
Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix
...
No functional changes
2020-09-04 21:04:16 +02:00
Jacques Lucke
0e021414fe
Cleanup: improve function names
...
With this change, the three .blend read operations: data reading, lib reading
and expanding are more grouped together.
2020-08-28 13:18:24 +02:00
Campbell Barton
661ba642f2
Cleanup: spelling
2020-08-22 00:10:52 +10:00
Jacques Lucke
933f0caec6
Blenloader: move IDProperty read/write code to blenkernel
...
This is part of T76372.
2020-08-21 12:45:41 +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
1b272a649b
Cleanup: Blenkernel, Clang-Tidy else-after-return fixes
...
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.
No functional changes.
2020-08-07 13:38:06 +02:00
Campbell Barton
73ffb3e067
Cleanup: use const args for property name/description access
2020-06-20 13:50:12 +10:00
Bastien Montagne
9f090bac5c
IDProperties: add a foreach looper and use it in libquery code.
...
Note: part of fix for T75279.
Differential Revision: https://developer.blender.org/D7550
2020-04-28 15:25:19 +02:00
Dalai Felinto
d138cbfb47
Code Quality: Replace for loops with LISTBASE_FOREACH
...
Note this only changes cases where the variable was declared inside
the for loop. To handle it outside as well is a different challenge.
Differential Revision: https://developer.blender.org/D7320
2020-04-03 19:27:46 +02:00
Dalai Felinto
2d1cce8331
Cleanup: make format after SortedIncludes change
2020-03-19 09:33:58 +01:00
Campbell Barton
d1bd33407d
Cleanup: pass const variables
2020-02-13 14:14:33 +11:00
Bastien Montagne
56116bbdf4
Cleanup/refactor: Rename BKE_library files to BKE_lib.
...
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
2020-02-10 13:00:42 +01:00
Bastien Montagne
af00fab312
IDProps: add utility to set an ID pointer IDProp value.
2020-01-24 11:39:21 +01:00
Lukas Stockner
ece4515fc8
Fix T71250: ID user decrement error with ID properties in ViewLayer
...
Credit for the original patch goes to @scorpion81.
2019-11-04 15:02:03 +01:00
Jacques Lucke
e60890075b
Cleanup: rename IDP_FreeProperty_ex to IDP_FreePropertyContent_ex
...
This was missing from rBdb5120603f.
2019-05-16 14:17:50 +02:00
Jacques Lucke
db5120603f
Refactor: Simplify ID Property freeing
...
This also makes `IDP_CopyProperty` the "opposite"
of `IDP_FreeProperty`, which is what I'd expect.
Two refactoring steps:
* rename IDP_FreeProperty to IDP_FreePropertyContent
* new IDP_FreeProperty function that actually frees the property
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4872
2019-05-16 14:11:11 +02:00
Campbell Barton
aa42da0385
Cleanup: comments (long lines) in blenkernel
2019-04-27 12:07:07 +10:00
Campbell Barton
735515a3f9
Cleanup: style, use braces for blenkernel
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
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
552b2287db
Logging: Use CLOG for blenkernel
...
Part of D4277 by @sobakasu
2019-02-01 12:46:39 +11:00
Campbell Barton
8a61ea7296
Cleanup: add trailing commas
...
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
Campbell Barton
49490e5cfb
Merge branch 'master' into blender2.8
2018-12-12 13:02:09 +11:00
Campbell Barton
e757c4a3be
Cleanup: use colon separator after parameter
...
Helps separate variable names from descriptive text.
Was already used in some parts of the code,
double space and dashes were used elsewhere.
2018-12-12 12:50:58 +11:00
Campbell Barton
ef423d9876
Merge branch 'master' into blender2.8
2018-07-13 10:52:40 +02:00
Campbell Barton
f4213c1408
Cleanup: id-property API use
...
Also clarify comments.
2018-07-13 10:51:49 +02:00
Campbell Barton
18d87e79e9
Merge branch 'master' into blender2.8
2018-06-29 09:25:40 +02:00
Campbell Barton
b372766816
Cleanup: trailing newlines
2018-06-29 09:23:51 +02:00
Campbell Barton
06a1a66a9b
Merge branch 'master' into blender2.8
2018-06-17 17:10:19 +02:00
Campbell Barton
6fc8a74886
Cleanup: trailing space for blenkernel
2018-06-17 17:05:51 +02:00
Campbell Barton
29aa531e51
Merge branch 'master' into blender2.8
2018-05-05 14:42:15 +02:00
Campbell Barton
d3b3df0371
IDProp API: add native C repr function
...
Was using Python which wasn't very efficient (even for logging).
2018-05-05 14:41:25 +02:00
Campbell Barton
f91e9529da
Merge branch 'master' into blender2.8
2018-05-05 09:57:45 +02:00
Campbell Barton
86c2c4d513
IDProp API: Avoid redundant group replace lookup
2018-05-05 09:31:17 +02:00
Campbell Barton
b3545ae373
Merge branch 'master' into blender2.8
2018-05-04 07:30:14 +02:00
Campbell Barton
f3c5b0394f
IDProp API: expose repr utility function
...
Useful for logging properties passed to operators.
2018-05-04 07:29:05 +02:00
Bastien Montagne
9009622b54
Merge branch 'master' into blender2.8
2018-03-14 18:10:31 +01:00
Bastien Montagne
b0823962e9
Style cleanup.
2018-03-14 18:05:09 +01:00
Bastien Montagne
d34b1b35bf
Fix (unreported) broken IDarray case in IDP_EqualsProperties_ex.
...
For IDProps IDarray, IDP_EqualsProperties was called for each item,
instead of IDP_EqualsProperties_ex, discarding value of `is_strict`
option.
Probably not an issue with current code, though.
2018-03-14 17:53:29 +01:00