Commit Graph

457 Commits

Author SHA1 Message Date
74fd17e9d7 UI/Python: rename Lamps to Lights, to follow more standard terminology.
Internally it's still mostly named lamps, though some modules like Cycles
were already calling them lights.
2018-07-06 20:06:09 +02:00
Campbell Barton
646f8bdb48 Cleanup: pep8 2018-07-03 07:12:24 +02:00
Campbell Barton
00fc1d70a7 Merge branch 'master' into blender2.8 2018-07-03 06:58:34 +02:00
Campbell Barton
8c15d612a5 Cleanup: pep8 2018-07-03 06:55:02 +02:00
Campbell Barton
9bd0c63382 Merge branch 'master' into blender2.8 2018-06-29 08:05:38 +02:00
Campbell Barton
af36dd4664 Cleanup: trailing newlines 2018-06-29 08:02:49 +02:00
Sybren A. Stüvel
1b5e3e1c01 Use evaluated objects in Alembic unit tests
This at least makes sure the tests don't fail any more. Possibly there
should be more evaluation happening there.
2018-06-12 15:39:54 +02:00
Jeroen Bakker
b6b1e0f56c T55454: removal of clay engine
The ClayEngine was introduced to test the blender2.8 architecture during
development. As currently we have the wanted features implemented with
matcaps we are going to remove the clay engine as it was never intended
to be an official releasable engine

Note: The test cases are never run. But when enabled will be skipped as
they were implemented over the Clay Engine
2018-06-12 15:32:31 +02:00
Sybren A. Stüvel
1d8279fd8d Alembic: made bl_alembic_import_test.py run again
Two tests are still failing, but at least the API changes in 2.8 have been
applied now.
2018-06-12 15:10:15 +02:00
Sybren A. Stüvel
e36ecb8a66 Alembic unit tests: fixed compiler errors
This doesn't mean the code is correct, but at least it builds.
2018-06-08 14:48:50 +02:00
Campbell Barton
da53c3f020 Merge branch 'master' into blender2.8 2018-06-04 18:50:14 +02:00
Campbell Barton
f6740993f7 Cleanup: strip tests trailing space 2018-06-04 18:47:31 +02:00
Campbell Barton
9a74b60367 Merge branch 'master' into blender2.8 2018-05-27 11:06:29 +02:00
Campbell Barton
0d559a6730 RNA: follow boolean naming conventions 2018-05-26 11:54:25 +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
ffaf55be94 Cycles/Eevee tests: add compare.html to see difference between the engines. 2018-05-18 18:08:01 +02:00
6a782ed767 Eevee: add regression tests.
This adds Eevee render tests using the Cycles files. Currently it must
be enabled by setting WITH_OPENGL_RENDER_TESTS=ON. Once we have reference
images we can enable it by default.

Some of the Cycles and Eevee tests are also currently broken due to
modifier and particle changes.

Differential Revision: https://developer.blender.org/D3182
2018-05-18 17:11:24 +02:00
00071d78bc Merge branch 'master' into blender2.8 2018-05-18 17:11:19 +02:00
d712dd2f19 Cycles tests: move to render/ folder, to share with Eevee. 2018-05-18 16:46:48 +02:00
17bd5c9d4b Collections and groups unification
OVERVIEW

* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
  which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
  and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
  for each. For many workflows one view layer can be used, these are more of an
  advanced feature now.

OUTLINER

* The outliner now has a "View Layer" display mode instead of "Collections",
  which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
  These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
  can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
  text gives different results, we'll unify this later.

LINKING AND OVERRIDES

* Collections can now be linked into the scene without creating an instance,
  with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
  but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
  into collections with overrides directly in the scene.

PERFORMANCE

* We tried to make performance not worse than before and improve it in some
  cases. The main thing that's still a bit slower is multiple scenes, we have to
  change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
  updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
  lookups internally and in API functions like visible_get().

VERSIONING

* Compatibility with 2.7 files should be improved due to the new visibility
  controls. Of course users may not want to set up their scenes differently
  now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
  files. There's a few things which are know to be not quite compatible, like
  nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
  #ifdef so it can be removed at the end of the release cycle.

KNOWN ISSUES

