Commit Graph

386 Commits

Author SHA1 Message Date
Campbell Barton
a2d246c5c0 BLI_polyfill2d_test: script to generate test data 2017-09-20 13:40:30 +10:00
Campbell Barton
16355d545b Fix T52834: Polyfill2D fails with co-linear edges 2017-09-20 04:29:04 +10:00
Campbell Barton
c4235356c9 BLI_polyfill2d_test: add test for T52834
Commented since it currently fails.
2017-09-20 03:40:13 +10:00
Campbell Barton
e00bb4d22c BLI_polyfill2d_test: Try flipped x/y axis
In T52834 this makes a difference.
2017-09-20 03:35:06 +10:00
Sergey Sharybin
af170839af Merge branch 'master' into blender2.8 2017-09-19 21:08:14 +05:00
Campbell Barton
60956397ca Cleanup: BLI_utildefines prefix for header-only libs
This allows to have different macro headers without them sharing
similar names to regular C modules.
2017-09-19 20:16:05 +10:00
Campbell Barton
37d8d4787c Merge branch 'master' into blender2.8 2017-09-13 23:44:13 +10:00
Sergey Sharybin
e7b5bbae6a Cycles tests: Add baking features tests 2017-09-12 16:22:02 +05:00
28532f1867 Cycles tests: add environment variable to update references renders.
This will copy new renders over references renders:
CYCLESTEST_UPDATE=1 ctest -R cycles
2017-09-12 12:50:44 +02:00
Campbell Barton
323a7ab944 Merge branch 'master' into blender2.8 2017-08-31 21:57:38 +10:00
Sergey Sharybin
4f1b510d75 Cycles: Add tangent attribute tests 2017-08-30 17:42:00 +02:00
Campbell Barton
ca9801bd42 Merge branch 'master' into blender2.8 2017-08-27 16:35:51 +10:00
Campbell Barton
b1f2b69884 Missing from last commit 2017-08-27 15:24:41 +10:00
Campbell Barton
6178cf8353 Cleanup: use stubs for eigen gtest 2017-08-27 15:21:09 +10:00
Campbell Barton
79111f9246 Merge branch 'master' into blender2.8 2017-08-27 00:51:54 +10:00
Ray Molenkamp
58d92cefbd [cycles/ctest] fix failing tests when output folder doesn't exist yet. 2017-08-25 17:17:49 -06:00
Campbell Barton
58a4c767a1 Merge branch 'master' into blender2.8 2017-08-23 16:10:45 +10:00
Campbell Barton
46b9f89f5e Tests: fix incorrect check for hidden dir
Copy-pasted mistake in tests and tools.
2017-08-23 15:36:39 +10:00
Campbell Barton
7497488149 Merge branch 'master' into blender2.8 2017-08-20 15:50:15 +10:00
4218b9367e Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.
2017-08-19 18:14:16 +02:00
Campbell Barton
2332051419 Merge branch 'master' into blender2.8 2017-08-19 21:54:05 +10:00
d282dc04ef Cycles tests: add light type tests. 2017-08-18 17:09:12 +02:00
5cf36c0f05 Cycles tests: make page less wide, use relative URLs for serving through http. 2017-08-18 17:09:08 +02:00
Dalai Felinto
18ce2bfac6 Depsgraph/Layers: Keep original visibility when doing full scene copy
Originally we were not respecting the original visibility flags of the
collections. However this is required for Copy-on-write (CoW).

Remember to update the svn lib tests folder. I had to update some of the
json files there.

