Commit Graph

231 Commits

Author SHA1 Message Date
Campbell Barton
bb3ec3ebaf BLI_utildefines: rename pointer conversion macros
Terms get/set don't make much sense when casting values.

Name macros so the conversion is obvious,
use common prefix for easier completion.

- GET_INT_FROM_POINTER  -> POINTER_AS_INT
- SET_INT_IN_POINTER    -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER   -> POINTER_FROM_UINT
2018-09-19 12:12:21 +10:00
Campbell Barton
8c15d612a5 Cleanup: pep8 2018-07-03 06:55:02 +02:00
Campbell Barton
af36dd4664 Cleanup: trailing newlines 2018-06-29 08:02:49 +02:00
Campbell Barton
f6740993f7 Cleanup: strip tests trailing space 2018-06-04 18:47:31 +02:00
Diego Gangl
4dee702332 Add number and memory size formatting throughout the UI
This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.

Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248
2018-05-25 22:41:49 +02:00
d712dd2f19 Cycles tests: move to render/ folder, to share with Eevee. 2018-05-18 16:46:48 +02:00
Aaron Carlisle
128506eeb1 BLI Color: YUV to/from rgb colorspace option
This commit does two things:

- Adds an option to do the calculation in different color spaces (BT601
or BT709).
- Changes the default caluclation from legacy BT601 to BT709.

This affects several areas:

- UI areas (mainly scopes)
- ViewLevelsNode
- Several other nodes that use `COM_ConvertOperation.h`
2018-04-29 18:00:45 -04:00
Sergey Sharybin
5bfe6126f8 Added lock-free single linked list implementation
Only supports lock-free insertion for now, can not delete element
or traverse the list at the same time.
2018-04-16 10:18:43 +02:00
Gaia Clary
2720667566 Disable Feature Collada: Tests do not work on unix
The tests as they are now make string comparisons. This only works
on Windows because the reference files look different for different
operating systems because of different number formatting.
The collada tests need a complete rework (wip)
2018-04-16 09:56:59 +02:00
44aa86b0a5 Cycles: reorganize tests in more evenly distributed groups. 2018-03-12 17:29:44 +01:00
Sergey Sharybin
40e62f271c FFmpeg: Add regression tests
Currently only covering handful of files from reports about wrong fps detected.

It will need D3083 applied first to get tests passed, also tests themselves
are to be committed to svn.

But there are some python code which needs to be reviewed, like blendfile
passed to run_blender().

Reviewers: sybren, mont29

Reviewed By: sybren, mont29

Subscribers: mont29

Differential Revision: https://developer.blender.org/D3096
2018-03-09 10:33:20 +01:00
Sergey Sharybin
b5b34bc2c0 Tests: Avoid access globals from abstract base class
Delegate functionality to subclasses, assert when subclasses didn't do
job the are supposed to do.

Thanks Sybren for pointing to a proper solution.
2018-03-02 11:18:12 +01:00
Sergey Sharybin
3a3dfd4e65 Python tests: Split re-usable test related functionality to a module
The idea is to avoid re-implementing this for an upcoming FFmpeg tests.
2018-03-01 17:44:35 +01:00
Gaia Clary
450be3b226 Collada: Added tests for Animation export 2018-02-27 20:41:34 +01:00
Gaia Clary
8e826caf5e optimized the output of the collada test script for better reading 2018-02-26 12:09:48 +01:00
Gaia Clary
dd7b9a362d T45687: Rework the Export/Import of Animations
This started with a fix for an animated Object Hierarchy. Then i decided to cleanup and optimize a bit. But at the end this has become a more or less full rewrite of the Animation Exporter. All of this happened in a separate local branch and i have retained all my local commits to better see what i have done.

Brief description:

* I fixed a few issues with exporting keyframed animations of object hierarchies where the objects have parent inverse matrices which differ from the Identity matrix.
* I added the option to export sampled animations with a user defined sampling rate (new user interface option)
* I briefly tested Object Animations and Rig Animations.

What is still needed:

* Cleanup the code
* Optimize the user interface
* Do the Documentation

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D3070
2018-02-24 15:55:27 +01:00
Campbell Barton
deacb3d6b8 Cleanup: add 2d suffix to BLI files
Some of these API's can have 3D versions, explicitly name them 2D.
2018-02-18 21:27:33 +11:00
233a886ceb Code cleanup: deduplicate code for running Python scripts outside Blender. 2018-02-16 12:51:49 +01:00
3d2d58391a Tests: add OpenGL UI drawing tests.
This reuses the Cycles regression test code to also work for OpenGL UI drawing.
We launch Blender with a bunch of .blend files, take a screenshot and compare
it with a reference screenshot, and generate a HMTL report showing the failed
tests and their differences.

For Cycles we keep small reference renders to compare to in svn, but for OpenGL
developers currently have to generate the references manually. How to use:

* WITH_OPENGL_DRAW_TESTS=ON in CMake
* BLENDER_TEST_UPDATE=1 ctest -R opengl_draw
* .. make code changes ..
* ctest -R opengl_draw
* open build_dir/tests/opengl_draw/report.html