* The G-key group operators in the 3D viewport were left mostly as is, they
  need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
  still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
  be done later, we'll have to see how important this is as all objects within
  the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.

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

https://code.blender.org/2018/05/collections-and-groups/
2018-05-18 13:34:24 +02:00
Dalai Felinto
d8dca3c3b0 Layer unittest: Disable the override tests
They are failing for some time now, and they will be obsolete soon anyways.
2018-05-16 23:13:28 +02:00
Campbell Barton
d09920687c Merge branch 'master' into blender2.8 2018-05-02 12:46:14 +02:00
422a325acf Fix build of Alembic test. 2018-04-30 10:04:29 +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
e017876f78 3D View: add initial view.shading and view.overlay in RNA.
These are mostly empty still, many properties need to be renamed and moved there.
2018-04-29 09:55:47 +02:00
67b014af48 Workspaces: active view layer now always comes from workspace, not scene.
Both the scene and workspace had an active view layer, and it was confusing
which settings were being used or displayed where. Now we always have one,
so there is no mismatch.

The "View Layers" tab in the properties editor is now "View Layer", no longer
showing a list of layers. Instead view layers can be added and removed with
the workspace view layer selector. They are also listed and selectable in the
outliner.

Single layer rendering uses the active view layer from the workspace.

This fixes bugs where the wrong active view layer was used, but more places
remain that are wrong and are now using the first view layer in the scene.
These are all marked with BKE_view_layer_context_active_PLACEHOLDER.
2018-04-26 17:06:14 +02:00
11995c5a6e Fix reversed diff output order in view layer tests. 2018-04-26 16:37:59 +02:00
Dalai Felinto
422f939f95 Fix layer unittests after scene/workspace engine changes
Note: view_layer_background_set and view_layer_object_copy still fail.
But they were failing before.
2018-04-18 17:06:57 +02:00
Dalai Felinto
159806140f Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine

This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.

Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
  that we can wait until then to remove this.
2018-04-17 17:51:28 +02:00
34ab90f546 Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.

This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.

Differential Revision: https://developer.blender.org/D3152
2018-04-16 19:55:33 +02:00
dfd9e549ee Fix build errors after recent depsgraph changes. 2018-04-16 15:18:48 +02:00
Sergey Sharybin
8ad93dd009 Merge branch 'master' into blender2.8 2018-04-16 10:19:03 +02: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
6ef5b422fc Merge remote-tracking branch 'origin' into blender2.8 2018-04-16 09:59:52 +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
Dalai Felinto
e7c3c46e89 Fix make single user crash
How to reproduce the crash:
* Factory startup
* 'u'key (make single user)

It comes with a simple unittest to reproduce the original issue.
2018-03-14 08:13:27 -03:00
Campbell Barton
028580fd1e Merge branch 'master' into blender2.8 2018-03-13 18:39:51 +11:00
44aa86b0a5 Cycles: reorganize tests in more evenly distributed groups. 2018-03-12 17:29:44 +01:00
d27158aae9 Merge branch 'master' into blender2.8 2018-03-10 06:55:39 +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
c327cf489c Merge branch 'master' into blender2.8 2018-03-02 16:42:27 +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
Campbell Barton
4913e47aa0 Merge branch 'master' into blender2.8 2018-03-02 14:09:27 +11: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
0f6c08c8cf Merge branch 'master' into blender2.8 2018-02-27 21:06:29 +01:00
Gaia Clary
450be3b226 Collada: Added tests for Animation export 2018-02-27 20:41:34 +01:00
Gaia Clary
f228a08d02 merge from master 2018-02-26 22:49:30 +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
2b158861a3 merged collada rework from master into blender 2.8 2018-02-25 00:06:41 +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
Dalai Felinto
d7ba1ada82 Fix T54136: Crash when deleting an object that is in an instanced group
We were not cleaning up groups after deleting objects, leaving groups with
Bases that had no object.

It includes a unittest.

