There was a C++ STL importer since Blender 3.3, but no corresponding C++ STL exporter. This PR is adding said exporter: taking https://projects.blender.org/blender/blender/pulls/105598 and finishing it (agreed with original author). Exporting Suzanne with 6 level subdivision (4 million triangles), on Apple M1 Max: - Binary: python exporter 7.8 sec -> C++ exporter 0.9 sec. - Ascii: python exporter 13.1 sec -> C++ exporter 4.5 sec. Co-authored-by: Iyad Ahmed <iyadahmed430@gmail.com> Pull Request: https://projects.blender.org/blender/blender/pulls/114862
26 lines
540 B
C++
26 lines
540 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);
|
|
}
|