Also adding a new unittest for this particular issue:
Test render_layer_scene_copy_f
2017-08-16 10:35:26 +02:00
Campbell Barton
9567529b8f Merge branch 'master' into blender2.8 2017-08-12 00:23:49 +10:00
Sergey Sharybin
596ee4b505 Cycles tests: Draw images on top of checkerboard
This way it's easier to see alpha-channel only images, such as shadow catcher
images on transparent film.
2017-08-11 13:49:50 +02:00
Campbell Barton
d1328feeb1 Merge branch 'master' into blender2.8 2017-08-11 10:33:39 +10:00
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
b4d44b98e8 Alembic: Adjusted unit test for Blender 2.8 to use scene layers. 2017-08-09 15:08:19 +02:00
Sybren A. Stüvel
6883f10f14 Merge branch 'master' into blender2.8 2017-08-09 15:08:06 +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
Bastien Montagne
e8b6bcd65c Merge branch 'master' into blender2.8
Conflicts:
	source/blender/depsgraph/intern/builder/deg_builder_relations.cc
	source/blender/editors/object/object_add.c
	source/blender/python/intern/bpy_app_handlers.c
2017-08-08 16:43:25 +02:00
Sergey Sharybin
b53e35c655 Fix compilation error when building without Blender
Simply disabled python tests, they can't be run anyway (since blender target is
not enabled) and we don't have any player-related tests in that folder.
2017-08-08 11:32:33 +02:00
Bastien Montagne
b282716c3a Merge branch 'master' into blender2.8 2017-08-07 16:16:43 +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
e16e96433f Merge branch 'master' into blender2.8 2017-08-04 08:26:05 +10:00
Campbell Barton
696599edac CMake: test build configuration support
D2765 by @akitula
2017-08-04 08:11:42 +10:00
Campbell Barton
ca67cdb73c Merge branch 'master' into blender2.8 2017-08-03 07:14:02 +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
Campbell Barton
913d8ec608 BLI_memiter: Small API for many small allocations
- Each allocation can be a different size
  (but should be smaller than the chunk size).
- Result can be looped over in order of allocation.
- Allocations are aligned to pointer size to avoid unaligned reads.
2017-07-30 00:08:17 +10:00
Campbell Barton
b97bf844b3 Merge branch 'master' into blender2.8 2017-07-25 20:53:10 +10: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
Sergey Sharybin
35d044e40d Fix compilation error of alembic test after recent eval_ctx changes 2017-07-24 16:50:47 +02:00
Dalai Felinto
f04c06498b Fix layers unittest - we cannot use nestted get_pointer calls
Remember to update your //lib/tests folder as well.

Patch by Bastien Montagne(mont29)
2017-07-17 18:46:00 +02:00
Dalai Felinto
0e49d5376c Revert "Unittests: Workaround for basact->object.id.name written as DATA"
This reverts commit aa578fba534d7d7cab215d8f57c478d641b05db7.
2017-07-17 18:06:49 +02:00
Dalai Felinto
aa578fba53 Unittests: Workaround for basact->object.id.name written as DATA
This was introduced on e7fb013a60dd. Although I would love to investigate the
issue I'm mostly concerned with gettings the tests working again.
2017-07-17 16:22:42 +02:00
Dalai Felinto
a258c5d325 Unittests: Make sure layer tests pass with or without workspace 2017-07-17 16:22:07 +02:00
Dalai Felinto
9d318acfa7 Merge remote-tracking branch 'origin/master' into blender2.8 2017-07-14 14:34:46 +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
ded2b30ebc Alembic: Adjusted unittest for Blender 2.8 2017-07-11 16:28:52 +02:00
Sybren A. Stüvel
4233ccfb6c Merge branch 'master' into blender2.8 2017-07-11 16:18:17 +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
Alexander Romanov
e1482841dd Merge branch 'master' into blender2.8 2017-07-03 19:53:00 +03:00
Sybren A. Stüvel
1fb3075803 Fixed build error on Windows / VS2015 2017-07-03 16:09:19 +02:00
Dalai Felinto
49a35033be Fix T51877: Deleting a scene uses freed memory
At the moment libblock_remap_data_preprocess is using
FOREACH_SCENE_OBJECT to iterate over all the objects of the scene and
unlink them.

However we were storing a reference to the Base of the removed object.
Anyways, the loop is now sanitized so that this crash no longer happens.