Reviewers: mont29
2018-02-22 17:16:39 -03:00
Campbell Barton
2bc952fdb6 Merge branch 'master' into blender2.8 2018-02-18 22:33:05 +11: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
f2453ecdcd Merge branch 'master' into blender2.8 2018-02-17 01:39:29 +01: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
Sergey Sharybin
df1c88b652 Merge branch 'master' into blender2.8 2018-02-15 14:15:55 +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
88bd994a37 Merge branch 'master' into blender2.8 2018-02-14 16:04:07 +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
Campbell Barton
b330804ff3 Merge branch 'master' into blender2.8 2018-02-14 01:06:41 +11:00
Howard Trickey
ce8b5bd90d Add boolean regression test. 2018-02-12 07:23:50 -05:00
Dalai Felinto
25074be697 Fix collection syncing when creating new collections from the outliner
We were not passing a scene collection parent to the BKE_collection_add
function, which in turn made syncing not work.

Right now we:
* Explicitly pass the master collection in this case
* Fallback to the master collection in other cases

With unittest.
2018-02-09 09:05:27 -02:00
Tamito Kajiyama
3b61d2bb68 Merge branch 'master' into blender2.8
Conflicts:
	intern/cycles/blender/addon/ui.py
2018-02-09 03:00:20 +09:00
8c8e53c12d Cycles tests: separate directory for sss tests. 2018-02-08 16:56:11 +01:00
Dalai Felinto
d8059a5f11 Make layers unittest pass after filter cleanup
Update your svn lib.

Unittests broken since 76289613910073.
2018-01-30 19:06:23 -02:00
Campbell Barton
88174bd22c Merge branch 'master' into blender2.8 2018-01-28 15:18:33 +11: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
Dalai Felinto
e969ac6413 Fix collections names no longer unique when moved around
We were not checking for uniqueness after moving. And in some cases the new
siblings of our collection may have conflicting names.
2018-01-19 18:44:11 -02:00
Campbell Barton
c850320b35 Merge branch 'master' into blender2.8 2018-01-19 17:21:15 +11:00
Campbell Barton
7a24e0d175 Cleanup: typos 2018-01-19 15:34:54 +11:00
27dff3fbc1 Merge branch 'master' into blender2.8 2018-01-18 01:01:17 +01: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
Dalai Felinto
1e9bc60777 Fix collection visibility evaluation
Collection       A [disabled]
 -> Collection   B
   -> Collection C
     -> object

Object should be invisible, but it is not. Reported by Antonio Vazquez.

Bug introduced on: 1f5106de610b
2018-01-15 20:19:12 -02:00
Campbell Barton
7fc1f42aae tests: limit public API in view_layer_common 2018-01-04 11:57:45 +11:00
Campbell Barton
ea55af2163 tests: replace boiler-plate with util function
This crept back in somehow!
2018-01-04 11:28:46 +11:00
Dalai Felinto
e1cbac715a Fix FOREACH_SCENE_COLLECTION/FOREACH_SCENE_OBJECT for nested collections
This fixes any function that relied on these iterators such as:
* Outliner Same Type
* Metaballs
* scene.objects

We were not considering the collections when there was collections nested
to the collections nested to the master collection.

It includes a unittest.
2018-01-03 19:33:00 -02:00
Dalai Felinto
07de8eff77 Layers/Collections: Fix crash when deleting collection
If the collection to be deleted has a nested collection that is directly linked
to a view layer, we were getting a crash.
2018-01-02 18:19:26 -02:00
Dalai Felinto
8300b5e539 Layers: Fix operator_context unittest
This was broken since 70cdc8412c478b when we changed the requirement for context
scene collection to be part of context view layer.
2018-01-02 17:42:23 -02:00
Dalai Felinto
f3566235ca Layers: Fix collection_rename unittest
This was broken since c9cb5dc3dab0af when we supported same name for
non-sibling collections.
2018-01-02 16:59:30 -02:00
Dalai Felinto
110373de6a Fix T53638: View layer renaming crashes 2/2
This fixes renaming the view layer via Python.

This bug was introduced originally in 3a95bdfc65d. Although I suspect it was
around for longer, since this commit didn't touch this part of the code.

But basically we need the id of the RNA property to be the one that owns
the data (view layer).
2017-12-27 13:39:28 -02:00
Sergey Sharybin
0ebf69287a Merge branch 'master' into blender2.8 2017-12-19 10:05:04 +01:00
Sergey Sharybin
a130c82f0a Cycles tests: Enable texture space tests 2017-12-19 09:54:23 +01:00
Dalai Felinto
1f5106de61 Group collection viewport/render options and remove collection visibility
Users can change the group collection visibility in the outliner
when looking at groups.

