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-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
2020-02-10BLI: improve various C++ data structuresJacques Lucke
The changes come from the `functions` branch, where I'm using these structures a lot. This also includes a new `BLI::Optional<T>` type, which is similar to `std::Optional<T>` which can be used when Blender starts using C++17.
2020-01-29Applying patch D6576, more tests for modifiers.Howard Trickey
Patch from Jesse Y, reviewed by Habib Gahbiche. Addes tests for modifiers: array, decimiate, mirror, screw, solidify, subd, and weld.
2020-01-28Disable some longer running tests from previous commit.Howard Trickey
2020-01-28Fix T73271, Delaunay Triangulation not robust enough.Howard Trickey
A big rework of the code now uses exact predicates for orientation and incircle. Also switched the main algorithm to use a faster divide and conquer algorithm, which is possible with the exact predicates.
2020-01-27Document that tessellate_polygon() doesn't handle degenerate geometrySybren A. Stüvel
This 'fixes' T68554: 'API mathutils.geometry.tessellate_polygon returns bad results sometimes' by documenting the limitations of the current implementation. I've also added a unit test for the function, so that any change in this behaviour will get noticed. No functional changes.
2020-01-27Fix OBJECT_GUARDED_FREE compiler error when type is in namespaceBrecht Van Lommel
2020-01-27Fix tests failing when building without CyclesBrecht Van Lommel
The purpose of this line was to not use Blender Internal and associated old materials, now either Eevee or Cycles is fine.
2020-01-25Cleanup: include missing CMake headersCampbell Barton
2020-01-24Merge branch 'blender-v2.82-release'Alexander Gavrilov
2020-01-24Depsgraph: fix false positive time dependencies for simple drivers.Alexander Gavrilov
The dependency graph has to know whether a driver must be re-evaluated every frame due to a dependency on the current frame number. For python drivers it was using a heuristic based on searching for certain sub- strings in the expression, notably including '('. When the expression is actually evaluated using Python, this can't be easily improved; however if the Simple Expression evaluator is used, this check can be done precisely by accessing the parsed data. Differential Revision: https://developer.blender.org/D6624
2020-01-23Merge branch 'blender-v2.82-release'Sergey Sharybin
2020-01-23CMake: Refactor external dependencies handlingSergey Sharybin
This is a more correct fix to the issue Brecht was fixing in D6600. While the fix in that patch worked fine for linking it broke ASAN runtime under some circumstances. For example, `make full debug developer` would compile, but trying to start blender will cause assert failure in ASAN (related on check that ASAN is not running already). Top-level idea: leave it to CMake to keep track of dependency graph. The root of the issue comes to the fact that target like "blender" is configured to use a lot of static libraries coming from Blender sources and to use external static libraries. There is nothing which ensures order between blender's and external libraries. Only order of blender libraries is guaranteed. It was possible that due to a cycle or other circumstances some of blender libraries would have been passed to linker after libraries it uses, causing linker errors. For example, this order will likely fail: libbf_blenfont.a libfreetype6.a libbf_blenfont.a This change makes it so blender libraries are explicitly provided their dependencies to an external libraries, which allows CMake to ensure they are always linked against them. General rule here: if bf_foo depends on an external library it is to be provided to LIBS for bf_foo. For example, if bf_blenkernel depends on opensubdiv then LIBS in blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES. The change is made based on searching for used include folders such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries to LIBS ion that CMakeLists.txt. Transitive dependencies are not simplified by this approach, but I am not aware of any downside of this: CMake should be smart enough to simplify them on its side. And even if not, this shouldn't affect linking time. Benefit of not relying on transitive dependencies is that build system is more robust towards future changes. For example, if bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES and all such code is moved to bf_blenkernel this will not break linking. The not-so-trivial part is change to blender_add_lib (and its version in Cycles). The complexity is caused by libraries being provided as a single list argument which doesn't allow to use different release and debug libraries on Windows. The idea is: - Have every library prefixed as "optimized" or "debug" if separation is needed (non-prefixed libraries will be considered "generic"). - Loop through libraries passed to function and do simple parsing which will look for "optimized" and "debug" words and specify following library to corresponding category. This isn't something particularly great. Alternative would be to use target_link_libraries() directly, which sounds like more code but which is more explicit and allows to have more flexibility and control comparing to wrapper approach. Tested the following configurations on Linux, macOS and Windows: - make full debug developer - make full release developer - make lite debug developer - make lite release developer NOTE: Linux libraries needs to be compiled with D6641 applied, otherwise, depending on configuration, it's possible to run into duplicated zlib symbols error. Differential Revision: https://developer.blender.org/D6642
2020-01-23Fix: Use a minimal alignment of 8 in MEM_lockfree_mallocN_alignedJacques Lucke
`posix_memalign` requires the `alignment` to be at least `sizeof(void *)`. Previously, `MEM_mallocN_aligned` would simply return `NULL` if a too small `alignment` was used. This was an OS specific issue. The solution is to use a minimal alignment of `8` for all aligned allocations. The unit tests have been extended to test more possible alignments (some of which were broken before). Reviewers: brecht Differential Revision: https://developer.blender.org/D6660
2020-01-17Cleanup: Fix typo in instruction commentsHans Goudey
2020-01-16CMake: Fix linking of ffmpeg_test on macOSSergey Sharybin
Part of the issue was missing library path to png library. Other part was missing iconv passed to linker.
2020-01-15Fix linking error with ffmpeg_test on LinuxBrecht Van Lommel
The exact reason is unclear, but we might as well link just the few libraries that are actually needed for ffmpeg.
2020-01-14test: Add basic codec test for ffmpeg.Ray Molenkamp
This add a basic sanity check that validates the features we use from ffmpeg are actually available Differential Revision: https://developer.blender.org/D5999 Reviewed By: sybren
2020-01-13Accepting patch D5357: Modifiers and operators automated testing.Howard Trickey
Patch from Habib Gahbiche (zazizizou) moves the "run operator and compare mesh to a golden" paradigm used in bevel and boolean tests into a general framework that separates the test specs from the blend files. Then adds some other operator and modifier tests using the new framework. Diff D5357.id20724.diff was applied. New .blend files, modifiers.blend and operators.blend are needed in the tests/modeling svn directory; those were separately committed.
2020-01-09Cycles: Disable fluid motion blur regression testSergey Sharybin
There are deeper issues than just updating the regression test .blend file and the solution is dragging for far too long. Considering this a known broken feature, which will either be fixed next week or completely removed from the interface for the coming release.
2020-01-08Fix build error in tests on Clang / macOSBrecht Van Lommel
2020-01-08Fix T72878: Alphabetical sorting in Outliner sorts shorter names lastJulian Eisel
E.g. "Cube" would be placed after "Cube.001", which is not what you'd expect. 2.80 handled this correctly. Loosely based on D6525 by @radcapricorn, but found a bug in that and prefered to do some further adjustments. Also activates test for this case.
2020-01-08Tests: Natural string comparing (BLI_strcasecmp_natural())Julian Eisel
Adds tests covering a good amount of common cases and corner cases for `BLI_strcasecmp_natural()`. Could of course always add more tests for more cases, but don't want to spend too much time on this.
2019-12-21Fix crash in delaunay triangulation due to epsilon issues.Howard Trickey
2019-12-20ID Management: Add some basic tests regarding name handling.Bastien Montagne
Those tests are here mostsly to ensure ID name management is working as expected (the code ensuring we never have two ilocal data-blocks of the same type with the same name in a .blend file). Note: Currently fails in some cases, fixes are incoming. Note: Ideally this would be in C, but we already have too many tests linking the whole Blender and its libraries, this is becoming a real pain to link debug + ASAN + tests build these days... So until we find a better way to handle those dependencies, sticking to simple python scripts.
2019-12-17Cleanup: spellingCampbell Barton
2019-12-13USD: disabled unit test that fails on the buildbotSybren A. Stüvel
I can't fix this quickly right now, so I'd rather drop the entire test for now.
2019-12-13USD: Simplified unit test and made it work on Windows as wellSybren A. Stüvel
2019-12-13USD: Remove file created in unit test after the test is doneSybren A. Stüvel
No functional changes in the USD exporter, just some cleanup code added to the unit test.
2019-12-13USD: Introducing a simple USD ExporterSybren A. Stüvel
This commit introduces the first version of an exporter to Pixar's Universal Scene Description (USD) format. Reviewed By: sergey, LazyDodo Differential Revision: https://developer.blender.org/D6287 - The USD libraries are built by `make deps`, but not yet built by install_deps.sh. - Only experimental support for instancing; by default all duplicated objects are made real in the USD file. This is fine for exporting a linked-in posed character, not so much for thousands of pebbles etc. - The way materials and UV coordinates and Normals are exported is going to change soon. - This patch contains LazyDodo's fixes for building on Windows in D5359. == Meshes == USD seems to support neither per-material nor per-face-group double-sidedness, so we just use the flag from the first non-empty material slot. If there is no material we default to double-sidedness. Each UV map is stored on the mesh in a separate primvar. Materials can refer to these UV maps, but this is not yet exported by Blender. The primvar name is the same as the UV Map name. This is to allow the standard name "st" for texture coordinates by naming the UV Map as such, without having to guess which UV Map is the "standard" one. Face-varying mesh normals are written to USD. When the mesh has custom loop normals those are written. Otherwise the poly flag `ME_SMOOTH` is inspected to determine the normals. The UV maps and mesh normals take up a significant amount of space, so exporting them is optional. They're still enabled by default, though. For comparison: a shot of Spring (03_035_A) is 1.2 GiB when exported with UVs and normals, and 262 MiB without. We probably have room for optimisation of written UVs and normals. The mesh subdivision scheme isn't using the default value 'Catmull Clark', but uses 'None', indicating we're exporting a polygonal mesh. This is necessary for USD to understand our normals; otherwise the mesh is always rendered smooth. In the future we may want to expose this choice of subdivision scheme to the user, or auto-detect it when we actually support exporting pre-subdivision meshes. A possible optimisation could be to inspect whether all polygons are smooth or flat, and mark the USD mesh as such. This can be added when needed. == Animation == Mesh and transform animation are now written when passing `animation=True` to the export operator. There is no inspection of whether an object is actually animated or not; USD can handle deduplication of static values for us. The administration of which timecode to use for the export is left to the file-format-specific concrete subclasses of `AbstractHierarchyIterator`; the abstract iterator itself doesn't know anything about the passage of time. This will allow subclasses for the frame-based USD format and time-based Alembic format. == Support for simple preview materials == Very simple versions of the materials are now exported, using only the viewport diffuse RGB, metallic, and roughness. When there are multiple materials, the mesh faces are stored as geometry subset and each material is assigned to the appropriate subset. If there is only one material this is skipped. The first material if any) is always applied to the mesh itself (regardless of the existence of geometry subsets), because the Hydra viewport doesn't support materials on subsets. See https://github.com/PixarAnimationStudios/USD/issues/542 for more info. Note that the geometry subsets are not yet time-sampled, so it may break when an animated mesh changes topology. Materials are exported as a flat list under a top-level '/_materials' namespace. This inhibits instancing of the objects using those materials, so this is subject to change. == Hair == Only the parent strands are exported, and only with a constant colour. No UV coordinates, no information about the normals. == Camera == Only perspective cameras are supported for now. == Particles == Particles are only written when they are alive, which means that they are always visible (there is currently no code that deals with marking them as invisible outside their lifespan). Particle-system-instanced objects are exported by suffixing the object name with the particle's persistent ID, giving each particle XForm a unique name. == Instancing/referencing == This exporter has experimental support for instancing/referencing. Dupli-object meshes are now written to USD as references to the original mesh. This is still very limited in correctness, as there are issues referencing to materials from a referenced mesh. I am still committing this, as it gives us a place to start when continuing the quest for proper instancing in USD. == Lights == USD does not directly support spot lights, so those aren't exported yet. It's possible to add this in the future via the UsdLuxShapingAPI. The units used for the light intensity are also still a bit of a mystery. == Fluid vertex velocities == Currently only fluid simulations (not meshes in general) have explicit vertex velocities. This is the most important case for exporting velocities, though, as the baked mesh changes topology all the time, and thus computing the velocities at import time in a post-processing step is hard. == The Building Process == - USD is built as monolithic library, instead of 25 smaller libraries. We were linking all of them as 'whole archive' anyway, so this doesn't affect the final file size. It does, however, make life easier with respect to linking order, and handling upstream changes. - The JSON files required by USD are installed into datafiles/usd; they are required on every platform. Set the `PXR_PATH_DEBUG` to any value to have the USD library print the paths it uses to find those files. - USD is patched so that it finds the aforementioned JSON files in a path that we pass to it from Blender. - USD is patched to have a `PXR_BUILD_USD_TOOLS` CMake option to disable building the tools in its `bin` directory. This is sent as a pull request at https://github.com/PixarAnimationStudios/USD/pull/1048
2019-12-10Cleanup: extra semicolon, comma warningsCampbell Barton