Blender V5.3
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
17namespace blender {
18
19struct bContext;
20struct Collection;
21
22namespace io::obj {
23
29 private:
30 Depsgraph *depsgraph_ = nullptr;
31 bool needs_free_ = false;
32
33 public:
34 OBJDepsgraph(const bContext *C, eEvaluationMode eval_mode, Collection *collection);
36
37 Depsgraph *get();
39};
40
50void exporter_main(bContext *C, const OBJExportParams &export_params);
51
52class OBJMesh;
53class IOBJCurve;
54
66void export_frame(Depsgraph *depsgraph,
67 const OBJExportParams &export_params,
68 const char *filepath);
69
70void export_objects(const OBJExportParams &export_params,
71 Span<std::unique_ptr<OBJMesh>> meshes,
72 Span<std::unique_ptr<IOBJCurve>> curves,
73 const char *filepath);
74
86std::pair<Vector<std::unique_ptr<OBJMesh>>, Vector<std::unique_ptr<IOBJCurve>>>
87filter_supported_objects(Depsgraph *depsgraph, const OBJExportParams &export_params);
88
97bool append_frame_to_filename(const char *filepath,
98 int frame,
99 char r_filepath_with_frames[/*FILE_MAX*/ 1024]);
100} // namespace io::obj
101} // namespace blender
#define C
Definition RandGen.cpp:29
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
OBJDepsgraph(const bContext *C, eEvaluationMode eval_mode, Collection *collection)
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)
bool append_frame_to_filename(const char *filepath, const int frame, char r_filepath_with_frames[FILE_MAX])
void exporter_main(bContext *C, const OBJExportParams &export_params)
void export_frame(Depsgraph *depsgraph, const OBJExportParams &export_params, const char *filepath)
BMesh Iterators.