This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/io/ply/IO_ply.cc
Aras Pranckevicius 08db6bf215 IO: factor out axis validation logic between OBJ and PLY
The up_axis_update/forward_axis_update was the same logic between
the two, so factor that out.

Also use the same time reporting logic in PLY as in OBJ/USD/Alembic.
2023-03-06 10:22:01 +02:00

37 lines
1008 B
C++

/* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup ply
*/
#include "BLI_timeit.hh"
#include "DNA_windowmanager_types.h"
#include "IO_ply.h"
#include "ply_export.hh"
#include "ply_import.hh"
using namespace blender::timeit;
static void report_duration(const char *job, const TimePoint &start_time, const char *path)
{
Nanoseconds duration = Clock::now() - start_time;
std::cout << "PLY " << job << " of '" << BLI_path_basename(path) << "' took ";
print_duration(duration);
std::cout << '\n';
}
void PLY_export(bContext *C, const PLYExportParams *export_params)
{
TimePoint start_time = Clock::now();
blender::io::ply::exporter_main(C, *export_params);
report_duration("export", start_time, export_params->filepath);
}
void PLY_import(bContext *C, const PLYImportParams *import_params, wmOperator *op)
{
TimePoint start_time = Clock::now();
blender::io::ply::importer_main(C, *import_params, op);
report_duration("import", start_time, import_params->filepath);
}