Differential Revision: https://developer.blender.org/D3064
2018-02-16 12:51:49 +01:00
0f23f618f3 Tests: split off render report test code from Cycles tests.
This renames test environment variables from CYCLESTEST_* to BLENDER_TEST_*.

Differential Revision: https://developer.blender.org/D3064
2018-02-16 12:51:49 +01:00
Campbell Barton
ccdacf1c9b Cleanup: use '_len' instead of '_size' w/ BLI API
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
  (hint this isn't a simple getter).

See P611 to apply instead of manually resolving conflicts.
2018-02-15 23:39:08 +11:00
Campbell Barton
b48815a9b7 Cleanup: use prefix for tests
Allows for running all `bmesh_*` or `object_*` tests.
2018-02-14 16:02:21 +11:00
Howard Trickey
ce8b5bd90d Add boolean regression test. 2018-02-12 07:23:50 -05:00
8c8e53c12d Cycles tests: separate directory for sss tests. 2018-02-08 16:56:11 +01:00
Campbell Barton
7980265e7e Tests: replace os.system w/ subprocess.call
Saves on process creation and avoids
being tripped up by command line parsing.

Based on D2967 by @ldo with edits.
2018-01-26 12:23:15 +11:00
Campbell Barton
7a24e0d175 Cleanup: typos 2018-01-19 15:34:54 +11:00
a6700362c7 Memory: add MEM_malloc_arrayN() function to protect against overflow.
Differential Revision: https://developer.blender.org/D3002
2018-01-17 19:59:47 +01:00
Sergey Sharybin
a130c82f0a Cycles tests: Enable texture space tests 2017-12-19 09:54:23 +01:00
Bastien Montagne
efb86b712d Add a new parallel looper for MemPool items to BLI_task.
It merely uses the new thread-safe iterators system of mempool, quite
straight forward.

Note that to avoid possible confusion with two void pointers as
parameters of the callback, a dummy opaque struct pointer is used
instead for the second parameter (pointer generated by iteration over
mempool), callback functions must explicitely convert it to expected
real type.

Also added a basic gtest for this new feature.
2017-11-23 21:14:43 +01:00
Sybren A. Stüvel
8a3728800c Alembic: not using global in unit test.
Thanks @sergey for pointing out this fix.
2017-11-02 14:33:21 +01:00
Sybren A. Stüvel
89eb05a890 Alembic: exporting MetaBalls as mesh
- Only basis balls are exported, as they represent the resulting mesh.
  As a result the mesh is written to Alembic using the name of the basis
  ball.
- MetaBalls are converted to a mesh on every frame, then an
  AbcMeshWriter is used to write that mesh to Alembic.
2017-10-29 15:21:36 +01:00
Campbell Barton
512b879241 BLI_heap: add validation check, improve tests
Also minor readability changes, avoid running both heap_up/down
gives minor speedup too.
2017-10-29 18:23:33 +11:00
Campbell Barton
3425732926 BLI_heap: minor changes to the API
Recent addition of 'reinsert' didn't match logic for ghash API.

Rename to BLI_heap_node_value_update,
also add BLI_heap_insert_or_update since it's a common operation.
2017-10-29 15:47:06 +11:00
Campbell Barton
4af1af70ad BLI_hash: add BLI_heap_reinsert
Allows avoiding remove/insert calls.
2017-10-29 04:42:58 +11:00
Campbell Barton
b84e3dc7f3 GTest: initial BLI_heap test 2017-10-29 00:56:56 +11:00
Sybren A. Stüvel
03a582ceeb Using gtest fixtures in Alembic export tests 2017-10-26 12:43:59 +02:00
Campbell Barton
af067f2305 Correct gtest error in recent beautify change 2017-10-23 14:20:35 +11:00
Campbell Barton
6dfe4cbc6b Polyfill Beautify: half-edge optimization
Was using an edge hash for triangle -> edge lookups,
updating triangle indices for each edge-rotation.

Replace this with half-edge which can rotate edges much more simply,
writing triangles back once the solution has been calculated.

Gives ~33% speedup in own tests.
2017-10-23 01:40:03 +11:00
Sybren A. Stüvel
b53918be39 Added alpha channel check to Alembic unit test
It was broken due to 823bcf1689a3dbd44dd77b2c8ea46b9b54073c46, which added
alpha information and thus changed tuple size from 3 to 4 items.
2017-10-17 10:59:02 +02:00
Sergey Sharybin
d83bcf7071 Cycles tests: Don't proint braces for empty status 2017-10-11 12:36:18 +05:00
8289b47e3a Fix Cycles test report not closing files properly. 2017-09-20 19:12:26 +02:00
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
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
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
Sergey Sharybin
4f1b510d75 Cycles: Add tangent attribute tests 2017-08-30 17:42:00 +02:00
Campbell Barton
b1f2b69884 Missing from last commit 2017-08-27 15:24:41 +10:00