Tests: Geometry Nodes: add initial Import CSV node tests
Previously, the test files still had absolute instead of relative paths in them. Pull Request: https://projects.blender.org/blender/blender/pulls/139020
This commit is contained in:
@@ -484,9 +484,6 @@ option(WITH_IO_STL "Enable STL 3D file format support (*.stl)" ON)
|
||||
option(WITH_IO_FBX "Enable FBX 3D file format support (*.fbx)" ON)
|
||||
option(WITH_IO_GREASE_PENCIL "Enable grease-pencil file format IO (*.svg, *.pdf)" ON)
|
||||
|
||||
# Csv support
|
||||
option(WITH_IO_CSV "Enable CSV file format support (*.csv)" ON)
|
||||
|
||||
# Sound output
|
||||
option(WITH_SDL "Enable SDL for sound" OFF)
|
||||
option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
|
||||
|
||||
@@ -35,7 +35,6 @@ set(WITH_INPUT_NDOF OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_PLY OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_STL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_CSV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_WAVEFRONT_OBJ OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_GREASE_PENCIL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_IO_FBX OFF CACHE BOOL "" FORCE)
|
||||
|
||||
@@ -2,16 +2,9 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
if(WITH_IO_WAVEFRONT_OBJ OR
|
||||
WITH_IO_PLY OR
|
||||
WITH_IO_STL OR
|
||||
WITH_IO_GREASE_PENCIL OR
|
||||
WITH_ALEMBIC OR
|
||||
WITH_USD OR
|
||||
WITH_IO_CSV OR
|
||||
WITH_IO_FBX)
|
||||
add_subdirectory(common)
|
||||
endif()
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(csv)
|
||||
|
||||
if(WITH_IO_WAVEFRONT_OBJ)
|
||||
add_subdirectory(wavefront_obj)
|
||||
@@ -44,7 +37,3 @@ endif()
|
||||
if(WITH_USD)
|
||||
add_subdirectory(usd)
|
||||
endif()
|
||||
|
||||
if(WITH_IO_CSV)
|
||||
add_subdirectory(csv)
|
||||
endif()
|
||||
|
||||
@@ -268,6 +268,8 @@ set(LIB
|
||||
PRIVATE bf::imbuf::movie
|
||||
PRIVATE bf::intern::guardedalloc
|
||||
bf_nodes
|
||||
bf_io_common
|
||||
bf_io_csv
|
||||
PRIVATE bf::intern::atomic
|
||||
PRIVATE bf::extern::fmtlib
|
||||
PRIVATE bf::extern::xxhash
|
||||
@@ -275,14 +277,6 @@ set(LIB
|
||||
PRIVATE bf::windowmanager
|
||||
)
|
||||
|
||||
if(WITH_IO_CSV)
|
||||
list(APPEND LIB
|
||||
PRIVATE bf_io_common
|
||||
PRIVATE bf_io_csv
|
||||
)
|
||||
add_definitions(-DWITH_IO_CSV)
|
||||
endif()
|
||||
|
||||
if(WITH_IO_STL)
|
||||
list(APPEND LIB
|
||||
PRIVATE bf_io_common
|
||||
|
||||
@@ -42,7 +42,6 @@ class LoadCsvCache : public memory_cache::CachedValue {
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
{
|
||||
#ifdef WITH_IO_CSV
|
||||
const std::optional<std::string> path = params.ensure_absolute_path(
|
||||
params.extract_input<std::string>("Path"));
|
||||
if (!path) {
|
||||
@@ -91,11 +90,6 @@ static void node_geo_exec(GeoNodeExecParams params)
|
||||
}
|
||||
|
||||
params.set_output("Point Cloud", cached_value->geometry);
|
||||
#else
|
||||
params.error_message_add(NodeWarningType::Error,
|
||||
TIP_("Disabled, Blender was compiled without CSV I/O"));
|
||||
params.set_default_remaining_outputs();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void node_register()
|
||||
|
||||
BIN
tests/files/modeling/geometry_nodes/import/data_files/dash_separated.csv
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/data_files/dash_separated.csv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
tests/files/modeling/geometry_nodes/import/data_files/int_and_float.csv
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/data_files/int_and_float.csv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
tests/files/modeling/geometry_nodes/import/data_files/random_floats.csv
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/data_files/random_floats.csv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
tests/files/modeling/geometry_nodes/import/data_files/simple.csv
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/data_files/simple.csv
(Stored with Git LFS)
Normal file
Binary file not shown.
|
BIN
tests/files/modeling/geometry_nodes/import/import_csv_dash_separated.blend
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/import_csv_dash_separated.blend
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
tests/files/modeling/geometry_nodes/import/import_csv_int_and_float.blend
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/import_csv_int_and_float.blend
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
tests/files/modeling/geometry_nodes/import/import_csv_random_floats.blend
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/import_csv_random_floats.blend
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
tests/files/modeling/geometry_nodes/import/import_csv_simple.blend
(Stored with Git LFS)
Normal file
BIN
tests/files/modeling/geometry_nodes/import/import_csv_simple.blend
(Stored with Git LFS)
Normal file
Binary file not shown.
Reference in New Issue
Block a user