26 .description(
"Path to a CSV file");
45 const std::optional<std::string> path =
params.ensure_absolute_path(
46 params.extract_input<std::string>(
"Path"));
48 params.set_default_remaining_outputs();
51 const std::string delimiter =
params.extract_input<std::string>(
"Delimiter");
52 if (delimiter.size() != 1) {
54 params.set_default_remaining_outputs();
57 if (
ELEM(delimiter[0],
'\n',
'\r',
'"',
'\\')) {
59 TIP_(
"Delimiter must not be \\n, \\r, \" or \\"));
60 params.set_default_remaining_outputs();
65 const std::string loader_key = fmt::format(
"import_csv_node_{}", delimiter[0]);
75 import_params.
reports = &reports;
79 auto cached_value = std::make_unique<LoadCsvCache>();
83 cached_value->warnings.append_as(*report);
92 params.set_output(
"Point Cloud", cached_value->geometry);
void BKE_reports_free(ReportList *reports)
void BKE_reports_init(ReportList *reports, int flag)
#define LISTBASE_FOREACH(type, var, list)
#define BLI_SCOPED_DEFER(function_to_defer)
char * STRNCPY(char(&dst)[N], const char *src)
#define NOD_REGISTER_NODE(REGISTER_FUNC)
std::optional< std::string > path_filter
void count_memory(MemoryCounter &counter) const override
Vector< geo_eval_log::NodeWarning > warnings
void node_register_type(bNodeType &ntype)
PointCloud * import_csv_as_pointcloud(const CSVImportParams &import_params)
std::shared_ptr< const T > get_loaded(const GenericKey &loader_key, Span< StringRefNull > file_paths, FunctionRef< std::unique_ptr< T >()> load_fn)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void count_memory(MemoryCounter &memory) const
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare
static GeometrySet from_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)