Previously, only `,` was a valid delimiter, but it's also common to have e.g. tab or semicolon. Only single characters are supported as delimiters. A few characters are not allowed because they have other meanings: `\n`, `\r`, `"`, `\\`. Note: The best way to get a tab character is the use the Special Characters node currently. Pull Request: https://projects.blender.org/blender/blender/pulls/135468
29 lines
521 B
C++
29 lines
521 B
C++
/* SPDX-FileCopyrightText: 2024 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup csv
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "BLI_path_utils.hh"
|
|
|
|
struct PointCloud;
|
|
struct ReportList;
|
|
|
|
namespace blender::io::csv {
|
|
|
|
struct CSVImportParams {
|
|
/** Full path to the source CSV file to import. */
|
|
char filepath[FILE_MAX];
|
|
char delimiter = ',';
|
|
|
|
ReportList *reports = nullptr;
|
|
};
|
|
|
|
PointCloud *import_csv_as_pointcloud(const CSVImportParams &import_params);
|
|
|
|
} // namespace blender::io::csv
|