Files
test2/source/blender/io/stl/IO_stl.cc
Devashish Lal d1455c4138 Geometry Nodes: Add STL Import Node
This commit adds an initial STL import node, the first of the nodes from the
current Google Summer of Code Project [0]. The importer is refactored to
output a mesh pointer, and a node is added to wrap around the importer.
The node supports error messages from the importer. A new experimental
option is added to hide the nodes by default until they're ready to be exposed
generally.

0: https://devtalk.blender.org/t/gsoc-2024-geometry-nodes-file-import-nodes/34482)

Pull Request: https://projects.blender.org/blender/blender/pulls/122418
2024-06-10 20:47:37 +02:00

31 lines
663 B
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup stl
*/
#include "BLI_timeit.hh"
#include "IO_stl.hh"
#include "stl_export.hh"
#include "stl_import.hh"
void STL_import(bContext *C, const STLImportParams *import_params)
{
SCOPED_TIMER("STL Import");
blender::io::stl::importer_main(C, *import_params);
}
void STL_export(bContext *C, const STLExportParams *export_params)
{
SCOPED_TIMER("STL Export");
blender::io::stl::exporter_main(C, *export_params);
}
Mesh *STL_import_mesh(const STLImportParams *import_params)
{
return blender::io::stl::read_stl_file(*import_params);
}