Commit Graph

103 Commits

Author SHA1 Message Date
977e7b68cb Cycles: add denoising tests, keep new image even if no reference exists. 2017-08-11 01:09:35 +02:00
Sybren A. Stüvel
8cfb9b9535 Fixed Alembic unit test
Commit b6d7cdd3cee9312156e20783248a3b12420b7a53 changed how the mesh data
is deformed, which wasn't taken into account yet in this unit test.

Instead of directly reading the mesh vertices (which aren't animated any
more), we convert the modified mesh to a new one, and inspect those
vertices instead.
2017-08-09 13:59:58 +02:00
Sergey Sharybin
2190c0c7e5 Modules test: Don't print backtrace for files which are ignored
This could make output really polluted, where it'll be hard to see actual
issues.

It is still possible to have all backtraces printed using BLENDER_VERBOSE
environment variable.
2017-08-09 09:42:03 +02:00
Sergey Sharybin
771e6120c8 Cycles tests: CMake side changes to support recent files split in the SVN repo 2017-08-07 14:33:47 +02:00
0f3f093d3b Cycles: add HTML report to inspect failed test images.
Shows new, reference and diff renders, with mouse hover to flip between
new and ref for easy comparison. This generates a report.html in
build_dir/tests/cycles, stored along with the new and diff images.

Differential Revision: https://developer.blender.org/D2770
2017-08-07 14:01:24 +02:00
Campbell Barton
696599edac CMake: test build configuration support
D2765 by @akitula
2017-08-04 08:11:42 +10:00
Bastien Montagne
13d324f26b Tweak multi-units tests to match new precision handling in conversion from raw value to prety-printed one.
Note that new code allows to enable again the '1 million miles' tests.
2017-08-01 16:43:40 +02:00
Sergey Sharybin
35d9f68121 Python module test: Don't cfail the test when import failure happens in preset 2017-07-25 11:39:10 +02:00
Sybren A. Stüvel
0f793ee606 Fix unit test error on Windows 2017-07-14 09:53:27 +02:00
Sybren A. Stüvel
32edfd53d9 Fix T52022 Alembic Inherits transform not taken into account
Alembic's "inherits transform" flag wasn't taken into account when
constructing the parent object relations.
2017-07-11 16:17:27 +02:00
Sybren A. Stüvel
243b42af49 Alembic tests: make failures a bit easier to diagnose. 2017-06-19 17:55:51 +02:00
Sybren A. Stüvel
81775e1920 Fix T51762: Unit test script_alembic_import is failing.
Implemented workaround for use with the legacy depsgraph.
2017-06-19 17:50:43 +02:00
Sybren A. Stüvel
7461bb3f52 Fixed bl_load_py_modules / script_load_modules unit test
It tried to assert that
addons/io_blend_utils/blender_bam-unpacked.whl/__init__.py was loaded when
the io_blend_utils module was imported. However, this happens only on
demand, and not directly when importing the add-on.
2017-06-19 15:28:52 +02:00
Sybren A. Stüvel
c9291ab2ac Use for/else instead of setting 'ok' variable.
This is more efficient, and this use case is exactly what the else clause
is for.
2017-06-19 15:28:52 +02:00
Sybren A. Stüvel
9af3119c53 Removed trailing spaces 2017-06-19 15:28:52 +02:00
Campbell Barton
00c4f49a6d Cleanup: indentation, long lines 2017-06-12 13:38:21 +10:00
Campbell Barton
46c073e4ac Cleanup: cmake indentation, missing include 2017-06-09 06:45:21 +10:00
Ray Molenkamp
7bff00b522 Fix alembic tests not running with debug build on windows 2017-06-04 17:05:59 -06:00
Bastien Montagne
19809c8385 Add automated ctest for complex merge in Array modifier.
See also T50851.
2017-05-26 21:58:29 +02:00
Sybren A. Stüvel
7b25ffb618 Fix T51534: Alembic: added support for face-varying vertex colours
Houdini writes vertex data in a different format than Blender does; Houdini
uses "face-varying scope", which means that the vertex colours are indexed
by an ever-increasing number over all vertices of all faces instead of the
vertex index.