Also now we have an unittest for this.
2017-06-30 19:03:02 +02:00
Dalai Felinto
4ceb006706 Merge remote-tracking branch 'origin/master' into blender2.8 2017-06-21 15:14:42 +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
2ecb9856bc Cleanup: move copy-paste code into function 2017-06-19 16:12:11 +10:00
Dalai Felinto
32cd8ac710 Layers: Scene copy should copy selection as well.
We need this for Depsgraph, otherwise CoW scene will have different selection properties.
2017-06-15 13:47:14 +02:00
Bastien Montagne
7439919ac0 Merge branch 'master' into blender2.8 2017-06-14 22:39:33 +02:00
Bastien Montagne
eeb9e5316a Make whole ID copying code use const source pointer.
Noisy change, but safe, and better do it sooner than later if we are to
rework copying code. Also, previous commit shows this *is* useful to
catch some mistakes.
2017-06-14 22:38:11 +02:00
Sergey Sharybin
0f4f4d8754 Merge branch 'master' into blender2.8 2017-06-12 15:12:36 +02:00
Campbell Barton
00c4f49a6d Cleanup: indentation, long lines 2017-06-12 13:38:21 +10:00
Campbell Barton
1bd6ed7128 Correct gtest EXPECT use 2017-06-12 10:25:18 +10:00
Campbell Barton
eb1cde5a81 GTest: initial kdopbvh test
Currently only find-nearest, ray-casting needs to be added.
2017-06-11 19:10:33 +10:00
Julian Eisel
da30509725 Fix failing render-layer tests after workpsace commit 2017-06-09 19:30:14 +02:00
Campbell Barton
346619159a Merge branch 'master' into blender2.8 2017-06-09 07:21:43 +10:00
Campbell Barton
46c073e4ac Cleanup: cmake indentation, missing include 2017-06-09 06:45:21 +10:00
Campbell Barton
e83001b782 Merge branch 'master' into blender2.8 2017-06-05 18:11:59 +10:00
Ray Molenkamp
7bff00b522 Fix alembic tests not running with debug build on windows 2017-06-04 17:05:59 -06:00
Sergey Sharybin
f32a18994a Merge branch 'master' into blender2.8 2017-05-31 15:52:11 +02:00
Sybren A. Stüvel
35f4abcf53 Alembic: simplified sub-frame sampling
It's now less confusing (for example, using nr_of_samples directly,
instead of using 1 / 1 / nr_of_samples). Might also have fixed a bug.

Also added unittests.
2017-05-30 13:47:51 +02:00
Bastien Montagne
8ead56c4c9 Merge branch 'master' into blender2.8 2017-05-28 17:48:59 +02:00
Bastien Montagne
19809c8385 Add automated ctest for complex merge in Array modifier.
See also T50851.
2017-05-26 21:58:29 +02:00
Campbell Barton
bdbf4471a6 TexFace removal part 3
- MTexPoly structure & layer type.
- The 'Mesh.uv_textures' layers.
- DerivedMesh TexFace drawing.
- Scripts & UI.
2017-05-25 15:19:58 +10:00
Sybren A. Stüvel
99c6601a1f Merge branch 'master' into blender2.8 2017-05-23 17:35:45 +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
074c5f0d26 Merge branch 'master' into blender2.8 2017-04-28 15:52:07 +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
dc27d31a21 Merge commit 'master@6ed15c5a41130b55cb57a43a8a9470a91d38c3d5' into blender2.8
# Conflicts:
#	source/blender/alembic/intern/abc_exporter.cc
2017-04-26 16:50:29 +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
6822e353ff Merge branch 'master' into blender2.8 2017-04-25 17:04:17 +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
Campbell Barton
2010dbe8a5 Merge branch 'master' into blender2.8 2017-04-24 22:11:05 +10: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
cc2d501642 Merge branch 'master' into blender2.8 2017-04-21 16:30:24 +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
Dalai Felinto
e6f073fe41 Re-enabling Alembic test
(disabled because of bug fixed on 19548040d91dedc2a63444f3277e4365837931e1)
2017-04-21 16:07:53 +02:00
Sergey Sharybin
e4ab70da86 CMake: Add option to build against system-wide Glog
Similar to previous commit for Gflags.
2017-04-21 14:36:34 +02:00
Sybren A. Stüvel
81011679dd Merge branch 'master' into blender2.8 2017-04-21 14:19:05 +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
Sergey Sharybin
c7a5c48cba CMake: Add option to link against system-wide Gflags library
It is disabled by default, so should not affect existing configurations.

