Blender V5.0
obj_exporter.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_utility_mixins.hh"
12
13#include "BLI_vector.hh"
14
15#include "IO_wavefront_obj.hh"
16
17struct bContext;
18struct Collection;
19
20namespace blender::io::obj {
21
27 private:
28 Depsgraph *depsgraph_ = nullptr;
29 bool needs_free_ = false;
30
31 public:
32 OBJDepsgraph(const bContext *C, eEvaluationMode eval_mode, Collection *collection);
34
35 Depsgraph *get();
37};
38
48void exporter_main(bContext *C, const OBJExportParams &export_params);
49
50class OBJMesh;
51class IOBJCurve;
52
64void export_frame(Depsgraph *depsgraph,
65 const OBJExportParams &export_params,
66 const char *filepath);
67
68void export_objects(const OBJExportParams &export_params,
69 Span<std::unique_ptr<OBJMesh>> meshes,
70 Span<std::unique_ptr<IOBJCurve>> curves,
71 const char *filepath);
72
84std::pair<Vector<std::unique_ptr<OBJMesh>>, Vector<std::unique_ptr<IOBJCurve>>>
85filter_supported_objects(Depsgraph *depsgraph, const OBJExportParams &export_params);
86
95bool append_frame_to_filename(const char *filepath,
96 int frame,
97 char r_filepath_with_frames[/*FILE_MAX*/ 1024]);
98} // namespace blender::io::obj
eEvaluationMode
#define C
Definition RandGen.cpp:29
BPy_StructRNA * depsgraph
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
OBJDepsgraph(const bContext *C, eEvaluationMode eval_mode, Collection *collection)
bool append_frame_to_filename(const char *filepath, const int frame, char r_filepath_with_frames[1024])
void export_objects(const OBJExportParams &export_params, const Span< std::unique_ptr< OBJMesh > > meshes, const Span< std::unique_ptr< IOBJCurve > > curves, const char *filepath)
std::pair< Vector< std::unique_ptr< OBJMesh > >, Vector< std::unique_ptr< IOBJCurve > > > filter_supported_objects(Depsgraph *depsgraph, const OBJExportParams &export_params)
void exporter_main(bContext *C, const OBJExportParams &export_params)
void export_frame(Depsgraph *depsgraph, const OBJExportParams &export_params, const char *filepath)