I've also merged the read_custom_data_mcols() and read_mcols() functions,
because the latter was only called from the former, and the changes in this
commit would add yet more function parameters to pass.
2017-05-23 17:27:15 +02:00
Sybren A. Stüvel
1e8d7f3b25 Fix T51331: fixes for Alembic unit tests on Windows 2017-04-28 15:28:41 +02:00
Sybren A. Stüvel
dba6e170c4 Alembic import: added unit test for mesh deformation. 2017-04-26 10:42:20 +02:00
Sybren A. Stüvel
3128600a8a Fix T51262: Blender CRASH with alembic file
Also added a unit test for exporting & importing very long names.
2017-04-25 12:06:03 +02:00
cedb1915fe CMake: fix wrong alembic test name on Windows. 2017-04-23 18:24:43 +02:00
Jens Verwiebe
20c9c1b44e OSX: satisfy macro to also apply alembic tests 2017-04-22 19:03:59 +02:00
Jens Verwiebe
517bd13baa Disable breaking alembic test for osx 2017-04-22 18:39:11 +02:00
Sybren A. Stüvel
7e977470f3 Alembic unit tests: Removed trailing spaces 2017-04-21 16:20:35 +02:00
Sybren A. Stüvel
e6ee3fd924 Alembic unit tests: don't depend on ALEMBIC_ROOT_DIR being defined by user
By mistake, the code relied on ALEMBIC_ROOT_DIR being defined by the user
running the tests. Now CMake macros are used to correctly find the Alembic
root directory.
2017-04-21 16:20:01 +02:00
Sybren A. Stüvel
9c02990ac1 Alembic import: changing cache modifier path no longer discards object paths
This allows, for example, the path of an Alembic file to be changed from
absolute to relative, without having to reconstruct all object paths.
2017-04-21 14:11:49 +02:00
Sybren A. Stüvel
ae79eb2105 Alembic import: select imported objects
When the Alembic import is finished, all imported objects are selected.
2017-04-20 12:01:31 +02:00
Sybren A. Stüvel
aaec934096 Alembic import: added simple unit test for importer.
It only tests the presence of the objects and their parent/child pointers.
Matrix and animated properties should be done in a later test.
2017-04-19 17:28:25 +02:00
Sybren A. Stüvel
2dac8b3ee0 Alembic import/export: added as_background_job option
The ABC_export and ABC_import functions both take a as_background_job
parameter, and return a boolean.

When as_background_job=true, returns false immediately after scheduling
a background job. This was the old behaviour of this function, which makes
it very hard for scripts to do something with the data after the import
or export completes.

When as_background_job=false, performs the export synchronously, and
returns true when the export was ok, and false if there were any errors.
This allows further processing.

The Scene.alembic_export() function is deprecated, and will be removed from
Blender 2.8 in favour of calling the bpy.ops.wm.alembic_export() operator.
As such, it has been hard-coded to the old background job behaviour.
2017-04-19 14:40:57 +02:00
Sybren A. Stüvel
b148ac5cf7 Alembic export: made hair/particle export optional.
The export is still slower than needed, as the particle systems themselves
aren't disabled during the export. It's only the writing to the Alembic
file that's skipped.
2017-04-19 13:03:52 +02:00
Sybren A. Stüvel
5bdbc88ab8 Alembic import/export: write curve resolution to user property
Curve resolution isn't natively supported by Alembic, hence it is stored
in a user property "blender:resolution". I've looked at a Maya curves
example file, but that also didn't contain any information about curve
resolution.

Differential Revision: https://developer.blender.org/D2634

Reviewers: kevindietrich
2017-04-18 16:36:33 +02:00
Sybren A. Stüvel
7d5a1c0c4c Alembic unittest: pass unknown CLI arguments to unittest.main()
This allows specifying test names on the CLI, in order to run only one
of the tests.
2017-04-18 13:57:04 +02:00
Sybren A. Stüvel
d24578b676 Alembic export: fixed curve type and order.
The order number written to Alembic is the same as we use in memory, so
the +1 wasn't needed, at least according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

Furthermore, when writing an array of nurb orders, the curve type should
be set to kVariableOrder, otherwise the importer will ignore it.
2017-04-18 13:57:04 +02:00
Sybren A. Stüvel
5fa4f397c2 Alembic import: fixed dupligroup export when the dupli-empty has a parent 2017-04-14 18:20:28 +02:00
Sybren A. Stüvel
6af131fa5c Added simple unittests for Alembic exporter
This test checks that a set of cubes are exported with the correct
transform, both with flatten=True and flatten=False.

