Commit Graph

10 Commits

Author SHA1 Message Date
Campbell Barton
fd6ac498b0 Cleanup: spelling in comments, strings (make check_spelling_*)
Also replace some triple-quoted non-doc-string strings with commented
blocks in examples.
2025-05-06 00:18:39 +00:00
Habib Gahbiche
90ea4f88f3 Refactor: Use test fixtures and C++ style initialization
Initiliaze global context only once per test suite. Test data relevant
to the respective tests is still allocated and freed with every test
case.

Also, `scene->nodetree` will be deprecated in a future PR, so use
`material->nodetree` to test embedded trees instead.

Pull Request: https://projects.blender.org/blender/blender/pulls/137895
2025-05-01 15:37:26 +02:00
Habib Gahbiche
ce5fe6e017 Cleanup: Use Assert in tests to avoid crashes when tests fail
Pull Request: https://projects.blender.org/blender/blender/pulls/137857
2025-04-22 17:59:26 +02:00
Brecht Van Lommel
478426c937 Cleanup: Various clang-tidy warnings in blenkernel
Pull Request: https://projects.blender.org/blender/blender/pulls/133734
2025-01-31 17:03:17 +01:00
Iliya Katueshenock
1b67be14c6 Cleanup: BKE: Nodes: Functions renaming
Use snake style naming for all the kernel nodes functions.
Omit kernel prefix in the names since of the using namespace.
Use full forms of the terms
('iter' -> 'iterator', 'ntree' -> 'node_tree', 'rem' -> 'remove', ...).

Pull Request: https://projects.blender.org/blender/blender/pulls/126416
2024-08-19 20:27:37 +02:00
Bastien Montagne
fa2c7ccdda Fix (unreported) memleak in some BKE tests in multi-binaries case.
Some tests would access system paths somehow, which implicitely creates
the static `m_systemPaths` variable, but would not explicitely call
`GHOST_DisposeSystemPaths` at the end to release it.

Noticeable when disabling the `WITH_TESTS_SINGLE_BINARY` option.
2024-06-25 17:51:31 +02:00
Iliya Katueshenock
75d17b1db5 Cleanup: Move BKE_node to namespace
Move all header file into namespace.
Unnecessary namespaces was removed from implementations file.
Part of forward declarations in header was moved in the top part
of file just to do not have a lot of separate namespaces.

Pull Request: https://projects.blender.org/blender/blender/pulls/121637
2024-05-13 16:07:12 +02:00
Campbell Barton
f6b7464b4c Cleanup: spelling in comments 2024-05-02 16:44:10 +10:00
Campbell Barton
4ec93f73a5 Cleanup: spelling in comments 2024-04-29 09:09:44 +10:00
Bastien Montagne
f933dae207 BKE_lib_query: Add a partial ID usage iterator system.
The idea is to allow iterating over e.g. all ID usages of a node from a
whole nodetree, using the same generic handling as existing 'whole ID'
`foreach_id` code.

This is necessary in some cases wher a sub-data needs to processed
independently from any 'owner ID', e.g. in some copy/paste handling.

This is a pre-requirement for proper fix of nodes copy/paste (see
e.g. #120103).

Pull Request: https://projects.blender.org/blender/blender/pulls/121018
2024-04-28 17:35:02 +02:00