Main benefits of this goes as:

- Linux distros can use that to avoid libraries duplication and link
  blender package against gflags package from the system.

- It it easier to test whether Blender works with updated version of
  Gflags prior to re-bundling the library.
2017-04-21 12:01:27 +02:00
Sybren A. Stüvel
aa4102a441 Merge branch 'master' into blender2.8
Disabled a unittest, to be re-enabled when T51261 is fixed.

# Conflicts:
#	source/blender/alembic/intern/alembic_capi.cc
2017-04-20 12:50:20 +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
Dalai Felinto
53d59af364 Corrections for layers unittest based on design change
Example, imagine an object Cube in collections 1 and 2 where both
collections are nested to A. Now we set a "color" property as follow:

```
Scene -> GREEN
--
A     -> RED
↳ 1   -> BLUE
↳ 2   -> -
```

In this case the object will be RED, because of A↳ 2.

Now if we have:

```
Scene -> GREEN
--
A     -> RED
↳ 1   -> -
↳ 2   -> PINK
1     -> -
--

The object will be PINK because of A↳ 2.

Note that the (top level) collection 1 doesn't influence the object color
because there are no overrides on it. The scene render settings (GREEN
in this case) are only used as fallback if an override is not set at
all.
2017-04-20 11:00:32 +02:00
Sybren A. Stüvel
c0f9d962f0 Merge branch 'master' into blender2.8
Updated tests/python/bl_alembic_import_test.py to be 2.8-compatible.
2017-04-19 17:33:22 +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
781108cdc6 Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/alembic/intern/abc_exporter.cc
#	source/blender/alembic/intern/abc_exporter.h
2017-04-19 15:07:54 +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
Dalai Felinto
9c84d99819 Unittests: Layer render settings evaluation
More failing unittests to add to the existing ones.
2017-04-19 14:35:29 +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
bb31648b9b Merge branch 'master' into blender2.8 2017-04-18 16:47:25 +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
Dalai Felinto
c9d78b6c43 Merge remote-tracking branch 'origin/master' into blender2.8 2017-04-18 16:30:13 +02:00
Sybren A. Stüvel
b27a98df1d Merged master@e12c3110024dc4b62ffefa739288218b04e39f71 into blender2.8
This doesn't merge entire master into blender2.8, but at least solves
one conflict.
2017-04-18 14:18:06 +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
Dalai Felinto
5a5f1dc8e4 Unittests for depsgraph layer collection render settings evaluation
Some of the tests are failing at the moment.
Those problems were introduced in eba09b1520
2017-04-13 16:28:50 +02:00
Alexander Romanov
6f268ac55d Merge branch 'master' into blender2.8 2017-04-13 13:02:39 +03: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
Bastien Montagne
346964eb3f Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/gpencil/drawgpencil.c
2017-04-10 16:53:12 +02: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
Dalai Felinto
b6ba507c1b Layers unittest: layer_cyncing test was not being called 2017-04-10 10:08:29 +02:00
Dalai Felinto
90b2b99505 Unitettesting: Force python errors to show as error 2017-04-10 10:03:02 +02:00
Campbell Barton
c800ee6bfe Merge branch 'master' into blender2.8 2017-04-09 16:09:12 +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
Sybren A. Stüvel
31c272e840 Simplified some test code in render_layer_common.py 2017-04-07 17:51:23 +02:00
Sybren A. Stüvel
ad60283bc8 No more need to alter sys.path in each and every render_layer unit test.
I tried the clean way, by setting the PYTHONPATH environment variable for
CTest, using SET (CTEST_ENVIRONMENT blablab), but that didn't seem to
work.
2017-04-07 17:50:47 +02:00
Sybren A. Stüvel
6cf3fa9ff0 Tests: import blendfile without modifying sys.path 2017-04-07 17:29:14 +02:00
Sybren A. Stüvel
063bae4fcc Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/alembic/intern/abc_exporter.h
#	source/blender/alembic/intern/abc_util.cc
2017-04-07 17:28:22 +02:00
Bastien Montagne
102966b12e Fix building alembic gtest with buildinfo... 2017-04-07 10:44:13 +02:00
Sybren A. Stüvel
fa827374a7 Alembic: rotation mode issue in copy_m44_axis_swap, and added unit tests. 2017-04-06 16:47:01 +02:00
Sybren A. Stüvel
b6775cd684 Added float[][] comparison macros to testing.h
I've moved EXPECT_M3_NEAR from abc_matrix_test.cc to testing.h, as that's
a more suitable location.
2017-04-06 16:47:01 +02:00
Sybren A. Stüvel
c2fec0f1b0 Alembic: Renamed create_rotation_matrix to create_swapped_rotation_matrix and more:
Also replaced the bool param "to_yup" with "AbcAxisSwapMode mode", so that
it's more explicit that axes are swapped.

Also added unittests for create_swapped_rotation_matrix.
2017-04-06 16:47:01 +02:00
Dalai Felinto
967b04cb07 Layer unittesting: pep8 touch up on test_evaluation_selectability_f.py 2017-04-06 12:22:21 +02:00
Dalai Felinto
a78e97b206 Layer/Depsgraph: Update depsgraph for new objects 2017-04-03 18:47:50 +02:00
Dalai Felinto
db6b4639fc Layer: Adding unittest for a problem with selectability evaluation
This is currently failing (and causing the object_delete test to fail). To be fixed separately
2017-04-03 17:46:03 +02:00
Dalai Felinto
97b9afda37 Layers / Depsgraph: Unittesting for selection and visibility evaluation 2017-04-01 01:22:39 +02:00
Dalai Felinto
b0998df608 Layers: Fix scene copying after IDProperty changes
(also unittest: split scene copy in 4 tests)
2017-03-31 17:37:52 +02:00
Dalai Felinto
d9b89ca0d0 Layers unittest: Fix tests breaking since Folded was removed 2017-03-31 17:37:49 +02:00
Dalai Felinto
1f17b72efe Layers unittest: Breaking pep8, but getting tests to work again
I will investigate this further later.

The big problem is that the way I'm running tests if I have any error
(e.g., ImportError) the pass still pass.
2017-03-31 17:37:45 +02:00
Campbell Barton
2be098a1a0 Merge branch 'master' into blender2.8 2017-03-29 20:20:53 +11: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
Campbell Barton
0c93bc2b63 Merge branch 'master' into blender2.8 2017-03-25 13:39:47 +11:00
Campbell Barton
bc0b5d611c Cleanup: minor edits to path test
No need for redundant ID's and correct arg order
2017-03-24 17:48:22 +11:00
Campbell Barton
50f9fc7a53 BLI_path_util: Add BLI_path_join
There weren't any convenient ways to join multiple paths in C
that accounted for corner cases.
2017-03-24 17:40:35 +11:00
Dalai Felinto
505cc694b3 Layer Unittesting: pep8 2/2
Mass replacing the common code of all tests

```
echo "Fixing $1"

ed "$1" <<'EOF'
1,/Testing/d
i

from render_layer_common import *
import unittest
import os
import sys

sys.path.append(os.path.dirname(__file__))

.
w
q
EOF
```

Using line-width of 120
2017-03-22 15:27:47 +01:00
Dalai Felinto
6883a983e6 Layer Unittesting: pep8 1/2
Manual corrections, using line-width of 120
2017-03-22 15:27:20 +01:00