This commit also adds an easy to use superclass for upcoming Alembic
unit tests.
2017-04-14 12:54:20 +02:00
Alexander Romanov
a7b3047cef Datablock ID Properties
The absence of datablock properties "will certainly be resolved soon as the need for them is becoming obvious" said the [[http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67/Python_Nodes|Python Nodes release notes]]. So this patch allows Python scripts to create ID Properties which reference datablocks.
This functionality is implemented for `PointerProperty` and now such properties can be created with Python.

In addition to the standard update callback, `PointerProperty` can have a `poll` callback (standard RNA) which is useful for search menus. For details see the test included in this patch.

Original author: @artfunkel

Alexander (Blend4Web Team)

Reviewers: brecht, artfunkel, mont29, campbellbarton

Reviewed By: mont29, campbellbarton

Subscribers: jta, sergey, campbellbarton, wisaac, poseidon4o, mont29, homyachetser, Evgeny_Rodygin, AlexKowel, yurikovelenov, fjuhec, sharlybg, cardboard, duarteframos, blueprintrandom, a.romanov, BYOB, disnel, aditiapratama, bliblubli, dfelinto, lukastoenne

Maniphest Tasks: T37754

Differential Revision: https://developer.blender.org/D113
2017-04-13 12:33:05 +03:00
Jacques Lucke
73a9ff0d2d PyAPI: Fast buffer access to id property arrays
Support Python's buffer protocol for ID-properties.
2017-04-10 21:12:02 +10:00
Sergey Sharybin
8c22a974d6 Tests: Compare vectors with epsilon
SOlves the test false-positively failing in 32 bit environment.
2017-04-07 18:28:38 +02:00
Campbell Barton
c2d3bb7090 Remove non-bmesh case from test 2017-03-29 20:11:54 +11:00
Campbell Barton
6332e0e1f7 Use 'empty' option for clearing factory settings 2017-03-29 20:11:54 +11:00
Jacques Lucke
56d3cc9341 PyAPI: ID Property tests 2017-03-19 03:57:40 +11:00
Sergey Sharybin
26c8d559fe Register test for mesh.split_faces() 2017-02-16 15:36:00 +01:00
Sergey Sharybin
5cbaf56b26 Cyctes tests: Commit blender.git side changes 2017-02-16 10:36:22 +01:00
Sergey Sharybin
e33e58bf23 CTests: Initial work to cover Cycles nodes with OpenGL tests
Works similar to regular Cycles tests, just does OpenGL render to
get output image.

Seems to work fine with the only funny effect: Blender window will
pop up for each of the tests. This is current limitation of our
OpenGL context. Might be changed in the future.
2017-02-10 14:52:54 +01:00
Sergey Sharybin
e991af0934 Cleanup: Trailing whitespace 2017-02-10 14:08:12 +01:00
Sergey Sharybin
c231c29afa Cycles tests: Allow python auto-exec 2017-02-01 10:13:40 +01:00
lazydodo
64f5afdb89 [Cycles/MSVC/Testing] Fix broken test code.
Currently the tests don't run on windows for the following reasons

1) render_graph_finalize has an linking issue due missing a bunch of libraries (not sure why this is not an issue for linux)
2) This one is more interesting, in test/python/cmakelists.txt ${TEST_BLENDER_EXE_BARE} and ${TEST_BLENDER_EXE} are flat out wrong, but for some reason this doesn't matter for most tests, cause ctest will actually go out and look for the executable and fix the path for you *BUT* only for the command, if you use them in any of the parameters it'll happily pass on the wrong path.
3) on linux you can just run a .py file, windows is not as awesome and needs to be told to run it with pyton.
4) had to use the NAME/COMMAND long form of add_test otherwise $<TARGET_FILE:blender> doesn't get expanded, why? beats me.
5) missing idiff.exe for msvc2015/x64 in the libs folder.

This patch addresses 1-4 , but given I have no working Linux build environment, I'm unsure if it'll break anything there

5 has been fixed in rBL61751

Reviewers: juicyfruit, brecht, sergey

Reviewed By: sergey

Subscribers: Blendify

Tags: #cycles, #automated_testing

Differential Revision: https://developer.blender.org/D2367
2017-01-25 09:37:19 -07:00