Regular collections on the other hand don't have any special visibility control,
if you need a collection to be invisible during render, either don't link it
into the view layer used for F12, or disable it.

This includes:
* Updated unittests - update your lib/tests/layers folder.
* Subversion bump - branches be aware of that.

Note:
Although we are using eval_ctx to determine the visibility of a group collection
when rendering, the depsgraph is still using the same depsgraph for the viewport
and the render engine, so at the moment the render visibility is ignored.

Following next is a workaround for this separately to tag the groups before and
after rendering to tackle that.
2017-12-15 08:56:48 -02:00
Dalai Felinto
aa0c9867b2 unittests: Update (fix) unittests after workspace API change
Tests were broken since e8c15e0ed15f8369d.

We now get view_layer from window, not workspace, since the same workspace can
have a different view_layer depending on the window scene.
2017-12-01 16:08:52 -02:00
Dalai Felinto
aeaf87bbeb Groups and collection: create group from collection
You could still create groups as before, with Ctl + G. This will create a group
with a single visible collection.

However you can also create a group from an existing collection. Just go to
the menu you get in the outliner when clicking in a collection and pick
"Create Group".

Remember to instance the group afterwards, or link it into a new scene or file.

The group and the collection are not kept in sync afterwards. You need to manually
edit the group for further changes.
2017-12-01 14:15:54 -02:00
Dalai Felinto
14c3ef8253 Fixing alembic unittest after render layer purge 2017-11-27 14:52:21 -02:00
Sergey Sharybin
f591060856 Backgroudn set tests: Correct evaluation order
All depsgraphs are sharing same object state for now, which means doing set
scene evaluation after main scene evaluation will override all modifications
done by the main scene.
2017-11-24 16:55:41 +01:00
Dalai Felinto
dc2ae8fdf2 Unittest: Update background set test to test for proper flag
This test will fail until depsgraph is fixed.
But introduced on 87c821ff26be.
2017-11-24 11:42:28 -02:00
Dalai Felinto
1971dd2976 Layers Unittest: Background set
This is an incomplete test since we cannot check for the
depsgraph selection value with the current API, nor can we
see if the relationship lines are being drawn.
2017-11-24 10:54:13 -02:00
Bastien Montagne
a786baa193 Merge branch 'master' into blender2.8 2017-11-23 21:36:27 +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
Dalai Felinto
3abe8b3292 Rename any instance of scene layer or render layer in code with view layer
The RenderResult struct still has a listbase of RenderLayer, but that's ok
since this is strictly for rendering.

* Subversion bump (to 2.80.2)
* DNA low level doversion (renames) - only for .blend created since 2.80 started

Note: We can't use DNA_struct_elem_find or get file version in init_structDNA,
so we are manually iterating over the array of the SDNA elements instead.

Note 2: This doversion change with renames can be reverted in a few months. But
so far it's required for 2.8 files created between October 2016 and now.

Reviewers: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D2927
2017-11-23 07:48:23 -02:00
Dalai Felinto
58a3057099 Layers Unittest: Hidden flag to quckly update diffs
This is not the commit you are looking for ...

This is not to be used lightly. But sometimes we change the name of the collections,
the initial value they have, ... and this helps to quickly update the tests.
2017-11-10 13:01:05 -02:00
Dalai Felinto
1122a401b0 Unittest: Layers - include is_disabled for LayerCollection
And remove is_folder since it is not being used.
2017-11-10 12:39:43 -02:00
Sergey Sharybin
d325e6f0e8 Depsgraph: Make dependency graph to be built from scene layer
This is a final step of having proper ownership. Now selecting different
layers in the "top bar" will actually do what this is expected to do.

Surely, there are still things to be done under the hood, that will happen
in a less intrusive way.
2017-11-09 11:20:17 +01:00
Sergey Sharybin
e72dfee66f Depsgraph: Use explicit depsgraph in alembic module 2017-11-03 12:02:39 +01:00
Sybren A. Stüvel
f7d59fbc46 Merge branch 'master' into blender2.8
# Conflicts:
#	tests/gtests/alembic/abc_export_test.cc
2017-11-02 14:37:10 +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