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
path: root/tests
AgeCommit message (Collapse)Author
2020-11-10Fix own previous commit re testing of `BLI_rel_path`.Bastien Montagne
Windows would need its own version of those tests, for now just disabling them on that platform.
2020-10-28Fix T81421: "Saving As..." a blend file with a Script node file path filled ↵Bastien Montagne
with 1023 symbols crashes Blender. Usual lack of protection against buffer overflows when manipulating strings. Also add some basic tests for `BLI_path_rel`.
2020-05-26Fix T77021: Alembic export of animated mesh with multiple UV maps failsSybren A. Stüvel
This was caused by a side-effect of our exporting code's memory management (Alembic considers data "written" and "final" when its C++ objects go out of scope) in combination with my change in rB65574463fa2d. I removed an "only export UVs on the first frame" clause because it was unclear why this restriction was there. As it turns out, it breaks the export of the 2nd and subsequent UV maps on an animated mesh. Effectively, on every frame the Alembic library thought we want to create a new UV map, instead of continuing to write a new frame of data to the existing one. This is resolved by keeping a reference to the C++ objects for the UV maps in memory while the exporter is running.
2020-05-25Fix T76941: "Set Inverse" in Child Of constraint broken with armaturesSybren A. Stüvel
When the Child Of constraint is owned by a bone, before the constraint is run the matrix is converted from world to pose space. However, setting the inverse should also take the armature object's transform into account.
2020-05-25Tests: correct the blender path for non-portable installationsCampbell Barton
2020-05-25GTest: BLI_ghash_performance_test was failingCampbell Barton
Change the seed from 0 to 1, so BLI_ghash_performance_test doesn't assert with duplicate keys.
2020-05-04Fix T76355: USD test fails in debug modeSybren A. Stüvel
Thanks @LazyDodo for the help! No functional changes.
2020-04-28Tests: fix some tests passing even if there are Python errorsBrecht Van Lommel
Blender was not configured to exit with non-zero return code on Python errors. A bunch of tests worked around this but not all. This removes the need for such workarounds.
2020-04-28Fix Python bundled module test errorBrecht Van Lommel
We don't bundle cffi, rather the ffi library is used for ctypes. This test is currently passing even when there are errors, that will be fixed next.
2020-04-28Tests: add physics tests cloth and softybodyHimanshi Kalra
This uses the same framework as automated modifier tests. It adds a physics modifier, bakes and compares vertex coordinates on the end frame. Differential Revision: https://developer.blender.org/D7017
2020-04-28Strengthen modifiers test validation, from D7397.Howard Trickey
Submitting on behalf of Jesse Y (deadpin). In test harness for modifier testing, now run mesh validation on output mesh. Also, fix printing so it interleaves properly.
2020-04-09TaskScheduler: Minor Preparations for TBBBrecht Van Lommel
Tasks: move priority from task to task pool {rBf7c18df4f599fe39ffc914e645e504fcdbee8636} Tasks: split task.c into task_pool.cc and task_iterator.c {rB4ada1d267749931ca934a74b14a82479bcaa92e0} Differential Revision: https://developer.blender.org/D7385
2020-04-09USD: ensure test does not depend on BLI_assert()Sybren A. Stüvel
The test failure in T75491 only showed up in debug builds because `BLI_assert()` is a no-op in release builds. This is now replaced by a proper GTests call to `ADD_FAILURE()`, ensuring that the test fails regardless of build mode.
2020-04-07Cleanup: BLI_path.h function renamingCampbell Barton
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-03-26Test: update bl_run_operators blacklist, add volume objectCampbell Barton
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-18Tests: add OpenVDB volume testsBrecht Van Lommel
2020-03-17VR: Initial Virtual Reality support - Milestone 1, Scene InspectionJulian Eisel
NOTE: While most of the milestone 1 goals are there, a few smaller features and improvements are still to be done. Big picture of this milestone: Initial, OpenXR-based virtual reality support for users and foundation for advanced use cases. Maniphest Task: https://developer.blender.org/T71347 The tasks contains more information about this milestone. To be clear: This is not a feature rich VR implementation, it's focused on the initial scene inspection use case. We intentionally focused on that, further features like controller support are part of the next milestone. - How to use? Instructions on how to use this are here: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/How_to_Test These will be updated and moved to a more official place (likely the manual) soon. Currently Windows Mixed Reality and Oculus devices are usable. Valve/HTC headsets don't support the OpenXR standard yet and hence, do not work with this implementation. --------------- This is the C-side implementation of the features added for initial VR support as per milestone 1. A "VR Scene Inspection" Add-on will be committed separately, to expose the VR functionality in the UI. It also adds some further features for milestone 1, namely a landmarking system (stored view locations in the VR space) Main additions/features: * Support for rendering viewports to an HMD, with good performance. * Option to sync the VR view perspective with a fully interactive, regular 3D View (VR-Mirror). * Option to disable positional tracking. Keeps the current position (calculated based on the VR eye center pose) when enabled while a VR session is running. * Some regular viewport settings for the VR view * RNA/Python-API to query and set VR session state information. * WM-XR: Layer tying Ghost-XR to the Blender specific APIs/data * wmSurface API: drawable, non-window container (manages Ghost-OpenGL and GPU context) * DNA/RNA for management of VR session settings * `--debug-xr` and `--debug-xr-time` commandline options * Utility batch & config file for using the Oculus runtime on Windows. * Most VR data is runtime only. The exception is user settings which are saved to files (`XrSessionSettings`). * VR support can be disabled through the `WITH_XR_OPENXR` compiler flag. For architecture and code documentation, see https://wiki.blender.org/wiki/Source/Interface/XR. --------------- A few thank you's: * A huge shoutout to Ray Molenkamp for his help during the project - it would have not been that successful without him! * Sebastian Koenig and Simeon Conzendorf for testing and feedback! * The reviewers, especially Brecht Van Lommel! * Dalai Felinto for pushing and managing me to get this done ;) * The OpenXR working group for providing an open standard. I think we're the first bigger application to adopt OpenXR. Congratulations to them and ourselves :) This project started as a Google Summer of Code 2019 project - "Core Support of Virtual Reality Headsets through OpenXR" (see https://wiki.blender.org/wiki/User:Severin/GSoC-2019/). Some further information, including ideas for further improvements can be found in the final GSoC report: https://wiki.blender.org/wiki/User:Severin/GSoC-2019/Final_Report Differential Revisions: D6193, D7098 Reviewed by: Brecht Van Lommel, Jeroen Bakker
2020-03-16Fix another implicit cast of boot to intSergey Sharybin
Use proper comparison to nullptr. It is important to use nullptr since NULL is actually an integer, which leads to another type of warnings.
2020-03-16Fix implicit cast from bool to int in path testsSergey Sharybin
2020-03-16Fix a syntax error in test spec for BLI_delaunay_2d_test.Howard Trickey
Test specs are read from strings, and there was a comma instead of a decimal point, and then an extra decimal point in the Quad0 test. This test has been flaky on Windows buildbot. Perhaps this is why.
2020-03-14Fix T73921: Eevee volume render test memory leak in MantaflowSebastián Barschkis
Fixed memory leak that showed up after the original issue (crash) had been fixed in 93ac4709ebe8. The fix ensures that light cache bakes free up GPU smoke textures and the smoke domain list correctly. This commit also removes the workaround (f3a33a92987f) that disabled light cache bakes for fluid objects.
2020-03-13Python: add foreach_get and foreach_set methods to pyrna_prop_arrayBogdan Nagirniak
This allows fast access to various arrays in the Python API. Most notably, `image.pixels` can be accessed much more efficiently now. **Benchmark** Below are the results of a benchmark that compares different ways to set/get all pixel values. I do the tests on 2048x2048 rgba images. The benchmark tests the following dimensions: - Byte vs. float per color channel - Python list vs. numpy array containing floats - `foreach_set` (new) vs. `image.pixels = ...` (old) ``` Pixel amount: 2048 * 2048 = 4.194.304 Byte buffer size: 16.8 mb Float buffer size: 67.1 mb Set pixel colors: byte - new - list: 271 ms byte - new - buffer: 29 ms byte - old - list: 350 ms byte - old - buffer: 2900 ms float - new - list: 249 ms float - new - buffer: 8 ms float - old - list: 330 ms float - old - buffer: 2880 ms Get pixel colors: byte - list: 128 ms byte - buffer: 9 ms float - list: 125 ms float - buffer: 8 ms ``` **Observations** The best set and get speed can be achieved with buffers and a float image, at the cost of higher memory consumption. Furthermore, using buffers when using `pixels = ...` is incredibly slow, because it is not optimized. Optimizing this is possible, but might not be trivial (there were multiple attempts afaik). Float images are faster due to overhead introduced by the api for byte images. If I profiled it correctly, a lot of time is spend in the `[0, 1] -> {0, ..., 255}` conversion. The functions doing that conversion is `unit_float_to_uchar_clamp`. While I have an idea on how it can be optimized, I do not know if it can be done without changing its functionality slightly. Performance wise the best solution would be to not do this conversion at all and accept byte input from the api user directly, but that seems to be a more involved task as well. Differential Revision: https://developer.blender.org/D7053 Reviewers: JacquesLucke, mont29
2020-03-11Fix/workaround Eevee tests crashing with MantaflowBrecht Van Lommel
Skip light cache baking until T73921 is fixed. This should be fixed properly but being able to run the tests at all is important now.
2020-03-06Cleanup: move Alembic, AVI, Collada, and USD to `source/blender/io`Sybren A. Stüvel
This moves the `alembic`, `avi`, `collada`, and `usd` modules into a common `io` directory. This also cleans up some `#include "../../{somedir}/{somefile}.h"` by adding `../../io/{somedir}` to `CMakeLists.txt` and then just using `#include "{somefile}.h"`. No functional changes.
2020-03-05Initial step for IDTypeInfo refactor 'cleanup' project.Bastien Montagne
Introduce new IDTypeInfo structure. Each ID type will have its own, with some minimal basic common info, and ID management callbacks. This patch only does it for Object type, for demo/testing purpose. Moving all existing IDs is a goal of next "cleanup Friday". Note that BKE_idcode features should then be merged back into BKE_idtype - but this will have to be done later, once all ID types have been properly converted to the new system. Another later TODO might be to try and add callbacks for file read/write, and lib_query ID usages looper. This is part of T73719. Thanks to @brecht for initial idea, and reviewing the patch. Differential Revision: https://developer.blender.org/D6966
2020-03-05Cleanup: formatting, strip trailing spaceCampbell Barton
2020-03-04Cleanup: cmake indentationCampbell Barton
2020-03-04BLI_math: add clamp_v# and clamp_v#_v#v# utility functionsTiago Chaves
2020-03-03Fix delaunay triangulation, bad indices for output faces.Howard Trickey
If there were merged vertices, sometimes the output faces had wrong vertex indices. Added a test for this, and fixed.
2020-03-02Fix T65568: sewing and self collision issueIsh Bosamiya
As explained in T65568 by @LucaRood, the self collision system should exclude triangles that are connected by sewing springs. Differential Revision: https://developer.blender.org/D6911
2020-03-01Fix problem with Delaunay triangulalation re output mapping.Howard Trickey
The array giving original vertex indices should not contain entries for newly created vertices. Added a test to check this.
2020-02-29Apply patch D6620, Adde tests for Deform modifiers.Howard Trickey
This test is authored by Himanshi Kalra (calra). It requires a new modifers.blend in the svn tests.
2020-02-29Made BLI_delaunay_2d_cdt_calc better at tiny feature elimination.Howard Trickey
The 'random' unit tests and some examples from the new boolean code triggered asserts and crashes. This fixes those. There is a new flag in the input that optionally disables a pass over input to snap segment edges to other segments.
2020-02-27Constraints: replace 'Set Inverse' operator with an eval-time updateSybren A. Stüvel
This fixes {T70269}. Before this commit there was complicated code to try and compute the correct parent inverse matrix for the 'Child Of' and 'Object Solver' constraints outside the constraint evaluation. This was done mostly correctly, but did have some issues. The Set Inverse operator now defers this computation to be performed during constraint evaluation by just setting a flag. If the constraint is disabled, and thus tagging it for update in the depsgraph is not enough to trigger immediate evaluation, evaluation is forced by temporarily enabling it. This fix changes the way how the inverse matrix works when some of the channels of the constraint are disabled. Before this commit, the channel flags were used to filter both the parent and the inverse matrix. This meant that it was impossible to make an inverse matrix that would actually fully neutralize the effect of the constraint. Now only the parent matrix is filtered, while inverse is applied fully. As a result, pressing the 'Set Inverse' matrix produces the same transformation as disabling the constraint. This is also reflected in the changed values in the 'Child Of' unit test. This change is not backward compatible, but it should be OK because the old way was effectively unusable, so it is unlikely anybody relied on it. The change in matrix for the Object Solver constraint is due to a different method of computing it, which caused a slightly different floating point error that was slightly bigger than allowed by the test, so I updated the matrix values there as well. This patch was original written by @angavrilov and subsequently updated by me. Differential Revision: https://developer.blender.org/D6091
2020-02-25Constraints: fixed Object Solver 'Clear Inverse' operatorSybren A. Stüvel
The 'Clear Inverse' operator didn't properly update the constraint, so it didn't do anything until the entire depsgraph was updated. It's now properly tagged for update.
2020-02-25Tests: Constraints, enable layer collections before testingSybren A. Stüvel
In the collections unit test file developers can now disable layer collections and declutter the 3D Viewport while working in `constraints.blend`, without influencing the actual unit tests themselves.
2020-02-25Constraints: added unit test for Child Of with bone targetSybren A. Stüvel
No functional changes.
2020-02-25Start of unit test framework for constraintsSybren A. Stüvel
Currently this only tests the Child Of constraint. My aim is to cover constraints with tests before they are refactored/altered. No functional changes.
2020-02-18Fix Cycles fluid motion blur not working after recent refactorBrecht Van Lommel
This also re-enables the fluid motion blur test.
2020-02-18Remove debug prints from blendfile_liblink.Bastien Montagne
rBf35f7bd97a4151 was the proper fix it seems.
2020-02-18Fix missing output dir for blendfile_liblink test.Bastien Montagne
2020-02-17Temp debug prints for liblink tests to check what happens on windows.Bastien Montagne
2020-02-17Alembic: fix unit test on WindowsSybren A. Stüvel
There are two issues solved in this commit: - Our Windows buildbot has slightly different floating point errors than the Linux one, which meant a larger delta was required for float comparisons. - The test performs an export to a temporary Alembic file and subsequently imports it. Deleting the temporary file was impossible on Windows because it was still in use. This is now resolved by first loading the default blend file before deleting the Alembic file.
2020-02-15Cleanup: CMake formattingCampbell Barton
2020-02-14Alembic: refactor import and export of transformationsSybren A. Stüvel
The Alembic importer now works with local coordinates. Previously, the importer converted transformations from Alembic to world coordinates before processing them further; this processing often included re-converting to local coordinates. This change made it possible to remove some code that assumed that a child transform was only read after its parent transform. Blender's Alembic code follows the Maya convention, where in the zero orientation the camera looks forward instead of down. This extra rotation is now handled more consistently, and now also properly handles children of cameras. This fixes T73269. Unit tests were added to at least ensure that the importer and exporter are compatible with each other, and that static and animated camera transforms are handled in the same way.
2020-02-14Cleanup: Alembic, rename unit testSybren A. Stüvel
This rename is to prepare for a future addition to the unit test file. Currently it's named "import" and I will add an export test as well. The rename is a separate commit to easily see the difference between the rename and the addition of another test. No functional changes.
2020-02-14Cleanup: Deduplicate some code in new blenfile io/linking tests.Bastien Montagne
2020-02-13Add initial, very basic save/open & library linking blendfile tests.Bastien Montagne
Do not do much for now, but would have been enough to catch the crash introduced the other day in linking code...
2020-02-11Fix T68243: Python sqlite module not working on macOSBrecht Van Lommel