Blender V5.3
abc_archive.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2020 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "ABC_alembic.h"
13
14#include <Alembic/Abc/OArchive.h>
15#include <Alembic/Abc/OTypedScalarProperty.h>
16
17#include <fstream>
18#include <set>
19#include <string>
20
21namespace blender {
22
23struct Main;
24struct Scene;
25
26namespace io::alembic {
27
28/* Container for an Alembic archive and time sampling info.
29 *
30 * Constructor arguments are used to create the correct output stream and to set the archive's
31 * metadata. */
33 public:
34 using Frames = std::set<double>;
35
36 Alembic::Abc::OArchive *archive;
37
38 ABCArchive(const Main *bmain,
39 const Scene *scene,
41 const std::string &filepath);
43
46
47 Frames::const_iterator frames_begin() const;
48 Frames::const_iterator frames_end() const;
49 size_t total_frame_count() const;
50
51 bool is_xform_frame(double frame) const;
52 bool is_shape_frame(double frame) const;
53
54 ExportSubset export_subset_for_frame(double frame) const;
55
56 void update_bounding_box(const Imath::Box3d &bounds);
57
58 private:
59 std::ofstream abc_ostream_;
60 uint32_t time_sampling_index_transforms_;
61 uint32_t time_sampling_index_shapes_;
62
63 Frames xform_frames_;
64 Frames shape_frames_;
65 Frames export_frames_;
66
67 Alembic::Abc::OBox3dProperty abc_archive_bbox_;
68};
69
70} // namespace io::alembic
71} // namespace blender
Frames::const_iterator frames_end() const
bool is_xform_frame(double frame) const
ExportSubset export_subset_for_frame(double frame) const
bool is_shape_frame(double frame) const
Frames::const_iterator frames_begin() const
uint32_t time_sampling_index_shapes() const
ABCArchive(const Main *bmain, const Scene *scene, AlembicExportParams params, const std::string &filepath)
Alembic::Abc::OArchive * archive
Definition abc_archive.h:36
void update_bounding_box(const Imath::Box3d &bounds)
uint32_t time_sampling_index_transforms() const
BMesh Iterators.
unsigned int uint32_t
Definition BKE_text.h:81