Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-27Cleanup: clang-format, clang-tidy, spellingCampbell Barton
2021-10-22Fix test print wording that confuses build bot highlighting.Alexander Gavrilov
2021-10-20Cleanup: unused parameters, `nullptr` instead of `NULL` in cpp code...Bastien Montagne
2021-10-20Fix precision issues and a bug in vec_roll_to_mat3_normalized.Alexander Gavrilov
When the input vector gets close to -Y, y and theta becomes totally unreliable. It is thus necessary to compute the result in a different way based on x and z. The code already had a special case, but: - The threshold for using the special case was way too low. - The special case was not precise enough to extend the threshold. - The special case math had a sign error, resulting in a jump. This adds tests for the computation precision and fixes the issues by adjusting the threshold, and replacing the special case with one based on a quadratic Taylor expansion of sqrt instead of linear. Replacing the special case fixes the bug and results in a compatibility break, requiring versioning for the roll of affected bones. Differential Revision: https://developer.blender.org/D9551
2021-10-20Split and extend unit tests for vec_roll_to_mat3_normalized.Alexander Gavrilov
Separate the huge test into huge logical parts and add more cases to check. Also add a utility to check that the matrix is orthogonal, with arbitrary epsilon values and calculations in double. A couple of tests deliberately fail, to be fixed in following commits. Ref D9551
2021-08-31Cleanup: Use C style comments for descriptive textCampbell Barton
2021-08-04Cleanup: use C comments for descriptive textCampbell Barton
2021-07-20Armature test: properly initialize bone hierarchySybren A. Stüvel
Fix segfault in `BKE_armature_find_selected_bones_test` by property initializing the bone hierarchy listbases. No functional changes to Blender.
2021-07-20Pose Library: remove assumption about Action group namesSybren A. Stüvel
Remove the assumption of the pose library that Action groups are named after the bones in the armature. Even though this assumption is correct when the keys are created by Blender, action groups can be renamed. Keys created by Python scripts can also use arbitrary group names. Since there is more code in Blender making this assumption, and looping over selected bones is also a common occurrence, this commit contains some generic functionality to aid in this: - `BKE_armature_find_selected_bones`: function that iterates over all bones in an armature and calls a callback for each selected one. It returns a struct with info about the selection states (all or no bones selected). - `BKE_armature_find_selected_bone_names(armature)` uses the above function to return a set of selected bone names. - `BKE_pose_find_fcurves_with_bones()` calls a callback for each FCurve in an Action that targets a bone, also passing it the bone name.
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell Barton
2020-11-12fix: added missing float declarationsGaia Clary
2020-11-12Test cases for vec_roll_to_mat3_normalizedGaia Clary
The function vec_roll_to_mat3_normalized() basically has to handle 3 scenarios: - When a bone is oriented along the negative Y axis - When a bone is very close to the negative Y axis - All other cases The tests in the Differential make sure that all 3 situations are covered. Reviewed By: sybren, mont29 Differential Revision: https://developer.blender.org/D9525
2020-10-10Cleanup: use C comments for descriptive textCampbell Barton
Follow our code style guide by using C-comments for text descriptions.
2020-07-16T73268: Link C/C++ unit tests into single executableSybren A. Stüvel
This commit introduces a new way to build unit tests. It is now possible for each module to generate its own test library. The tests in these libraries are then bundled into a single executable. The test executable can be run with `ctest`. Even though the tests reside in a single executable, they are still exposed as individual tests to `ctest`, and thus can be selected via its `-R` argument. Not yet ported tests still build & run as before. The following rules apply: - Test code should reside in the same directory as the code under test. - Tests that target functionality in `somefile.{c,cc}` should reside in `somefile_test.cc`. - The namespace for tests is the `tests` sub-namespace of the code under test. For example, tests for `blender::bke` should be in `blender::bke:tests`. - The test files should be listed in the module's `CMakeLists.txt` in a `blender_add_test_lib()` call. See the `blenkernel` module for an example. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7649