Blender V4.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
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
21struct Main;
22struct Scene;
23
24namespace blender::io::alembic {
25
26/* Container for an Alembic archive and time sampling info.
27 *
28 * Constructor arguments are used to create the correct output stream and to set the archive's
29 * metadata. */
31 public:
32 typedef std::set<double> Frames;
33
34 Alembic::Abc::OArchive *archive;
35
36 ABCArchive(const Main *bmain,
37 const Scene *scene,
39 const std::string &filepath);
41
44
45 Frames::const_iterator frames_begin() const;
46 Frames::const_iterator frames_end() const;
47 size_t total_frame_count() const;
48
49 bool is_xform_frame(double frame) const;
50 bool is_shape_frame(double frame) const;
51
52 ExportSubset export_subset_for_frame(double frame) const;
53
54 void update_bounding_box(const Imath::Box3d &bounds);
55
56 private:
57 std::ofstream abc_ostream_;
58 uint32_t time_sampling_index_transforms_;
59 uint32_t time_sampling_index_shapes_;
60
61 Frames xform_frames_;
62 Frames shape_frames_;
63 Frames export_frames_;
64
65 Alembic::Abc::OBox3dProperty abc_archive_bbox_;
66};
67
68} // namespace blender::io::alembic
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:34
void update_bounding_box(const Imath::Box3d &bounds)
uint32_t time_sampling_index_transforms() const
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
unsigned int uint32_t
Definition stdint.h:80