2022-02-10 22:07:11 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
# Use '--write-blend=/tmp/test.blend' to view output
|
|
|
|
|
2014-03-26 20:30:22 +00:00
|
|
|
# Some tests are interesting but take too long to run
|
|
|
|
# and don't give deterministic results
|
|
|
|
set(USE_EXPERIMENTAL_TESTS FALSE)
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/../lib/tests)
|
2020-01-13 12:11:45 +00:00
|
|
|
set(TEST_PYTHON_DIR ${CMAKE_SOURCE_DIR}/tests/python)
|
2011-01-21 00:06:30 +00:00
|
|
|
set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
|
|
|
|
|
2011-03-16 12:06:12 +00:00
|
|
|
# ugh, any better way to do this on testing only?
|
2019-06-25 17:52:37 +00:00
|
|
|
file(MAKE_DIRECTORY ${TEST_OUT_DIR})
|
|
|
|
file(MAKE_DIRECTORY ${TEST_OUT_DIR}/io_tests)
|
2020-02-14 10:02:22 +00:00
|
|
|
file(MAKE_DIRECTORY ${TEST_OUT_DIR}/blendfile_io)
|
2011-03-16 12:06:12 +00:00
|
|
|
|
2019-10-28 14:32:33 +00:00
|
|
|
# if(NOT IS_DIRECTORY ${TEST_SRC_DIR})
|
|
|
|
# message(FATAL_ERROR "CMake test directory not found!")
|
|
|
|
# endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
# Run Blender command with parameters.
|
2019-08-02 13:19:59 +00:00
|
|
|
function(add_blender_test testname)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_test(
|
2019-08-02 13:19:59 +00:00
|
|
|
NAME ${testname}
|
2019-09-07 12:03:39 +00:00
|
|
|
COMMAND "${TEST_BLENDER_EXE}" ${TEST_BLENDER_EXE_PARAMS} ${ARGN}
|
2019-08-02 12:25:40 +00:00
|
|
|
)
|
2019-08-02 12:29:53 +00:00
|
|
|
|
|
|
|
# Don't fail tests on leaks since these often happen in external libraries
|
|
|
|
# that we can't fix.
|
2020-10-14 07:02:35 +00:00
|
|
|
set_tests_properties(${testname} PROPERTIES ENVIRONMENT
|
|
|
|
LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}
|
|
|
|
)
|
2019-08-02 12:25:40 +00:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
# Run Python script outside Blender.
|
|
|
|
function(add_python_test testname testscript)
|
Tests: use explicit Python to run unit tests
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.
This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:
- On Windows, the `python….exe` from the installation directory. This is
just like before this patch, except that this patch adds the
overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.
Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.
If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.
Differential Revision: https://developer.blender.org/D7395
Reviewed by: campbellbarton, mont29, sergey
2020-04-10 08:35:17 +00:00
|
|
|
if(NOT TEST_PYTHON_EXE)
|
|
|
|
message(FATAL_ERROR "No Python configured for running tests, set TEST_PYTHON_EXE.")
|
2019-08-02 12:25:40 +00:00
|
|
|
endif()
|
2019-08-02 13:19:59 +00:00
|
|
|
|
Tests: use explicit Python to run unit tests
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.
This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:
- On Windows, the `python….exe` from the installation directory. This is
just like before this patch, except that this patch adds the
overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.
Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.
If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.
Differential Revision: https://developer.blender.org/D7395
Reviewed by: campbellbarton, mont29, sergey
2020-04-10 08:35:17 +00:00
|
|
|
add_test(
|
|
|
|
NAME ${testname}
|
2022-11-03 00:48:47 +00:00
|
|
|
COMMAND ${TEST_PYTHON_EXE} ${TEST_PYTHON_EXE_EXTRA_ARGS} ${testscript} ${ARGN}
|
Tests: use explicit Python to run unit tests
CentOS on the buildbot still runs Python 3.6, which is also used for the
unit tests. This means that the tests can't use language features that
are available to Blender itself. And testing with a different version of
Python than will be used by the actual code seems like a bad idea to me.
This commit adds `TEST_PYTHON_EXECUTABLE` as advanced CMake option. This
will allow us to set a specific Python executable when we need it. When
not set, a platform-specific default will be used:
- On Windows, the `python….exe` from the installation directory. This is
just like before this patch, except that this patch adds the
overridability.
- On macOS/Linux, the `${PYTHON_EXECUTABLE}` as found by CMake.
Every platform should now have a value (configured by the user or
detected by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow
running without. This also removes the need to have some Python files
marked as executable.
If `TEST_PYTHON_EXE` is not user-configured, and thus the above default
is used, a status message is logged by CMake. I've seen this a lot in
other projects, and I like that it shows which values are auto-detected.
However, it's not common in Blender, so if we want we can either remove
it now, or remove it after the buildbot has been set up correctly.
Differential Revision: https://developer.blender.org/D7395
Reviewed by: campbellbarton, mont29, sergey
2020-04-10 08:35:17 +00:00
|
|
|
)
|
2020-10-14 07:02:35 +00:00
|
|
|
set_tests_properties(${testname} PROPERTIES ENVIRONMENT
|
|
|
|
LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}
|
|
|
|
)
|
2019-08-02 12:25:40 +00:00
|
|
|
endfunction()
|
2011-03-18 23:58:13 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# GENERAL PYTHON CORRECTNESS TESTS
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_load_keymap
|
2013-02-26 04:48:16 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_keymap_completeness.py
|
|
|
|
)
|
|
|
|
|
2021-03-14 08:06:48 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_validate_keymap
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_keymap_validate.py
|
|
|
|
-- --relaxed # Disable minor things that should not cause tests to break.
|
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_load_addons
|
2011-03-18 23:58:13 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_load_addons.py
|
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_load_modules
|
2011-03-18 23:58:13 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_load_py_modules.py
|
|
|
|
)
|
|
|
|
|
2020-02-11 09:15:31 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_bundled_modules
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_bundled_modules.py
|
|
|
|
)
|
|
|
|
|
2011-03-22 14:09:07 +00:00
|
|
|
# test running operators doesn't segfault under various conditions
|
2014-03-26 20:30:22 +00:00
|
|
|
if(USE_EXPERIMENTAL_TESTS)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_run_operators
|
2014-03-26 20:30:22 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_run_operators.py
|
|
|
|
)
|
|
|
|
endif()
|
2011-03-22 14:09:07 +00:00
|
|
|
|
2015-09-24 10:49:44 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# PY API TESTS
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_bpy_path
|
2015-09-24 10:49:44 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_path.py
|
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_bpy_utils_units
|
2015-09-24 10:49:44 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_utils_units.py
|
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_mathutils
|
2011-12-20 01:49:24 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_mathutils.py
|
|
|
|
)
|
|
|
|
|
2022-07-12 06:05:15 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_bpy_driver_secure_eval
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_bpy_driver_secure_eval.py
|
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_idprop
|
2017-03-18 16:37:22 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_idprop.py
|
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_idprop_datablock
|
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 09:30:03 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_idprop_datablock.py
|
|
|
|
)
|
|
|
|
|
Python: add foreach_get and foreach_set methods to pyrna_prop_array
This allows fast access to various arrays in the Python API.
Most notably, `image.pixels` can be accessed much more efficiently now.
**Benchmark**
Below are the results of a benchmark that compares different ways to
set/get all pixel values. I do the tests on 2048x2048 rgba images.
The benchmark tests the following dimensions:
- Byte vs. float per color channel
- Python list vs. numpy array containing floats
- `foreach_set` (new) vs. `image.pixels = ...` (old)
```
Pixel amount: 2048 * 2048 = 4.194.304
Byte buffer size: 16.8 mb
Float buffer size: 67.1 mb
Set pixel colors:
byte - new - list: 271 ms
byte - new - buffer: 29 ms
byte - old - list: 350 ms
byte - old - buffer: 2900 ms
float - new - list: 249 ms
float - new - buffer: 8 ms
float - old - list: 330 ms
float - old - buffer: 2880 ms
Get pixel colors:
byte - list: 128 ms
byte - buffer: 9 ms
float - list: 125 ms
float - buffer: 8 ms
```
**Observations**
The best set and get speed can be achieved with buffers and a float image,
at the cost of higher memory consumption. Furthermore, using buffers when
using `pixels = ...` is incredibly slow, because it is not optimized.
Optimizing this is possible, but might not be trivial (there were multiple
attempts afaik).
Float images are faster due to overhead introduced by the api for byte images.
If I profiled it correctly, a lot of time is spend in the `[0, 1] -> {0, ..., 255}`
conversion. The functions doing that conversion is `unit_float_to_uchar_clamp`.
While I have an idea on how it can be optimized, I do not know if it can be done
without changing its functionality slightly. Performance wise the best solution
would be to not do this conversion at all and accept byte input from the api
user directly, but that seems to be a more involved task as well.
Differential Revision: https://developer.blender.org/D7053
Reviewers: JacquesLucke, mont29
2020-03-13 11:57:12 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_prop_array
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_prop_array.py
|
|
|
|
)
|
|
|
|
|
2022-04-07 04:32:21 +00:00
|
|
|
add_blender_test(
|
|
|
|
script_pyapi_text
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_pyapi_text.py
|
|
|
|
)
|
|
|
|
|
2019-12-18 15:09:47 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# DATA MANAGEMENT TESTS
|
|
|
|
|
|
|
|
add_blender_test(
|
|
|
|
id_management
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_id_management.py
|
|
|
|
)
|
|
|
|
|
2014-02-02 18:29:08 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
2020-02-13 16:48:00 +00:00
|
|
|
# BLEND IO & LINKING
|
|
|
|
|
|
|
|
add_blender_test(
|
|
|
|
blendfile_io
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_blendfile_io.py --
|
|
|
|
--output-dir ${TEST_OUT_DIR}/blendfile_io/
|
|
|
|
)
|
|
|
|
|
|
|
|
add_blender_test(
|
|
|
|
blendfile_liblink
|
2020-02-18 08:52:29 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_blendfile_liblink.py --
|
|
|
|
--output-dir ${TEST_OUT_DIR}/blendfile_io/
|
2020-02-13 16:48:00 +00:00
|
|
|
)
|
|
|
|
|
2021-03-22 10:33:48 +00:00
|
|
|
add_blender_test(
|
|
|
|
blendfile_library_overrides
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_blendfile_library_overrides.py --
|
|
|
|
--output-dir ${TEST_OUT_DIR}/blendfile_io/
|
|
|
|
)
|
|
|
|
|
2020-02-13 16:48:00 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
2014-02-02 18:29:08 +00:00
|
|
|
# MODELING TESTS
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
bmesh_bevel
|
2014-02-02 18:29:08 +00:00
|
|
|
${TEST_SRC_DIR}/modeling/bevel_regression.blend
|
2020-01-13 12:11:45 +00:00
|
|
|
--python ${TEST_PYTHON_DIR}/bevel_operator.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
2014-02-02 18:29:08 +00:00
|
|
|
)
|
|
|
|
|
2020-08-30 12:31:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
bmesh_boolean
|
|
|
|
${TEST_SRC_DIR}/modeling/bool_regression.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/boolean_operator.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
2018-02-12 12:23:23 +00:00
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
bmesh_split_faces
|
2017-06-08 20:45:21 +00:00
|
|
|
${TEST_SRC_DIR}/modeling/split_faces_test.blend
|
|
|
|
--python-text run_tests
|
2017-02-16 14:36:00 +00:00
|
|
|
)
|
|
|
|
|
2020-12-30 19:12:29 +00:00
|
|
|
add_blender_test(
|
|
|
|
curve_to_mesh
|
|
|
|
${TEST_SRC_DIR}/modeling/curve_to_mesh.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/curve_to_mesh.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
|
|
|
|
2017-05-26 19:57:45 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# MODIFIERS TESTS
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
object_modifier_array
|
2017-06-08 20:45:21 +00:00
|
|
|
${TEST_SRC_DIR}/modifier_stack/array_test.blend
|
2019-07-31 16:29:58 +00:00
|
|
|
--python-text run_tests.py
|
2017-05-26 19:57:45 +00:00
|
|
|
)
|
|
|
|
|
2020-08-30 12:31:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
modifiers
|
|
|
|
${TEST_SRC_DIR}/modeling/modifiers.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/modifiers.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
2020-01-13 12:11:45 +00:00
|
|
|
|
2020-04-27 14:47:07 +00:00
|
|
|
add_blender_test(
|
|
|
|
physics_cloth
|
|
|
|
${TEST_SRC_DIR}/physics/cloth_test.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/physics_cloth.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
|
|
|
|
|
|
|
add_blender_test(
|
|
|
|
physics_softbody
|
|
|
|
${TEST_SRC_DIR}/physics/softbody_test.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/physics_softbody.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
|
|
|
|
2020-12-17 15:14:55 +00:00
|
|
|
add_blender_test(
|
|
|
|
physics_dynamic_paint
|
|
|
|
${TEST_SRC_DIR}/physics/dynamic_paint_test.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/physics_dynamic_paint.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
|
|
|
|
|
|
|
add_blender_test(
|
|
|
|
deform_modifiers
|
|
|
|
${TEST_SRC_DIR}/modeling/deform_modifiers.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/deform_modifiers.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
|
|
|
|
2021-05-18 12:02:41 +00:00
|
|
|
if(WITH_MOD_OCEANSIM)
|
|
|
|
add_blender_test(
|
|
|
|
physics_ocean
|
|
|
|
${TEST_SRC_DIR}/physics/ocean_test.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/physics_ocean.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
2021-01-12 12:49:40 +00:00
|
|
|
endif()
|
2020-12-17 15:14:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
add_blender_test(
|
|
|
|
physics_particle_system
|
|
|
|
${TEST_SRC_DIR}/physics/physics_particle_test.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/physics_particle_system.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
|
|
|
|
2021-01-05 10:46:08 +00:00
|
|
|
add_blender_test(
|
|
|
|
physics_particle_instance
|
|
|
|
${TEST_SRC_DIR}/physics/physics_particle_instance.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/physics_particle_instance.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
2020-12-17 15:14:55 +00:00
|
|
|
|
2020-02-25 11:16:34 +00:00
|
|
|
add_blender_test(
|
|
|
|
constraints
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_constraints.py
|
|
|
|
--
|
|
|
|
--testdir "${TEST_SRC_DIR}/constraints"
|
|
|
|
)
|
|
|
|
|
2020-01-13 12:11:45 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# OPERATORS TESTS
|
|
|
|
add_blender_test(
|
|
|
|
operators
|
|
|
|
${TEST_SRC_DIR}/modeling/operators.blend
|
|
|
|
--python ${TEST_PYTHON_DIR}/operators.py
|
|
|
|
--
|
|
|
|
--run-all-tests
|
|
|
|
)
|
|
|
|
|
2020-09-15 08:41:08 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# ANIMATION TESTS
|
|
|
|
add_blender_test(
|
|
|
|
bl_animation_fcurves
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_animation_fcurves.py
|
|
|
|
--
|
|
|
|
--testdir "${TEST_SRC_DIR}/animation"
|
|
|
|
)
|
|
|
|
|
2022-02-04 13:19:44 +00:00
|
|
|
add_blender_test(
|
|
|
|
bl_rigging_symmetrize
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_rigging_symmetrize.py
|
|
|
|
--
|
|
|
|
--testdir "${TEST_SRC_DIR}/animation"
|
|
|
|
)
|
|
|
|
|
2011-03-18 23:58:13 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# IO TESTS
|
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# OBJ Import tests
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_obj_cube
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/cube.obj'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=39cce4bacac2d1b18fc470380279bc15 --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_obj_cube.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_obj_nurbs_cyclic
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/nurbs_cyclic.obj'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=ad3c307e5883224a0492378cd32691ab --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_obj_nurbs_cyclic.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_obj_makehuman
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.obj\(filepath='${TEST_SRC_DIR}/io_tests/obj/makehuman.obj'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=c9f78b185e58358daa4ecaecfa75464e --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_obj_makehuman.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
# OBJ Export tests
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_obj_cube
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/io_tests/export_obj_cube.obj',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_cube.obj
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_cube.mtl
|
2022-11-18 22:05:06 +00:00
|
|
|
--md5=e80660437ad9bfe082849641c361a233 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_obj_nurbs
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/io_tests/export_obj_nurbs.obj',use_selection=False,use_nurbs=True\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_nurbs.obj
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_nurbs.mtl
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=a733ae4fa4a591ea9b0912da3af042de --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2022-02-11 00:21:32 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_obj_all_objects
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.obj\(filepath='${TEST_OUT_DIR}/io_tests/export_obj_all_objects.obj',use_selection=False,use_nurbs=True\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_all_objects.obj
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_obj_all_objects.mtl
|
2011-08-08 03:31:25 +00:00
|
|
|
--md5=04b3ed97cede07a19548fc518ce9f8ca --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
# PLY Import tests
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_ply_cube
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/cube_ascii.ply'\)
|
|
|
|
--md5=527134343c27fc0ea73115b85fbfd3ac --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_ply_cube.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_ply_bunny
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/bunny2.ply'\)
|
|
|
|
--md5=6ea5b8533400a17accf928b8fd024eaa --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_ply_bunny.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_ply_small_holes
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.ply\(filepath='${TEST_SRC_DIR}/io_tests/ply/many_small_holes.ply'\)
|
|
|
|
--md5=c3093e26ecae5b6d59fbbcf2a0d0b39f --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_ply_small_holes.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2011-10-10 00:29:23 +00:00
|
|
|
# PLY Export
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_ply_cube_all_data
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/cube_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/io_tests/export_ply_cube_all_data.ply'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_ply_cube_all_data.ply
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=6adc3748ceae8298496f99d0e7e76c15 --md5_method=FILE
|
|
|
|
)
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_ply_suzanne_all_data
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/suzanne_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/io_tests/export_ply_suzanne_all_data.ply'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_ply_suzanne_all_data.ply
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=68ba23f02efd6511bfd093f45f703221 --md5_method=FILE
|
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-10-10 00:29:23 +00:00
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_ply_vertices # lame, add a better one
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/vertices.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.ply\(filepath='${TEST_OUT_DIR}/io_tests/export_ply_vertices.ply'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_ply_vertices.ply
|
2020-07-29 15:59:09 +00:00
|
|
|
--md5=ee6ce2e69c1d9a7418ff0548f6338f70 --md5_method=FILE
|
2011-10-10 00:29:23 +00:00
|
|
|
)
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
# STL Import tests
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_stl_cube
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/cube.stl'\)
|
|
|
|
--md5=8ceb5bb7e1cb5f4342fa1669988c66b4 --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_stl_cube.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_stl_conrod
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/conrod.stl'\)
|
|
|
|
--md5=690a4b8eb9002dcd8631c5a575ea7348 --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_stl_conrod.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_stl_knot_max_simplified
|
2011-01-21 10:49:39 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_mesh.stl\(filepath='${TEST_SRC_DIR}/io_tests/stl/knot_max_simplified.stl'\)
|
|
|
|
--md5=baf82803f45a84ec4ddbad9cef57dd3e --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_stl_knot_max_simplified.blend
|
2011-01-21 10:49:39 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2011-10-10 00:29:23 +00:00
|
|
|
# STL Export
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_stl_cube_all_data
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/cube_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/io_tests/export_stl_cube_all_data.stl'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_stl_cube_all_data.stl
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=64cb97c0cabb015e1c3f76369835075a --md5_method=FILE
|
|
|
|
)
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_stl_suzanne_all_data
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/suzanne_all_data.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/io_tests/export_stl_suzanne_all_data.stl'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_stl_suzanne_all_data.stl
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=e9b23c97c139ad64961c635105bb9192 --md5_method=FILE
|
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_stl_vertices # lame, add a better one
|
2011-10-10 00:29:23 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/vertices.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_mesh.stl\(filepath='${TEST_OUT_DIR}/io_tests/export_stl_vertices.stl'\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_stl_vertices.stl
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=3fd3c877e573beeebc782532cc005820 --md5_method=FILE
|
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# X3D Import
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_x3d_cube
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/color_cube.x3d'\)
|
2011-07-01 13:39:35 +00:00
|
|
|
--md5=3fae9be004199c145941cd3f9f80ad7b --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_x3d_cube.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_x3d_teapot
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/teapot.x3d'\)
|
2011-07-01 13:39:35 +00:00
|
|
|
--md5=8ee196c71947dce4199d55698501691e --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_x3d_teapot.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_x3d_suzanne_material
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.x3d\(filepath='${TEST_SRC_DIR}/io_tests/x3d/suzanne_material.x3d'\)
|
2011-07-01 13:39:35 +00:00
|
|
|
--md5=3edea1353257d8b5a5f071942f417be6 --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_x3d_suzanne_material.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# X3D Export
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_x3d_cube
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/io_tests/export_x3d_cube.x3d',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_x3d_cube.x3d
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=05312d278fe41da33560fdfb9bdb268f --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_x3d_nurbs
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/io_tests/export_x3d_nurbs.x3d',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_x3d_nurbs.x3d
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=4286d4a2aa507ef78b22ddcbdcc88481 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_x3d_all_objects
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.x3d\(filepath='${TEST_OUT_DIR}/io_tests/export_x3d_all_objects.x3d',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_x3d_all_objects.x3d
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=f5f9fa4c5619a0eeab66685aafd2f7f0 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
2011-01-21 10:49:39 +00:00
|
|
|
|
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# 3DS Import
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_3ds_cube
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/cube.3ds'\)
|
|
|
|
--md5=cb5a45c35a343c3f5beca2a918472951 --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_3ds_cube.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_3ds_hierarchy_lara
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/hierarchy_lara.3ds'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=766c873d9fdb5f190e43796cfbae63b6 --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_3ds_hierarchy_lara.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
import_3ds_hierarchy_greek_trireme
|
2011-01-21 00:06:30 +00:00
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
|
|
|
--run={'FINISHED'}&bpy.ops.import_scene.autodesk_3ds\(filepath='${TEST_SRC_DIR}/io_tests/3ds/hierarchy_greek_trireme.3ds'\)
|
2011-06-07 08:47:33 +00:00
|
|
|
--md5=b62ee30101e8999cb91ef4f8a8760056 --md5_method=SCENE
|
2019-06-25 17:52:37 +00:00
|
|
|
--write-blend=${TEST_OUT_DIR}/io_tests/import_3ds_hierarchy_greek_trireme.blend
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
# 3DS Export
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_3ds_cube
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/io_tests/export_3ds_cube.3ds',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_3ds_cube.3ds
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=a31f5071b6c6dc7445b9099cdc7f63b3 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_3ds_nurbs
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/io_tests/export_3ds_nurbs.3ds',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_3ds_nurbs.3ds
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=5bdd21be3c80d814fbc83cb25edb08c2 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_3ds_all_objects
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.autodesk_3ds\(filepath='${TEST_OUT_DIR}/io_tests/export_3ds_all_objects.3ds',use_selection=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_3ds_all_objects.3ds
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=68447761ab0ca38e1e22e7c177ed48a8 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2011-01-21 00:06:30 +00:00
|
|
|
|
|
|
|
|
2011-01-21 10:49:39 +00:00
|
|
|
|
2011-01-21 00:06:30 +00:00
|
|
|
# FBX Export
|
|
|
|
# 'use_metadata=False' for reliable md5's
|
2015-02-10 14:29:18 +00:00
|
|
|
# disabled until updated & working
|
|
|
|
if(FALSE)
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_fbx_cube
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/all_quads.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/io_tests/export_fbx_cube.fbx',use_selection=False,use_metadata=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_fbx_cube.fbx
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=59a35577462f95f9a0b4e6035226ce9b --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_fbx_nurbs
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_geometry/nurbs.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/io_tests/export_fbx_nurbs.fbx',use_selection=False,use_metadata=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_fbx_nurbs.fbx
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=d31875f18f613fa0c3b16e978f87f6f8 --md5_method=FILE
|
2011-01-21 00:06:30 +00:00
|
|
|
)
|
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
|
|
|
export_fbx_all_objects
|
2011-01-21 00:06:30 +00:00
|
|
|
${TEST_SRC_DIR}/io_tests/blend_scene/all_objects.blend
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_test.py --
|
2019-06-25 17:52:37 +00:00
|
|
|
--run={'FINISHED'}&bpy.ops.export_scene.fbx\(filepath='${TEST_OUT_DIR}/io_tests/export_fbx_all_objects.fbx',use_selection=False,use_metadata=False\)
|
|
|
|
--md5_source=${TEST_OUT_DIR}/io_tests/export_fbx_all_objects.fbx
|
2011-10-10 00:29:23 +00:00
|
|
|
--md5=b35eb2a9d0e73762ecae2278c25a38ac --md5_method=FILE
|
2011-01-21 00:33:37 +00:00
|
|
|
)
|
2015-02-10 14:29:18 +00:00
|
|
|
endif()
|
2015-01-22 10:53:49 +00:00
|
|
|
|
2022-10-11 13:02:40 +00:00
|
|
|
# SVG Import
|
|
|
|
if(True)
|
2022-11-10 09:29:00 +00:00
|
|
|
set(_svg_render_tests complex path)
|
2022-10-11 13:02:40 +00:00
|
|
|
|
|
|
|
foreach(render_test ${_svg_render_tests})
|
|
|
|
add_python_test(
|
|
|
|
io_curve_svg_${render_test}
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/bl_io_curve_svg_test.py
|
|
|
|
-blender "${TEST_BLENDER_EXE}"
|
|
|
|
-testdir "${TEST_SRC_DIR}/io_tests/svg/${render_test}"
|
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
|
|
|
-outdir "${TEST_OUT_DIR}/io_curve_svg"
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
unset(_svg_render_tests)
|
|
|
|
endif()
|
|
|
|
|
2019-05-16 18:21:35 +00:00
|
|
|
if(WITH_CYCLES OR WITH_OPENGL_RENDER_TESTS)
|
|
|
|
if(NOT OPENIMAGEIO_IDIFF)
|
2022-09-23 04:33:44 +00:00
|
|
|
message(WARNING "Disabling render tests because OIIO idiff does not exist")
|
2019-05-16 18:21:35 +00:00
|
|
|
elseif(NOT EXISTS "${TEST_SRC_DIR}/render/shader")
|
2022-09-23 04:33:44 +00:00
|
|
|
message(WARNING "Disabling render tests because tests folder does not exist at ${TEST_SRC_DIR}")
|
2022-08-09 13:59:56 +00:00
|
|
|
elseif(NOT WITH_COMPOSITOR_CPU)
|
2022-09-23 04:33:44 +00:00
|
|
|
message(WARNING "Disabling render tests because WITH_COMPOSITOR_CPU is disabled")
|
2021-11-09 12:35:51 +00:00
|
|
|
elseif(NOT WITH_OPENCOLORIO)
|
2022-09-23 04:33:44 +00:00
|
|
|
message(WARNING "Disabling render tests because WITH_OPENCOLORIO is disabled")
|
2019-05-16 18:21:35 +00:00
|
|
|
else()
|
2019-08-30 15:50:01 +00:00
|
|
|
set(render_tests
|
2021-12-07 19:07:41 +00:00
|
|
|
camera
|
2019-08-30 15:50:01 +00:00
|
|
|
bsdf
|
|
|
|
hair
|
|
|
|
image_colorspace
|
|
|
|
image_data_types
|
|
|
|
image_mapping
|
|
|
|
image_texture_limit
|
|
|
|
integrator
|
|
|
|
light
|
|
|
|
mesh
|
2021-12-01 16:30:46 +00:00
|
|
|
pointcloud
|
2019-08-30 15:50:01 +00:00
|
|
|
shader
|
|
|
|
shadow_catcher
|
|
|
|
sss
|
|
|
|
)
|
|
|
|
|
2021-11-09 12:35:51 +00:00
|
|
|
if(WITH_OPENSUBDIV)
|
|
|
|
list(APPEND render_tests displacement)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_FREESTYLE)
|
|
|
|
list(APPEND render_tests render_layer)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_MOD_FLUID)
|
2021-11-19 12:21:48 +00:00
|
|
|
list(APPEND render_tests motion_blur reports volume)
|
2021-11-09 12:35:51 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_OPENVDB)
|
|
|
|
list(APPEND render_tests openvdb)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_OPENIMAGEDENOISE)
|
|
|
|
list(APPEND render_tests denoise)
|
|
|
|
endif()
|
|
|
|
|
2022-09-21 15:58:34 +00:00
|
|
|
# Disabled until new OpenGL version with deterministic results.
|
|
|
|
#if(WITH_CYCLES_PATH_GUIDING)
|
|
|
|
# list(APPEND render_tests guiding)
|
|
|
|
#endif()
|
|
|
|
|
2019-08-30 15:50:01 +00:00
|
|
|
if(WITH_OPENGL_RENDER_TESTS)
|
|
|
|
list(APPEND render_tests grease_pencil)
|
|
|
|
endif()
|
|
|
|
|
2021-11-09 12:35:51 +00:00
|
|
|
list(SORT render_tests)
|
|
|
|
|
2020-10-28 15:19:03 +00:00
|
|
|
# Cycles
|
2019-08-30 15:50:01 +00:00
|
|
|
if(WITH_CYCLES)
|
2021-01-14 11:24:24 +00:00
|
|
|
if(NOT WITH_CYCLES_OSL)
|
|
|
|
set(_cycles_blacklist OSL)
|
|
|
|
endif()
|
2020-10-28 15:19:03 +00:00
|
|
|
foreach(_cycles_device ${CYCLES_TEST_DEVICES})
|
|
|
|
string(TOLOWER "${_cycles_device}" _cycles_device_lower)
|
2020-11-27 15:40:16 +00:00
|
|
|
set(_cycles_render_tests bake;${render_tests};osl)
|
2020-10-28 15:19:03 +00:00
|
|
|
|
|
|
|
foreach(render_test ${_cycles_render_tests})
|
2022-02-10 17:44:58 +00:00
|
|
|
add_python_test(
|
|
|
|
cycles_${render_test}_${_cycles_device_lower}
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
|
|
|
|
-blender "${TEST_BLENDER_EXE}"
|
|
|
|
-testdir "${TEST_SRC_DIR}/render/${render_test}"
|
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
|
|
|
-outdir "${TEST_OUT_DIR}/cycles"
|
|
|
|
-device ${_cycles_device}
|
|
|
|
-blacklist ${_cycles_blacklist}
|
|
|
|
)
|
2020-10-28 15:19:03 +00:00
|
|
|
endforeach()
|
2019-08-30 15:50:01 +00:00
|
|
|
endforeach()
|
|
|
|
endif()
|
2019-05-16 18:21:35 +00:00
|
|
|
|
2019-08-30 15:50:01 +00:00
|
|
|
if(WITH_OPENGL_RENDER_TESTS)
|
2020-10-28 15:19:03 +00:00
|
|
|
# Eevee
|
2019-08-30 15:50:01 +00:00
|
|
|
foreach(render_test ${render_tests})
|
2019-05-16 18:21:35 +00:00
|
|
|
add_python_test(
|
2019-08-30 15:50:01 +00:00
|
|
|
eevee_${render_test}_test
|
2019-05-16 18:21:35 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/eevee_render_tests.py
|
2019-09-07 12:03:39 +00:00
|
|
|
-blender "${TEST_BLENDER_EXE}"
|
2019-08-30 15:50:01 +00:00
|
|
|
-testdir "${TEST_SRC_DIR}/render/${render_test}"
|
2019-05-16 18:21:35 +00:00
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
|
|
|
-outdir "${TEST_OUT_DIR}/eevee"
|
|
|
|
)
|
2019-08-30 15:50:01 +00:00
|
|
|
endforeach()
|
2019-05-16 18:21:35 +00:00
|
|
|
|
2019-08-30 15:50:01 +00:00
|
|
|
foreach(render_test ${render_tests})
|
2020-10-28 15:19:03 +00:00
|
|
|
# Workbench
|
2019-05-16 18:21:35 +00:00
|
|
|
add_python_test(
|
2019-08-30 15:50:01 +00:00
|
|
|
workbench_${render_test}_test
|
2019-05-16 18:21:35 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/workbench_render_tests.py
|
2019-09-07 12:03:39 +00:00
|
|
|
-blender "${TEST_BLENDER_EXE}"
|
2019-08-30 15:50:01 +00:00
|
|
|
-testdir "${TEST_SRC_DIR}/render/${render_test}"
|
2019-05-16 18:21:35 +00:00
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
|
|
|
-outdir "${TEST_OUT_DIR}/workbench"
|
|
|
|
)
|
2019-08-30 15:50:01 +00:00
|
|
|
endforeach()
|
2019-05-28 15:57:16 +00:00
|
|
|
endif()
|
2019-05-16 18:21:35 +00:00
|
|
|
endif()
|
2015-01-22 10:53:49 +00:00
|
|
|
endif()
|
Render Layers and Collections (merge from render-layers)
Design Documents
----------------
* https://wiki.blender.org/index.php/Dev:2.8/Source/Layers
* https://wiki.blender.org/index.php/Dev:2.8/Source/DataDesignRevised
User Commit Log
---------------
* New Layer and Collection system to replace render layers and viewport layers.
* A layer is a set of collections of objects (and their drawing options) required for specific tasks.
* A collection is a set of objects, equivalent of the old layers in Blender. A collection can be shared across multiple layers.
* All Scenes have a master collection that all other collections are children of.
* New collection "context" tab (in Properties Editor)
* New temporary viewport "collections" panel to control per-collection
visibility
Missing User Features
---------------------
* Collection "Filter"
Option to add objects based on their names
* Collection Manager operators
The existing buttons are placeholders
* Collection Manager drawing
The editor main region is empty
* Collection Override
* Per-Collection engine settings
This will come as a separate commit, as part of the clay-engine branch
Dev Commit Log
--------------
* New DNA file (DNA_layer_types.h) with the new structs
We are replacing Base by a new extended Base while keeping it backward
compatible with some legacy settings (i.e., lay, flag_legacy).
Renamed all Base to BaseLegacy to make it clear the areas of code that
still need to be converted
Note: manual changes were required on - deg_builder_nodes.h, rna_object.c, KX_Light.cpp
* Unittesting for main syncronization requirements
- read, write, add/copy/remove objects, copy scene, collection
link/unlinking, context)
* New Editor: Collection Manager
Based on patch by Julian Eisel
This is extracted from the layer-manager branch. With the following changes:
- Renamed references of layer manager to collections manager
- I doesn't include the editors/space_collections/ draw and util files
- The drawing code itself will be implemented separately by Julian
* Base / Object:
A little note about them. Original Blender code would try to keep them
in sync through the code, juggling flags back and forth. This will now
be handled by Depsgraph, keeping Object and Bases more separated
throughout the non-rendering code.
Scene.base is being cleared in doversion, and the old viewport drawing
code was poorly converted to use the new bases while the new viewport
code doesn't get merged and replace the old one.
Python API Changes
------------------
```
- scene.layers
+ # no longer exists
- scene.objects
+ scene.scene_layers.active.objects
- scene.objects.active
+ scene.render_layers.active.objects.active
- bpy.context.scene.objects.link()
+ bpy.context.scene_collection.objects.link()
- bpy_extras.object_utils.object_data_add(context, obdata, operator=None, use_active_layer=True, name=None)
+ bpy_extras.object_utils.object_data_add(context, obdata, operator=None, name=None)
- bpy.context.object.select
+ bpy.context.object.select = True
+ bpy.context.object.select = False
+ bpy.context.object.select_get()
+ bpy.context.object.select_set(action='SELECT')
+ bpy.context.object.select_set(action='DESELECT')
-AddObjectHelper.layers
+ # no longer exists
```
2017-02-07 09:18:38 +00:00
|
|
|
|
2022-08-09 13:59:56 +00:00
|
|
|
if(WITH_COMPOSITOR_CPU)
|
2021-03-26 15:04:09 +00:00
|
|
|
set(compositor_tests
|
|
|
|
color
|
|
|
|
converter
|
|
|
|
filter
|
|
|
|
input
|
|
|
|
output
|
|
|
|
vector
|
|
|
|
|
|
|
|
multiple_node_setups
|
|
|
|
)
|
|
|
|
|
2022-01-13 09:41:34 +00:00
|
|
|
if(WITH_LIBMV)
|
|
|
|
list(APPEND compositor_tests distort matte)
|
|
|
|
endif()
|
|
|
|
|
2021-03-26 15:04:09 +00:00
|
|
|
foreach(comp_test ${compositor_tests})
|
|
|
|
add_python_test(
|
|
|
|
compositor_${comp_test}_test
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/compositor_render_tests.py
|
|
|
|
-blender "${TEST_BLENDER_EXE}"
|
|
|
|
-testdir "${TEST_SRC_DIR}/compositor/${comp_test}"
|
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
|
|
|
-outdir "${TEST_OUT_DIR}/compositor"
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2021-07-27 15:30:28 +00:00
|
|
|
set(geo_node_tests
|
2021-08-24 07:52:01 +00:00
|
|
|
attributes
|
|
|
|
curve_primitives
|
2021-07-27 15:30:28 +00:00
|
|
|
curves
|
|
|
|
geometry
|
2021-08-24 07:52:01 +00:00
|
|
|
mesh_primitives
|
2021-07-27 15:30:28 +00:00
|
|
|
mesh
|
2022-01-24 19:55:32 +00:00
|
|
|
mesh/extrude
|
2021-07-27 15:30:28 +00:00
|
|
|
points
|
2021-08-24 07:52:01 +00:00
|
|
|
utilities
|
|
|
|
vector
|
2021-07-27 15:30:28 +00:00
|
|
|
)
|
|
|
|
|
2021-09-29 15:42:55 +00:00
|
|
|
if(WITH_GMP)
|
|
|
|
list(APPEND geo_node_tests mesh/boolean)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_OPENVDB)
|
|
|
|
list(APPEND geo_node_tests volume)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WITH_OPENSUBDIV)
|
|
|
|
list(APPEND geo_node_tests mesh/subdivision_tests)
|
|
|
|
endif()
|
|
|
|
|
2021-07-27 15:30:28 +00:00
|
|
|
foreach(geo_node_test ${geo_node_tests})
|
|
|
|
if(EXISTS "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/")
|
|
|
|
file(GLOB files "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/*.blend")
|
|
|
|
foreach(file ${files})
|
|
|
|
get_filename_component(filename ${file} NAME_WE)
|
|
|
|
add_blender_test(
|
|
|
|
geo_node_${geo_node_test}_test_${filename}
|
|
|
|
${file}
|
|
|
|
--python ${TEST_PYTHON_DIR}/geo_node_test.py
|
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
else()
|
2022-09-23 04:33:44 +00:00
|
|
|
message(STATUS "Directory named ${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/ Not Found, disabling test.")
|
2021-07-27 15:30:28 +00:00
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
|
2018-02-14 19:33:33 +00:00
|
|
|
if(WITH_OPENGL_DRAW_TESTS)
|
2019-05-16 18:21:35 +00:00
|
|
|
if(NOT OPENIMAGEIO_IDIFF)
|
2022-09-23 04:33:44 +00:00
|
|
|
message(STATUS "Disabling OpenGL draw tests because OIIO idiff does not exist")
|
2019-05-16 18:21:35 +00:00
|
|
|
elseif(NOT EXISTS "${TEST_SRC_DIR}/opengl")
|
2022-09-23 04:33:44 +00:00
|
|
|
message(STATUS "Disabling OpenGL draw tests because tests folder does not exist at ${TEST_SRC_DIR}")
|
2019-05-16 18:21:35 +00:00
|
|
|
else()
|
2019-02-20 15:03:13 +00:00
|
|
|
# Use all subdirectories of opengl folder.
|
|
|
|
file(GLOB children RELATIVE ${TEST_SRC_DIR}/opengl ${TEST_SRC_DIR}/opengl/*)
|
2018-02-16 00:22:34 +00:00
|
|
|
foreach(child ${children})
|
2019-02-20 15:03:13 +00:00
|
|
|
# Resolve symlinks, useful to test production files with linked libraries.
|
|
|
|
get_filename_component(child_path ${TEST_SRC_DIR}/opengl/${child} REALPATH)
|
|
|
|
if(IS_DIRECTORY ${child_path})
|
|
|
|
file(GLOB_RECURSE blends "${child_path}/*.blend")
|
2018-02-16 00:22:34 +00:00
|
|
|
if(blends)
|
|
|
|
add_python_test(
|
2019-03-15 18:11:33 +00:00
|
|
|
opengl_draw_${child}
|
2018-02-14 19:33:33 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/opengl_draw_tests.py
|
2019-09-07 12:03:39 +00:00
|
|
|
-blender "${TEST_BLENDER_EXE}"
|
2019-02-20 15:03:13 +00:00
|
|
|
-testdir "${child_path}"
|
2018-02-16 00:22:34 +00:00
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
|
|
|
-outdir "${TEST_OUT_DIR}/opengl_draw"
|
|
|
|
)
|
2018-02-14 19:33:33 +00:00
|
|
|
endif()
|
2018-02-16 00:22:34 +00:00
|
|
|
endif()
|
|
|
|
endforeach()
|
2018-02-14 19:33:33 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2017-04-14 10:54:20 +00:00
|
|
|
if(WITH_ALEMBIC)
|
2017-04-21 14:20:01 +00:00
|
|
|
find_package_wrapper(Alembic)
|
|
|
|
if(NOT ALEMBIC_FOUND)
|
|
|
|
message(FATAL_ERROR "Alembic is enabled but cannot be found")
|
|
|
|
endif()
|
|
|
|
get_filename_component(real_include_dir ${ALEMBIC_INCLUDE_DIR} REALPATH)
|
|
|
|
get_filename_component(ALEMBIC_ROOT_DIR ${real_include_dir} DIRECTORY)
|
2019-04-17 04:35:54 +00:00
|
|
|
|
2018-02-16 00:22:34 +00:00
|
|
|
add_python_test(
|
2020-08-17 14:36:14 +00:00
|
|
|
alembic_export_tests
|
2020-08-17 10:55:23 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/alembic_export_tests.py
|
2019-09-07 12:03:39 +00:00
|
|
|
--blender "${TEST_BLENDER_EXE}"
|
2018-02-16 00:22:34 +00:00
|
|
|
--testdir "${TEST_SRC_DIR}/alembic"
|
|
|
|
--alembic-root "${ALEMBIC_ROOT_DIR}"
|
|
|
|
)
|
2019-04-17 04:35:54 +00:00
|
|
|
|
2019-08-02 12:25:40 +00:00
|
|
|
add_blender_test(
|
2020-02-14 14:14:46 +00:00
|
|
|
script_alembic_io
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_alembic_io_test.py
|
2017-06-04 23:05:59 +00:00
|
|
|
--
|
|
|
|
--testdir "${TEST_SRC_DIR}/alembic"
|
2017-08-03 22:11:42 +00:00
|
|
|
)
|
2017-04-14 10:54:20 +00:00
|
|
|
endif()
|
2017-04-18 12:18:06 +00:00
|
|
|
|
2021-10-20 16:07:28 +00:00
|
|
|
if(WITH_USD)
|
|
|
|
add_blender_test(
|
|
|
|
usd_import_test
|
|
|
|
--python ${CMAKE_CURRENT_LIST_DIR}/bl_usd_import_test.py
|
|
|
|
--
|
|
|
|
--testdir "${TEST_SRC_DIR}/usd"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2018-03-05 14:32:49 +00:00
|
|
|
if(WITH_CODEC_FFMPEG)
|
|
|
|
add_python_test(
|
2019-03-15 18:11:33 +00:00
|
|
|
ffmpeg
|
2018-03-05 14:32:49 +00:00
|
|
|
${CMAKE_CURRENT_LIST_DIR}/ffmpeg_tests.py
|
2019-09-07 12:03:39 +00:00
|
|
|
--blender "${TEST_BLENDER_EXE}"
|
2019-07-01 15:18:43 +00:00
|
|
|
--testdir "${TEST_SRC_DIR}/ffmpeg"
|
2018-03-05 14:32:49 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-11-01 20:33:38 +00:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# SEQUENCER RENDER TESTS
|
|
|
|
|
|
|
|
if(NOT OPENIMAGEIO_IDIFF)
|
2022-09-23 04:33:44 +00:00
|
|
|
message(STATUS "Disabling sequencer render tests because OIIO idiff does not exist")
|
2020-11-01 20:33:38 +00:00
|
|
|
else()
|
|
|
|
set(render_tests
|
|
|
|
transform
|
|
|
|
)
|
|
|
|
|
|
|
|
foreach(render_test ${render_tests})
|
|
|
|
add_python_test(
|
|
|
|
sequencer_render_${render_test}
|
|
|
|
${CMAKE_CURRENT_LIST_DIR}/sequencer_render_tests.py
|
|
|
|
-blender "${TEST_BLENDER_EXE}"
|
|
|
|
-testdir "${TEST_SRC_DIR}/sequence_editing/${render_test}"
|
|
|
|
-idiff "${OPENIMAGEIO_IDIFF}"
|
2020-11-03 12:23:43 +00:00
|
|
|
-outdir "${TEST_OUT_DIR}/sequence_editing"
|
2020-11-01 20:33:38 +00:00
|
|
|
)
|
|
|
|
endforeach()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2018-02-24 12:11:30 +00:00
|
|
|
add_subdirectory(collada)
|
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-04-30 13:57:22 +00:00
|
|
|
|
|
|
|
# TODO: disabled for now after collection unification
|
|
|
|
# add_subdirectory(view_layer)
|